Advertisement

Splinter Cell ->LightMaps

Started by May 10, 2003 02:45 PM
17 comments, last by cippyboy 21 years, 9 months ago
I managed to write some code and it seems it works pretty well..to bad i forgot to bring it along...i managed to simulate a LighMap..and now I can make almost anything with the terrain...just give me a terrain and how the lights should be and how the shadows are to be casted and...voila...i can even make colorfull effects like...if I`ll implement it on my future FPS i`ll make like whereever you shoot the landscape gets green/red/blue ,just collision detection to get to the vertex and voila!
I hope I can show you something later...tomorrow maybe..hey how can i directly post images on the forum ?
just checking something:

  //WOWOWOWchar Message[]="LightMap";///The End ?[source]  

Relative Games - My apps

ba tu esti un fatarau care ar trebui impuscat , pizda matii faci romania de tot cacatul cu idioteniile tale, sugi pula
Advertisement
Check:
http://www.geocities.com/cippyboy_7/lightmap2.jpg
it`s better now...I also have custom colors per vertex and i`ll post it later once I get a cool little scene in there...
PS:Can you ban the one that sweared me ?(previous post...he`s spanning me...)

Relative Games - My apps

the shadows look fake , you cant have a lit sourface casting shadows towards the incident ray of light (take a look at the nearest object.
quote:

...I`m creating a "LightMap" not a "lightmap"..there`s a new notion now ok ?...


Excuse me, I don''t understand the difference. What is your "LightMap" and what is its difference with a "lightmap" which we are referring to?

The new snap looks better but I guess it''s still per vertex data. Anyway, I also don''t find the lights SO convincing - they are better than none but there''s still a long way...

Previously "Krohm"

Well...with youre "lightmap" can you make a light red/green/blue or whatever combination of those 3 ? Or make a very compex diffuse light that sparks vertices with these colours randomly for example ? Can you make a coktail surface with youre "lightmap" ? I thought so...

I don`t I don`t have a "lightmap" ...there`s something telling me to say it`s a ShadeMap...beats me why...

Relative Games - My apps

Advertisement
With lightmaps you can have RGB colors. If you only store a single light per lightmap, you can colorize them in real-time. You can enable / disable it, or make it blinking. You can''t move it, or change its radius though, unless you disable shadow casting. But then i guess you have the same problem with your technique.

Y.
quote:
Original post by cippyboy
Well...with youre "lightmap" can you make a light red/green/blue or whatever combination of those 3 ? Or make a very compex diffuse light that sparks vertices with these colours randomly for example ? Can you make a coktail surface with youre "lightmap" ? I thought so...

I don`t I don`t have a "lightmap" ...there`s something telling me to say it`s a ShadeMap...beats me why...



All right, you can do all this stuff. The lightmap definition is not per-vertex so, it looks always the same with 100 or 10000 vertices.
It is basically a sw-rendered texture which is slapped on the triangles being textured, so you can play all the tricks you can with textures with all the advantages.
The sw algo used is often really CPU and memory intensive, counting for reflection, interreflection, realistic light distance etc... It''s usually too heavy to do on a per-frame basis. I am working on a simple radiosity for my game and I expect it to take over 200MB of data only to store interreflection data.

Previously "Krohm"

Clippyboy, what you have made is called per-vertex lighting. its a great way to do pre-calculated lighting but you will run into trouble when you try to upgrade the quality, ie.- subdivide triangles to get finer shadow definitions.

You will find that if you want good shadow resolution you are better off using lightmaps (which are simply textures rendered and blended on top of your scene using multipass or a multitexture extension). The performance cost of adding a thousand more vertices is higher than that of adding a thousand texels, if you see what i mean.

Good luck, and keep cool.

PS: Bruno, the fy engine looks great, btw.

This topic is closed to new replies.

Advertisement