Jump to content
The Dark Mod Forums

Light baking


Bikerdude

Recommended Posts

  • Replies 148
  • Created
  • Last Reply

Top Posters In This Topic

Wow! Cool map!

 

 

And I think this yet another different method because I've never heard any mention of the use of UV maps in the Strombine method...

 

(I'm sure some smarty will come along and say that this is how all baking is done...:( ...and we'll continue to scratch our heads either way... :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

Looks like you have to make everything out of big models, not that there's anything wrong with that. Maybe you could set them up as facades over brushwork so you could still get decent visportaling. And then you're doing textures by hand, which sounds like a giant task for even a small area, much less a big map. (And is there a limit when you're making a custom textures for basically every wall?). But then I guess if it looks awesome it's worth it. Still need to work out the light gem. And the dynamic lighting still in the level (mixing dynamic hard & baked soft shadows... might be interesting.)

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

This has been brought up before, even by me, but not with this particular instance. Although I have to point out again, that everything would have to be a model, which would not allow you to visportal properly. You could, I suppose separate areas with brushes and visportal that way, but those brushes would not have the baked lighting on them and would look weird juxtaposed against the nice models.

 

I downloaded and ran that guys map and yeah no visportalling is done.

 

shot00010a.jpg

I always assumed I'd taste like boot leather.

 

Link to comment
Share on other sites

And I think this yet another different method because I've never heard any mention of the use of UV maps in the Strombine method...

I think there is no baked lighting in Strombine. I encourage everyone to have a look at the custom ambient light shaders that are used there (even if you don't have Q4). :)

When I did I tried to paint some myself immediately beause it looked so easy...

 

In fact it is way easier than that baking stuff. No modelling app needed, just your favourite paint prog and a text editor. And it works with the lightgem.

 

I downloaded and ran that guys map and yeah no visportalling is done.

Ouch!

Link to comment
Share on other sites

Although I have to point out again, that everything would have to be a model, which would not allow you to visportal properly.

 

 

Why shouldn't it be possible to visportal it? You just have to surround the model-rooms with brushwork, so that each room is sealed and split them up with visportals intersecting with the models (No brushwork ever visible this way). You will have to make sure though that the models don't extend over multiple zones, because a model won't be rendered as soon as its origin is not within an active portal. As an example, you can have a look at NHAT 3 (forest). Goldy built the terrain with patches, which I converted to models in order to perform the vertex blending on the small path throughout the terrain (that and adding some more details to the path). The model was split into multiple models, one for each portal-zone, so that visportaling works.

 

But there is still the problem that these baked textures won't affect the lightgem, as it has been said numerous times in other threads already. ;) So you may only use it selectively on unreachable places or in a very subtle fashion.

Link to comment
Share on other sites

Alright I'm gonna have another crack:

 

So if i understand correctly, the light "Shaders" that are used in Strombine are really more like material Shaders that use a light texture.

 

This light texture is akin to those flashlight mods that make the flashlight display a symbol or a face on whatever it shines on. So all the subtle lighting effects like bounced light have to be faked by hand.

 

So here's my approximate of this:

 

1) Export your map to a 3D modeling application (Blender)

2) Identify where your light sources are shining

3) Set the camera to view an area of interest for lighting

4) Create an Alpha Channel surface in front of this view

5) Manually paint the lighting effects (including approximates of occlusion and bouncing... so it requires an artist...) onto this surface

6) Save your painting work as a texture

7) Create a material shader that includes this new light texture

8) Do this same action again for almost every light on your map

 

Is this correct??? :huh:

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

Light shaders and material shaders are very similar yes.

 

But there's no need to export your map to a modeling application and paint a light texture for almost every light in your map. Just a few ambient lights is all that's required.

 

He covered the technique in a thread on Quake3World.com...

 

http://www.quake3world.com/forum/viewtopic.php?t=29872

Link to comment
Share on other sites

Ok so my basic method is correct except just the Ambient lights get painted... but the bounces and occlusions still have to be approximated artistically rather than being rendered algorithmically 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

Ok so my basic method is correct except just the Ambient lights get painted... but the bounces and occlusions still have to be approximated artistically rather than being rendered algorithmically correct?

 

Yes. If you scroll down in the thread Rich mentioned above you can see it done properly. Looks like Lunaran used some 2d light projection in Photoshop while working from screenshots he took in the editor.

 

My own foolish attempt back when I fiddled with DoomEd had this light texture as a result:

 

 

 

...as you can see it is a crappy hand painting in deed. The grey area is where my room is, the black areas just mean the light radius is way bigger than my room. Guess I didn't know how to resize a light (no dragging in DoomEd). :)For some reason it is mirrored and upside down.

 

The light spot is where in the scene the moon shines in through a window. Here it is in game:

 

 

 

There are only two light entities, the ambient and a slightly blue parallel light shining through the window.

 

While I did this really sloppy, it still looks quite decent IMO. This is why I always raise a hand for this method. It doesn't have to be perfect and still can result in something nice.

 

The downside is of course that you fill a light volume (3d) with flat texture (2d). There is a falloff alongside the z-axis, that's all. Works well for bright beams shining in a dark, empty room -- but beware of a table that is supposed to have a shadow beneath it, but none above itself.

 

I haven't tried anything like this, but a possible solution that came to my mind was ambient light slicing: multiple layers of ambient light volumes stacked on each other.

 

Maybe one day there will even be a way to automatically have a light map calculated, sliced up and converted into light shaders... [/mad_scientist_voice]

 

...guess it's sleeping time for me. :P

Link to comment
Share on other sites

@Bikerdude

 

If you still are interested in getting that "old-school" Thief look going for this wall. Then I would suggest that you make at least two large light textures. One Semi-Circle gradient for the bottom of the wall and one very faint blue tinted gradient for the top of the wall (to simulate moon light ambiance Hollywood style). You could apply the same effect at a smaller scale to the cylindrical tower as well.

 

I will poke around in the pk4's and try to figure out the remaining details if I get a chance. But one of your cohorts might jump in and do a better job ;).

 

Thanks for the clarification plasticman and rich_is_bored!!!

 

image06.jpg?psid=1

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

sorry but texture and light looks like its baked onto object, same as bake technique used in hl2 source rad.exe.

 

No need to apologize (especially to a weirdo like me :laugh: )...

 

I too think it looks baked.

 

But plasticman says otherwise and the technique looks like it may not be as mysterious as it sounds in the original article.

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

  • 3 weeks later...

@plasticman

 

I think I over-estimated my comprehension of this one.

 

I suspect that to do this you would need to make your own vpf using the ones in the Strombine pk4 as a template?

 

Is this technique possible with what is available in Dark Radiant?

 

Would you be willing to create a wiki article?

 

:huh:

 

(I will get off my duff and take another peek tonight to see if I can stretch my noodle a little. )

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

lights/aa_1_sky1

{

lightFalloffImage makeIntensity( gfx/lights/1_sky1_z.tga )

{

forceHighQuality

map gfx/lights/1_sky1_xy.tga

red Parm0 * 2

green Parm1 * 2

blue Parm2 * 2

zeroClamp

}

}

 

so it's just a material definition eh...?

 

I am returning to the idea that this may not be so bad...

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. :)

A material definition and one or two pictures.

The post I wrote while you wrote yours:

 

Would you be willing to create a wiki article?

Unlikely. I'm not a good writer when it comes to writing in English... ...takes me always years to finish a sentence. Let alone the ground work: I don't think I got the stage where I master the technique well enaugh to teach it -- I would have to redo it in a new map to provide fancy screenshots. Something like this usually involves encountering unforeseen problems and invent a way to get rid of them, while -- did I actually mention this? -- I am still working on container sounds and really like to focus on it (in my spare time) till I call it finished. :)

 

But I can have a peek in my doom folder to help you. My custom ambient light consists of two parts:

 

1. A hand drawn picture: base/lights/ambientk1.tga

2. A material: base/materials/kesambient.mtr

 

These two are sufficient to access the light texture in Radiant's light inspector. Here's kesambient.mtr -- Just figured my shader is horribly wrong, posting a snippet from strombine_lights.mtr instead:

 

lights/aa_3_sky1
{
lightFalloffImage	makeIntensity( gfx/lights/3_sky1_z.tga )
{
	forceHighQuality
	map gfx/lights/3_sky1_xy.tga
	red 		Parm0 * 2
	green 		Parm1 * 2
	blue 		Parm2 * 2
	zeroClamp
}
}

The guy uses two textures: one to control the light falloff along the z-axis and a "regular" one for x and y. Later he rotates the lights in the map just to confuse everyone. :P

 

So the "lightFalloffImage" and "map" keywords point to the .tga-files in the lights-folder. I have no idea what all the other fancy words do, but I think that's all that is involved. :)

Link to comment
Share on other sites

I get it now!

 

The makeIntensity keyword says "Shine this bright this far away from the light"

The map keyword says "You can go this far left, right, forward, backward"

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 "lightFalloffImage" is always Z bound?

 

(Otherwise as a layman I would say that the material definition looks just like combining two XY textures.... There's nothing else that seems to specify "This texture get's this direction while this one gets the other...").

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

    • Petike the Taffer  »  DeTeEff

      I've updated the articles for your FMs and your author category at the wiki. Your newer nickname (DeTeEff) now comes first, and the one in parentheses is your older nickname (Fieldmedic). Just to avoid confusing people who played your FMs years ago and remember your older nickname. I've added a wiki article for your latest FM, Who Watches the Watcher?, as part of my current updating efforts. Unless I overlooked something, you have five different FMs so far.
      · 0 replies
    • Petike the Taffer

      I've finally managed to log in to The Dark Mod Wiki. I'm back in the saddle and before the holidays start in full, I'll be adding a few new FM articles and doing other updates. Written in Stone is already done.
      · 4 replies
    • nbohr1more

      TDM 15th Anniversary Contest is now active! Please declare your participation: https://forums.thedarkmod.com/index.php?/topic/22413-the-dark-mod-15th-anniversary-contest-entry-thread/
       
      · 0 replies
    • JackFarmer

      @TheUnbeholden
      You cannot receive PMs. Could you please be so kind and check your mailbox if it is full (or maybe you switched off the function)?
      · 1 reply
    • OrbWeaver

      I like the new frob highlight but it would nice if it was less "flickery" while moving over objects (especially barred metal doors).
      · 4 replies
×
×
  • Create New...