Page 1 of 1

Shadow map problem

Posted: Wed Jul 02, 2008 5:03 pm
by gugusm
Hey, I've got some problem with my shadow map. Whenever I select "Add Mesh Shading", shadows appear indeed, but they are just weird. There are some light spots on a flat terrain, also shadows of mountains are kinda ugly. I'll post some screenshots if you want to see it.

Oh, and it happens with my own map of course :wink: but even when I added mesh shading on a completely flat mesh (before implementing any displacement map), there appeared some shadows. I think that this whole shadow map thing is screwed up for me, or maybe that's my PC, heh, I don't know...

Posted: Thu Jul 03, 2008 2:58 am
by Graydon
Im curious, but if you open the mesh in loathing what does it have for the 'Lighting' setting?

Another thing you could try in Loathing is go under Maps--->Shadow Maps--->Unprotect All Submeshes

Then try Add Mesh Shading, see if you get any different results?

Posted: Thu Jul 03, 2008 7:29 am
by gugusm
You mean Lighting in Fear, right (meshes ---> Lighting)? Default is 'grassland' and I didn't change it. But it doesn't matter, I also tried 'long desert shadows' (or something like that) and the effect was the same. Unprotecting submeshes didn't help too. Maybe shadow map is depended on some other maps, displacement or something? I don't know.

EDIT: I think I just screwed up my displacement map, though it still seems a little bit strange for me. Well, I'll work on my displacement map again and see how it will be going.

Posted: Thu Jul 03, 2008 1:46 pm
by Graydon
The Shadow map is based directly on the displacement map.

However, you said you experienced trouble with shadows even applying them to a completely flat mesh.

What normally happens when you shade a flat mesh, is it goes from bright light, to well... shaded. It gets some tints darker. When you start displacing things, you just repeat the action and it adds shadows based on the hills you've made.

Shadows will be jagged if your hills are jagged. With the displacement tool, set it to Filter, then go into Edit--->Tool Preferences. Set it to 'Smoothing' with an area of effect rate of 3.0 or thereabouts. Try smoothing your displacement out somewhat and applying the shadows. See if they're smoother?

The only other thing I can think of is you havent indexed your colourmap properly, and its fucking the shadows up.

Cmap should be indexed to 240 colours...

Posted: Thu Jul 03, 2008 8:27 pm
by gugusm
Thanks for the tips Gray, but I know what was wrong. I fucked up something with water, I think water level was screwed or something... well, doesn't matter now, I solved it anyway. And yeah, my map is indexed to 240 colors. However some shadows on this map just doesn't look nice for mee, I don't know why, maybe my sight is just sick, cause whenever I look at the shadows on my other map, they seem to be cool there, heh I'm crazy... :wink:

But thanks again for your interest :)

Posted: Fri Jul 04, 2008 2:56 am
by Graydon
One other thing you can do, is let loathing set the shadows automatically like you've got it working to do now, then once its set, export the shadow map, and tweak it with something like the 'Levels' setting in photoshop. You can adjust how long/short/blurry/sharp your various shadows are by editing them in PS. Once you're done, save the file and reimport it. Experiment. :)

Posted: Fri Jul 04, 2008 8:26 am
by gugusm
Yeah, I did it once, but the effect was rather... hmm let's say disappointing :wink: