When to use shadow Method(volumes) or Shadow Map?

Software: Away3D 4.x

jtopaz, Member
Posted: 09 March 2012 06:21 AM   Total Posts: 53

I am adding shadow to my scene (10k+ polygon) and find that performance is terrible even the shadow quality is not good.

I find there is another way to TextureProjector shadow to my scene but I have not try it. Am I right?

My question is when I should use shadowMethod or Shadow Map?
I am working on a racing game. Should I use Shadow Map to my car also?

Thanks alot

   

jtopaz, Member
Posted: 10 March 2012 06:40 PM   Total Posts: 53   [ # 1 ]

Any comment would be helpful.

   

Avatar
Fabrice Closier, Administrator
Posted: 10 March 2012 09:52 PM   Total Posts: 1265   [ # 2 ]

Dynamic shadow is relatively expensive. So rule is anything that is static, use prebaking or lightmaps. Use shadowMethod only for your moving objects.
TextureProjector is not really ment for this as the projected map (your shadow would not be transformed).

   

jtopaz, Member
Posted: 11 March 2012 05:18 PM   Total Posts: 53   [ # 3 ]

Thanks Fabrice.

LightMap works.
But I have another problem. I am using .obj model file and my scene contains lot of mesh. If I set every mesh material a lightmap, the result would be incorrect (there would be lots of light map shadow).
What should I do? Merge all mesh together?

   

Avatar
Fabrice Closier, Administrator
Posted: 11 March 2012 09:49 PM   Total Posts: 1265   [ # 4 ]

Everything that is static can be prebaked, so why not do so? You then have only a diffuse map per material. Plus if you do a nice unwrap of your uv’s, you should be able to push a few meshes per map too.

   

3dNewb, Sr. Member
Posted: 16 March 2012 06:59 PM   Total Posts: 105   [ # 5 ]

Fabrice (or anyone else who knows… smile ) , I’d like to know more about prebaking and lightmaps. I believe Lightmaps are when the shadows and highlights are rendered into the texture itself? Do you have any tips on where to start looking? The forums have not covered lightmaps in any detail.

Also, what is this “pre baking” you mention?

   

Avatar
Fabrice Closier, Administrator
Posted: 16 March 2012 11:06 PM   Total Posts: 1265   [ # 6 ]

Prebaked maps are regular diffusemaps (the basic image of your material) with the light information that affected the model at the moment you prebabked them. Therefor, they do not require this light runtime, and they will look like its lighted. As it happends before, at dev time, it doesn’t really matter if 1 or 10 minutes were required to render this map.
Downside is that the models need to be uniqually mapped, no faces area crosses another, and this means a shit load of data when you have a big model. Look at the good looking monster that Epic served us last week. All prebaked, looking extremely good, forever loading…

A lightmap however can be of lower quality, it has of course the same requirements as the fully prebaked maps regarding uvs’, but because its composited with a blendmode, the map “underneath” defines more or less the definition. You can save lots of space by having tiled(repeated) diffuse map with a low res LM, yet having great looking results. You also need to define in many cases the secondary uv set. Which is why it’s often a bridge too far for many. But it is really worth it.

   

Avatar
Baush, Sr. Member
Posted: 10 April 2012 04:56 PM   Total Posts: 135   [ # 7 ]

I have a scene with a terrain and trees (dynamically/randomly positionned), and I was wondering it I could generate a lightmap for my terrain at startup.

I wish to simply use the programmatically generated and blended result as a simple diffuse material for the terrain as opposed to having real-time shadows calculated on each frame.

Would this be possible?

   

synkarius, Member
Posted: 31 October 2012 04:59 AM   Total Posts: 64   [ # 8 ]

I too would like to know if Baush’s suggestion is possible.

   

Avatar
Baush, Sr. Member
Posted: 31 October 2012 10:42 AM   Total Posts: 135   [ # 9 ]

Old post, but I’m still wondering if it’s possible smile

   

Avatar
SharpEdge, Member
Posted: 11 December 2012 01:21 PM   Total Posts: 94   [ # 10 ]

In that case i would use dynamic shadows because Away3d can’t bake shadow (like udk with radiosity) so it would be useless to bake shadow at startup with away3d (no good shadow).

sorry for my english i’m hoping you’ve understood what i mean.

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X