Detailed Shadows

For Descent, Descent II and Descent3 level editing and modification assistance.
Post Reply
User avatar
Kyouryuu
DBB Alumni
DBB Alumni
Posts: 5775
Joined: Fri Apr 30, 1999 2:01 am
Location: Isla Nublar
Contact:

Detailed Shadows

Post by Kyouryuu »

Okay, here's something I don't quite get about D3Edit.

It uses light maps. It has a configurable detail level for these light maps. So, why is it that I can't get cool shadows like Unreal Tournament has?

Here's an example.

Suppose you've got a big light on the ceiling. Between the ceiling and the floor, you have an X-shaped crossbeam traversing the entire room. Realistically, the expectation would be that there is a similar, X-shaped shadow on the ground.

- In Unreal Tournament, you get the shadow. Setting the face for "High Detail Lighting" makes it more apparent.
- In Quake 3, you get a similar shadow, but it's more pixelated.

In D3, this isn't the case. There is no shadow on the ground at all. It's illuminated as if the crossbeam isn't there.

To this end, I've tried the following:
- Subdividing the ground into smaller faces. This would work for vertex lighting, but I don't think Descent 3 computes lighting this way. It didn't produce shadows either.
- Welding the cross beam to the architecture rather than having it "float" in the room. Again, no dice.
- Raising and lowering the cross beam in the room. Although the ground got darker when it was low to it, it still didn't produce a clear shadow.
- Fiddling with Lightmap Spacing, nothing.

So, am I chasing something that isn't possible? And why? Is D3Edit's lighting algorithm too blunt? Are Descent 3's lightmaps just not rigorous enough? After all, it's not like the retail levels have much in the way of dramatic shadows either.
User avatar
Duper
DBB Master
DBB Master
Posts: 9214
Joined: Thu Nov 22, 2001 3:01 am
Location: Beaverton, Oregon USA

Post by Duper »

Exactly what kind of shadows do you want? From the surrounding area or by players?

Check out slowguy's post. Sounds like he's having simular trouble. I think the lighting routine in D3 is kinda second hand. They put it in there but it's far from perfect.

It might have to do with the fact that the engine is created to handle 640x480 res. So it might have to "dumb down" the lighting.
User avatar
Slowguy
DBB Ace
DBB Ace
Posts: 76
Joined: Sun Nov 02, 2003 3:01 am

Post by Slowguy »

Hmm... Maybe the light is too close to the cross beam? Or maybe the light is too bright or too dim? Have you tried with different light textures? I know that you can get shadows on the terrain...
User avatar
Stryker
DBB Admiral
DBB Admiral
Posts: 1103
Joined: Sat Jun 12, 2004 7:58 am
Contact:

Post by Stryker »

That's odd--I've been able to produce almost perfect shadows before in D3. It's not as good as some games, but you can get good shadows. Try using a lightmap spacing of 3 (the smaller the better, but the more processing power it takes in-game), iterations of 9999999, super detail, volume lighting, and combine lightmap faces. Turn ambient lighting, if any, down to the absolute minimum possible. Use the undo lighting feature to ensure that there are absolutely no remnants of the previous lighting attempts, then relight.
User avatar
Duper
DBB Master
DBB Master
Posts: 9214
Joined: Thu Nov 22, 2001 3:01 am
Location: Beaverton, Oregon USA

Post by Duper »

You don't need to worry about the ambient option unless you actually use it.
User avatar
Floyd
DBB Captain
DBB Captain
Posts: 561
Joined: Sat Apr 26, 2003 2:01 am
Location: Germany
Contact:

Post by Floyd »

i once had such shadows when building crescent. i put in a double grid, which produced a nice shadow like you described, K.

i am not certain, but i seem to remember some of the settings: try a lightmap spacing of 1 to 5, an ignore limit of 0.0005 and maybe super detail.
i think the ignore limit was the most important. but i'm not sure.

the bars of my grid, which i took out because it slowed down the pace of the game, were each 1 or 2 units wide.
also, if you go to the water cavern, you'll see the pipes at the wall create a nice shadow, too ;)
User avatar
Kyouryuu
DBB Alumni
DBB Alumni
Posts: 5775
Joined: Fri Apr 30, 1999 2:01 am
Location: Isla Nublar
Contact:

Post by Kyouryuu »

I'm basically talking about something like this.

Image

Unreal does this easily. Actually, I found that Red Faction did as well because, like Unreal, it has an adjustable lightmap density for each face. That's what I think Descent 3 has, so I can't see why I can't get this precision with it. ;)
User avatar
Duper
DBB Master
DBB Master
Posts: 9214
Joined: Thu Nov 22, 2001 3:01 am
Location: Beaverton, Oregon USA

Post by Duper »

because the D3 engine is a good bit older and was put together rather quickly. Remember.. half way thru the project, the went with a different engine.
User avatar
SuperSheep
DBB Benefactor
DBB Benefactor
Posts: 935
Joined: Sun Jun 03, 2001 2:01 am
Location: Illinois

Post by SuperSheep »

Could you try lighting just the room with a high detail? I've sometimes found that lighting room by room can yield better results.
User avatar
Floyd
DBB Captain
DBB Captain
Posts: 561
Joined: Sat Apr 26, 2003 2:01 am
Location: Germany
Contact:

Post by Floyd »

also thought about proposing this. only problem i experienced though were that adjacent rooms won't get lighted with the room by room method.
User avatar
SuperSheep
DBB Benefactor
DBB Benefactor
Posts: 935
Joined: Sun Jun 03, 2001 2:01 am
Location: Illinois

Post by SuperSheep »

One other idea would be to fake it. I did this in a house level I was making a while back for the kitchen sink. Worked out really well and I didn't have to turn the details up at all.

One problem to keep in mind is if the detail goes too high, the headlight will really slow things down and look really bad.
User avatar
DCrazy
DBB Alumni
DBB Alumni
Posts: 8826
Joined: Wed Mar 15, 2000 3:01 am
Location: Seattle

Post by DCrazy »

In D3, are you constructing that all as one room or as two rooms? If it's constructed as one room, the lighting algorithm may not be taking the extra geometry into account. It might be optimized for vacuous space?

Try putting the crossbeams in another room and lighting through that room into the first, and see if you get the results you want. Remember, in that shot you posted from Unrealed, the BSP will be split where that room on top meets the room underneath.
Otherone
DBB Alumni
DBB Alumni
Posts: 393
Joined: Wed Jan 20, 1999 3:01 am
Location: Who knows?
Contact:

Post by Otherone »

You might try lowering the reflectivity value on some of your textures with tablefile overrides.

What *could* be happening is that the light is bouncing off the floor, bouncing again off the bottom of the X, then striking the floor where you want the shadow to be thus making it less distinct.

In theory, lowering the reflectivity value of the floor texture should cause less light to reflect back up at the ceiling which should reduce the amount re-reflected back at the floor (etc).
User avatar
Slowguy
DBB Ace
DBB Ace
Posts: 76
Joined: Sun Nov 02, 2003 3:01 am

Post by Slowguy »

You could try lighting the back of the cross beams... the faces opposite the player.
Image
The effect is there, but it's not perfect. (It looks way better in the screenshot.) You'll need to mess with the geometry and lighting a bit to get it looking right.
User avatar
Kyouryuu
DBB Alumni
DBB Alumni
Posts: 5775
Joined: Fri Apr 30, 1999 2:01 am
Location: Isla Nublar
Contact:

Post by Kyouryuu »

Hu, yeah, the screenshot Slowguy has there is what I want to see. Any particular light settings used to yield that effect?

Didn't even think about backlighting the crossbeam. That would definitely make for less light on the ground since it would have to bounce off the ceiling first, whereas having a giant light face on top of the crossbeam would cast a lot of lights on the ground. Also an unfair comparison because Unreal's lights are point lights whereas Descent lights are somewhat planar.
User avatar
Slowguy
DBB Ace
DBB Ace
Posts: 76
Joined: Sun Nov 02, 2003 3:01 am

Post by Slowguy »

Kyouryuu wrote:Any particular light settings used to yield that effect?
Well you need a powerful light. I just used a normal white lightmap and increased the multiplier from 1 to either 2 or 3. A custom lightmap would have been better... umm I also had lightmap spacing set to 2. I haven't tried anything over 2.

I must add that, the area above the crossbeams is very important in determining how the light will be cast back onto the floor. Try tilting the faces above the crossbeams (the box above the crossbeams) tilt them either inward, or outward and see how it looks. I dunno, just play around with it and see what happens. Also the light pattern that is cast onto the floor is a little strange, there is a lighter square illuminating space within the square with the shadows cast. It's hard to explain, and I cannot get a screenshot to show it, they just don't turn out right, but if you try it, you'll see what I'm talking about.
User avatar
Slowguy
DBB Ace
DBB Ace
Posts: 76
Joined: Sun Nov 02, 2003 3:01 am

Post by Slowguy »

Hmm... I was thinking... wouldn't a sphere with lightmap faces act like a point light in D3? Fake point lights? That might be a better solution. Maybe use a transparant/pass-through texture for the lightmap? Hmm, I'll experiment a little with this tomorrow. ;)
User avatar
DCrazy
DBB Alumni
DBB Alumni
Posts: 8826
Joined: Wed Mar 15, 2000 3:01 am
Location: Seattle

Post by DCrazy »

Yeah but then wouldn't the lighting from one face hit multiple other faces by virtue of reflection?
User avatar
Duper
DBB Master
DBB Master
Posts: 9214
Joined: Thu Nov 22, 2001 3:01 am
Location: Beaverton, Oregon USA

Post by Duper »

you know.. it suddenly strikes me as odd that know one up till now, (that I've heard of) has done a lighting study.

I played around with the lights in Keg Party and Dissent to simulate the effect in the D2 version and it wasn't easy. It wouldn't Ever be 100% the same of course, but check out what I had to do with both of those levels to get the lighting "just so".

Btw. With Keg Party, I had to use a fair amount of ambient light throughout the entire level.

Geez.. now I'm going to have to do some home work. You have my head going. :P Oh well. ;)
User avatar
Slowguy
DBB Ace
DBB Ace
Posts: 76
Joined: Sun Nov 02, 2003 3:01 am

Post by Slowguy »

Alright, so... sphere lights work. :)
Image

The shadow was cast by an invisible sphere light. The detail in the shadows isn't that great, I had to increase the contrast in the screenshot to show that there is actually a shadow there.

Here's the mn3 file if you want to check it out:
http://home.ripway.com/2004-9/172350/ltest.mn3

Edit: Maybe if the light sphere had more faces, the shadow would become clearer.
User avatar
Kyouryuu
DBB Alumni
DBB Alumni
Posts: 5775
Joined: Fri Apr 30, 1999 2:01 am
Location: Isla Nublar
Contact:

Post by Kyouryuu »

Well, I'm glad I got the ideas flowing. To me, lighting is one of the most fun parts of designing levels. :)
User avatar
Slowguy
DBB Ace
DBB Ace
Posts: 76
Joined: Sun Nov 02, 2003 3:01 am

Post by Slowguy »

Yeah, I hadn't really thought about this much until you brought it up. :P
Post Reply