PDA

View Full Version : Light-Linking Shadows? Possible?


noisewar
02-23-2003, 10:10 AM
I'm in a unique circumstance where I can't do any compositing. Now I've got a huge landscape, tiny character in it, and want one directional light to cast shadows... but that just doesn't work... the Dmap sets its resolution on the size of the largest object so everthing comes out ugly... and I did the best I could with dmap resolution and light focus. No go.

So, anyone know a way I can light link my sunlight to the characters only, but have the shadows cast onto the landscape as well? Then I could light the landscape with it's own light, and the dmap wouldnt get caught trying to adjust for the size difference.

Thanks in advance!

Stonepilot
02-23-2003, 05:56 PM
Here's a suggestion that might work. Create your sunlight. With no shadows. I don't now how many character you have in the scene but if its not that many create a spotlight per character and and turn the specularity off on it. That way all you get are shadows. Light link it to that character. And if the characters are animated parent the light to the charcter. I haven't sted it but it might work.Just make sure that your match the direction of your spotlight to that of yoursun and it should give you decent results.

spheratu
02-23-2003, 05:59 PM
have you tried raytrace shadows?
they're slow but the results are great

noisewar
02-23-2003, 07:43 PM
Stonepilot, that doesn't work because you have to include the geometry you want the shadow cast on in your light membership... and the landscape is huge.

I did try to Raytrace, got decent results but abominable render times even with number of rays turned low. It was just one raytraced light with 1 ray, 6 shadow rays, 5 degrees light angle, and 0 everything else. I don't know how much more optimized it could be.

Octagon
02-23-2003, 10:40 PM
Originally posted by noisewar
I'm in a unique circumstance where I can't do any compositing. Now I've got a huge landscape, tiny character in it, and want one directional light to cast shadows... but that just doesn't work... the Dmap sets its resolution on the size of the largest object so everthing comes out ugly... and I did the best I could with dmap resolution and light focus. No go.

Thanks in advance!


light linking tricks won't get you nowhere here, as you need to have lights linked to geom for them to be in shadow.

BUT: what do you mean, you cannot do any compositing? if you could you could try to render 1 frame of the landscape with raytraced shadow and bake the lighting information (as well as texures if you like). you can use "convert to file textures" in hypershader for that.
then you could use the baked texture on you landscape with a surface shader (you dont need shading anymore as all the shading is in the texture map) and reder out the landscape as layer.
then you render out your character with raytraced shadows on and a dedicated layer for the character and shadow.

this should allow you to decrease your render times and deliver better quality than with dmaps.

hope this helps!
matthias

noisewar
02-23-2003, 10:49 PM
Thanks Octagon, you are the voice of reason. I've been stupidly stubborn about baking shadows but I guess this is the way it must be done. I think I will bake raytrace though... DMAP is driving me nuts and I just want a make pretty now button.

Mangaka604
02-23-2003, 11:19 PM
Here's a way for you to get shadows onto the ground but not illuminating the ground.

1) Make three directional lights. Make one of the three shadow casting but with 0 intensity and the other ones with your desired intensity and color values but with shadow casting turned off.

2) Now for the last two lights aforementioned, light link one to just your character(s) and the other to your landscape.

There. Now you should be able to change values and it will only affect one element. Make sure to keep everything pointed in the same direction otherwise the shadows will fall in a different direction. Just Parent all the lights to a locator or even better, draw a spline in the shape of an arrow and Parent the lights to that spline. Now you can simply point the arrow in the direction you want the shadows to fall. Just a little trick I use.

Hope this helps.

CGTalk Moderation
01-14-2006, 12:00 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.