View Full Version : Urgent Shadow Probleme
anopheles 11-26-2005, 01:55 PM Okay,
I'm rendering a quiet large scene, but still it is not very heavy:
Just a character in a nurbs desert. The Problem I have is that
the Dmap does not cast a shadow onto the nurbs surface. Raytracing works
fine, but I want to stick to Shadowmaps for now.
The Problem is they just dont render, even with a normal lambert shader applied
to it. Weird!
anopheles
|
|
boxy_
11-26-2005, 10:12 PM
If the scene is big (ie little object casting shadow on huge plane) then it could be that the shadow isn't being calculated to a high enough precision. You can try upping the shadow map size, or increasing the dmap-bias, or try turning auto-focus off....
BernieK
11-27-2005, 07:44 AM
i assume you use a spot light to to cast the shadow. if you illuminate the whole big desert with the big spotlight you gonna run into troubles cause of the shadow map size (as boxy_ said).
what you could try is use a small spotlight (which just covers the character) and duplicate it 2 times (so you end up with 3 spotlights), but don't move them. then set them up as follows:
spotlight1:
intensity: xy
shadow map on
spotlight2:
intensity: -xy
shadow map off
spotlight3:
convert it to a directional light, or scale it up to illuminate the whole scene
might be that i'm talking crap here but i think that should work...
hope that helps...
cheers!
anopheles
11-27-2005, 11:13 AM
That did the trick!
You just saved me about 3 min / per frame :)
jeremybirn
11-27-2005, 02:02 PM
spotlight1:
intensity: xy
shadow map on
spotlight2:
intensity: -xy
shadow map off
You could replace the first 2 spotlights with a single spotlight:
light color: black
shadow color: color with -1 value
Same idea of "shadows only light," just done with one light.
-jeremy
anopheles
11-27-2005, 02:15 PM
Jupp, you found a even better way.
The problem with that light setup is that everything which is not in the spotlight is not
casting a shadow. Making a hudge spotlight is not the way to go because of
the problem explained above. I have many different props in my desert. Increasing
the dmap res on a single directional light doesn't help at all + it takes for ever and
crashes. So should I create a bunch of spotlights or what?
Thanks!
-anopheles
BernieK
11-27-2005, 08:02 PM
if the scene isn't too big you could use a small spotlight for the character shadow and a big one (with shadow-map on) and just blur the shadows so it doesn't look so pixelated...
dunno if that would work, just an idea...
Jack Youngblood
11-29-2005, 12:24 PM
You could replace the first 2 spotlights with a single spotlight:
light color: black
shadow color: color with -1 value
Same idea of "shadows only light," just done with one light.
-jeremy
This sounds like a fascinating trick. It might solve a lot of problems I have been having with negative lights (they don't play with PaintFX very well).
Sorry to seem like a newbie but... how do I set the shadow colour to a -1 value?
EDIT: Ah ha! Think I solved it. Just added a Multiply/Divide.
anopheles
11-29-2005, 03:51 PM
Go into the color selector and type for HSV/RGB -1 -1 -1
Jack Youngblood
12-01-2005, 01:06 AM
Thanks anopheles. This trick also seeeeems to have fixed my PFX problem.
willmore
12-03-2005, 03:53 PM
This "shadows only light" technique is very useful ~
thank you all of you for telling this :thumbsup:
anopheles
12-10-2005, 11:36 AM
I have encountered some few more issues that I can not solve.
http://img223.imageshack.us/img223/6861/shadow6mx.jpg (http://imageshack.us/?x=my6&myref=http://imageshack.us/)
You can see that the shadow on the rocks are more dark than the shadow on
the ground. You can also see that the shadow on the surface of the cactus is
pretty weird also. Some shadows on the ground have a weird halo around of them.
I tried adjusting the bias but it didn't solve anything just scattered the shadow maps weird around!
Please help!
Jack Youngblood
12-10-2005, 12:09 PM
Using the single shadow light method seems to cause odd artifacts if it is set too bright. Try playing with the brightness.
maybe use several shadow lights instead (grouped).
jeremybirn
12-10-2005, 02:32 PM
anopheles -There's something broken in your scene, it looks as if you have a light with a negative intensity or negative color value shining on some of those surfaces.
If raytracing works fine, why can't you light this with 1 light, a raytraced shadow, no tricks, no problems?
-jeremy
anopheles
12-10-2005, 07:18 PM
First of all: thanks, I really apriciate your help!
Okay, I sat down and tried to find a good raytraced solution:
I left everything at the normal settings, it took ~23 min with production quality!
http://img530.imageshack.us/img530/9043/scenebooks9ih.jpg
Definatly too long for one frame! Shadows a greate but the render time! I only
have on computer to render on which is a pretty pain in the -
The Problem was that I just wanted to have a more intense shadow, by increasing
the intesity to 1.75 and the shadow color to -1.75 you get those weird highlights.
So I tried to put them down to a normal 1 to -1 ratio and focused only the areas wich
I want to cast shadows. 1 Spot light worked but with a combination of more than
one light focused on different parts of the scene you get artifacts. I'm a little bit confused
what I should try next. ShadowMaps or Raytracing. Quality versus Rendertime.
jeremybirn
12-10-2005, 11:10 PM
I guess the other thing to look into is rendering in layers and passes. You might want to focus on rendering a fill light pass (light from the sky) with just ambient occlusion, and also rendering shadow passes (from one or more lights) that block light from the sun. If you render all of these elements and work with them in the composite, you might find that you can hit the compromise you want between good render times and high quality final comps.
-jeremy
CGTalk Moderation
12-10-2005, 11:10 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.
vBulletin v3.0.5, Copyright ©2000-2013, Jelsoft Enterprises Ltd.