Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Code Snippets / [DBPro] Vertex light mapping using Sparky's

Author
Message
Van B
Moderator
22
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 29th Oct 2008 00:07
Hey all, came up with this as an example of a cheap and cheerful way to lightmap a level, or even just give it your own custom look using vertex diffuse. It's quick enough to use after loading a level, so that's how I'd use it personally, load and position your map and then run each object through the light mapper function. It should not affect texturing bar some issues where you might want to change the contrast etc to get the look you want.




Health, Ammo, and bacon and eggs!
Kohaku
20
Years of Service
User Offline
Joined: 3rd May 2004
Location: The not very United Kingdom
Posted: 29th Oct 2008 14:40
Ooh sounds hot! I was going to try something like this but never got round to it.

Will try it out later.


You are not alone.
Sixty Squares
18
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 29th Oct 2008 22:16 Edited at: 29th Oct 2008 22:16
Wow. I noticed your answer to a question about this a while ago and thought it'd be cool to see an example of it, and here it is. Thanks for posting this, it looks pretty cool . Can it do shadows? (ex. if I made a plain [with lots of verticies, not just 4 like the DBP ones] and put a cube on it, would the cube cast a shadow of some sort?)

Van B
Moderator
22
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 29th Oct 2008 22:54
Yeah, as long as there's vertices there to check, it would cast shadows, or rather the vertex would not be affected by the light.


Health, Ammo, and bacon and eggs!
Sixty Squares
18
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 29th Oct 2008 23:43
Very nice

Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 30th Oct 2008 01:37
Aw dude hot!

Benjamin
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 31st Oct 2008 21:36
Pretty. I wonder if it'd be possible to do something like it in real-time.

kaedroho
17
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 1st Nov 2008 17:09
ive done something similar in realtime. But it doesnt use vertexes, it sets the whole objects diffuse. I use it for my particle system and you get some cool lightshafting effects when theres lots of particles.


Games, Code, 3D Models and more! click here

Login to post a reply

Server time is: 2024-11-22 07:57:51
Your offset time is: 2024-11-22 07:57:51