Page 1 of 1

Real Time Shadows on Custom Models

Posted: Tue Sep 18, 2012 5:07 am
by DoorM4n
I've been using custom models for sometime, but I have never been able to solve this problem. I am trying to get some real time shadows on my custom models. Does anyone have any suggestions?

Re: Real Time Shadows on Custom Models

Posted: Tue Sep 18, 2012 11:42 am
by Gary
In the [ligh] tag, there is an option to cast shadows. I believe it's "No Shadows", you uncheck that.

Also make sure the light is either projective(like a flashlight or spotlight) or orthographic(like light coming from a window/sun).

To have the best shadows:
Have the shadow casting objects as close to the light as possible. The farther they are from the light source the less space they get on the depthmap(almost like a dynamic lightmap), so their shadow will be pixelated. And having a smaller FOV allows for a denser depthmap, so, use the smallest you can get away with.

a. uncheck to enable shadows
b. Must be Projective or Ortho
c. the amount of blur the shadows get, which makes them look better. Slightly.
d. FOV, as low as you can go.
Image

Re: Real Time Shadows on Custom Models

Posted: Tue Sep 18, 2012 9:10 pm
by DoorM4n
Great, I really appreciate the help. I know how to get real time shadowing, but real time shadows do not work on custom models. Does anyone know why or if there is something I need to do with the model to fix this?

Re: Real Time Shadows on Custom Models

Posted: Tue Sep 18, 2012 9:20 pm
by JacksonCougar
Uhh... use a proper injector?

Re: Real Time Shadows on Custom Models

Posted: Tue Sep 18, 2012 9:41 pm
by Gary
Also, if your model is translucent (partially transparent). It will probably cause problems, as depth tests are boolean, gotta be either fully opaque or fully transparent.

Re: Real Time Shadows on Custom Models

Posted: Tue Sep 18, 2012 11:36 pm
by DoorM4n
I am using your proper model injector :oops:

Also, I have this feeling that custom models won't project a shadow--because I think we would have had shadows on custom models before and to my knowledge we have never had shadows on custom models. My cliffs and castle in the photo thread have a hanging light pointed at them and i've adjusted the settings and still no luck. I adjusted the settings you recommended too. I can see the settings change while the MC is under it (for instance I see shadow changes on his armor) but I don't see it on the models.

Re: Real Time Shadows on Custom Models

Posted: Tue Sep 18, 2012 11:49 pm
by Gary
DS had them. Remember those pictures of Outpost?

Re: Real Time Shadows on Custom Models

Posted: Wed Sep 19, 2012 12:02 am
by DoorM4n
Very true man, I'm looking through the thread and see tons of stuff with custom model shaders. Dang I was way wrong. Now I gotta figure out how to get them on my map.

Re: Real Time Shadows on Custom Models

Posted: Wed Sep 19, 2012 4:13 am
by DoorM4n
Darkshallfall, got any tips to help me out with this?
You have some expertise in this area.