Jump to content
The Dark Mod Forums

Light baking


Bikerdude

Recommended Posts

Yes. The light falloff image is always Z bound but we're talking about the light's local Z axis, not the world axis. When you rotate the light, it's local axises rotate with it.

 

There's a bit more information posted in a discussion here...

 

http://www.doom3world.org/phpbb2/viewtopic.php?f=1&t=6616&start=0&st=0&sk=t&sd=a

Edited by rich_is_bored
Link to comment
Share on other sites

  • Replies 148
  • Created
  • Last Reply

Top Posters In This Topic

Thanks for the additional clarification Rich. I'll have to fuss around in Dark Radiant and Gimp so I can get the full scope of how this is done (step-by-step) but I think I've got enough here to cobble together a wiki. Unless someone with more noodles in the noodle-bowl wants to write a well-written one :laugh: ...

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

I will try to keep it to paint-by-the-numbers with pictures and clicks 'n all. I'm sure that Rich will find it amusing (and or somehow technically incorrect). But I will test the method so it should work whether my words are fools-gold or not. :)

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

No screen-shots yet and I haven't fiddled enough in Dark Radiant or Gimp yet either but here is a skeleton wiki:

 

http://wiki.thedarkmod.com/index.php?title=Light_Textures_and_Falloff_Images#Links_and_References

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

The look should be equivalent of Light Baking but also the Light Gem will work with it (Strombine method).

 

But I did allude to Photon Mapping in the wiki and will expand that area as well if I can find the references.

 

I have a cached copy of the old Doom3world baking article and I'll see if I can make that into a wiki as well but that would probably have the same visportal issues that the original post in this thread has.

 

http://forumtgmonline.futuregamer.it/showthread.php?t=5137

Edited by nbohr1more

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

The performance win here is that you do not need to use lots of lights. You can use one light texture and have it look like the area was lit by many little lights.

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

The performance win here is that you do not need to use lots of lights. You can use one light texture and have it look like the area was lit by many little lights.

Ah ok, would be cool to use this in my vert map but dont know if I have to time to try and learn it before beta testing this weekend.

 

On a related not, what annoys me about my vert map is Im being limited to the amount of outside light I can use, were as for example on the archery rang in the trainng map there are about 16+ noshadow and 6+ shadow lights and there isnt a fps hit there, grrr. its something to do with the total volume of the single outside leaf thats causing me to run into other probs - well on the next map I guess..

Edited by Bikerdude
Link to comment
Share on other sites

Yeah. It doesn't seem too bad but... drawing the light texture and aligning the light might be a little tedious if you're a perfectionist.

 

To use a real light-map bake would be a real pain in the ass.

 

Something like:

 

1) Export your map as a bunch of models (cut up geometry by visportal and or ease of building)

2) Rebuild your map from these models in PovRay or another program that does Photon Maps

3) Setup lights

4) Create the Photon Map

5) Bake all the "Bounces" and secondary lighting (anything that steals performance) to UV Mapped Textures on the models

 

Then pick your poison:

 

A:

6) Unwrap the texture

7) Cut up the texture in a image editor and try to re-UV map your Brush-work

 

or

 

B:

6) Import all the Models and replace your Brush-Work with Models

7) (see STiFU for details for seamlessly connecting the models with internal Brush-Work? )

 

Then finally:

 

8) Remove any small lights that you already baked into the UV map

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

One thing you can do with this is nice "colored shadows". For instance our desktop lamp has such a colored light texture, church windows are another example.

 

Instead of having hundreds of small lights, you have one projected texture.

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

One thing you can do with this is nice "colored shadows". For instance our desktop lamp has such a colored light texture, church windows are another example.Instead of having hundreds of small lights, you have one projected texture.

I think one way of understanding this is to see a small example map..?
Link to comment
Share on other sites

You can also use the baked lighttexture for your projected lighttexture if you export it separately. It will probably still require some 2d-tweaking, but with this method, you have all advantages of the two proposed methods combined: It's more accurate than handdrawn lighttextures and the lightgem will still work.

Link to comment
Share on other sites

You can also use the baked lighttexture for your projected lighttexture if you export it separately. It will probably still require some 2d-tweaking, but with this method, you have all advantages of the two proposed methods combined: It's more accurate than handdrawn lighttextures and the lightgem will still work.

 

Yeah. I hinted at that in the wiki but suggested just baking the bounces and small lights rather than all the lighting (not really my idea, just an extension of the old Doom3world light baking concept...). I will humbly request that if you know how to do either baking method that you augment my sloppy wiki with some of the good stuff STiFU. :laugh:

 

You probably wouldn't even need to have the baked UV texture be all that precise. You could crop it and blur the fine details and let the Normal Maps do their magic. Just need to line it up approximately correct.

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

So far, I only dealt with this topic theoretically as well, but well, there are tutorials on the web dealing with this task (e.g. here), so you can just link to them. No need to reinvent the wheel. After all, it's just the source of the texture that is different in this case. The general technique remains the same.

Link to comment
Share on other sites

Pictures added to the wiki.

 

Still need to create the definition and test it out.

 

http://wiki.thedarkmod.com/index.php?title=Light_Textures_and_Falloff_Images

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

Yes, I will create a basic map as well (just a modified Start map).

 

I just wish I had a basic pre-built city to play with so I could test all the concepts out.

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

There are a number of cities in FMs that have been made. You might ask GoldChocobo for permission to use a part of his city in the 2nd mission of No Honor Among Thieves. It's for a good cause and would give a much better impression of the technique than doing it just for the Starter Map of all things.

What do you see when you turn out the light? I can't tell you but I know that it's mine.

Link to comment
Share on other sites

NHAT 2/3 is a beautiful city.

 

I was a little afraid that my art would not live up to that one... but I guess that is ultimate proof as the lighting is supposed to be sloppy to give it that natural bounced radiance look.

 

I will see in my PC can handle having a map of that size running well in Dark Radiant then I will check with GC... unless Biker wants to give me some throw-away mini map to use ;)...

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

For your tutorial purposes you don't need a whole map. I think you could just cut out a nice looking square block or so, close off the exits, and work with that. Better for you and your audience.

What do you see when you turn out the light? I can't tell you but I know that it's mine.

Link to comment
Share on other sites

Yep.

 

I've been nervous about cutting up maps because I'm not the most adept in DR and I've been afraid I would miss some caulk or cause a leak... But I'll give it a go.

 

Or I could just build some crappy sky-scrapers and use one of the textures with deeper normal maps...

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recent Status Updates

    • nbohr1more

      Was checking out old translation packs and decided to fire up TDM 1.07. Rightful Property with sub-20 FPS areas yay! ( same areas run at 180FPS with cranked eye candy on 2.12 )
      · 2 replies
    • taffernicus

      i am so euphoric to see new FMs keep coming out and I am keen to try it out in my leisure time, then suddenly my PC is spouting a couple of S.M.A.R.T errors...
      tbf i cannot afford myself to miss my network emulator image file&progress, important ebooks, hyper-v checkpoint & hyper-v export and the precious thief & TDM gamesaves. Don't fall yourself into & lay your hands on crappy SSD
       
      · 5 replies
    • OrbWeaver

      Does anyone actually use the Normalise button in the Surface inspector? Even after looking at the code I'm not quite sure what it's for.
      · 7 replies
    • Ansome

      Turns out my 15th anniversary mission idea has already been done once or twice before! I've been beaten to the punch once again, but I suppose that's to be expected when there's over 170 FMs out there, eh? I'm not complaining though, I love learning new tricks and taking inspiration from past FMs. Best of luck on your own fan missions!
      · 4 replies
×
×
  • Create New...