Jump to content

Shadow mapping?


Antumbra
 Share

You are about to reply to a thread that has been inactive for 3654 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

So is there anyway i can make a shadow map with lights instead of ambient occlusion? since ambient occlusion doesn't work with the scene lights. I don't wanna do ambient occlusion for shadow mapping cuz it doesn't work for me it's usually always all white or all black and it doesn't help. So I set up some lights in the scene and I really like the way the shadows and lights look on my object so is there anyway I can export it as a shadow map? here's a pic of my object with the lights on it. I really like the way the light hits it so is there anyway I can export it like that? with the lights on it and shadows on it? thanks!1148912_730833213614395_90034652_n.jpg

Link to comment
Share on other sites

Should be a way! :matte-motes-big-grin: but I'm pretty new to Blender and I still do that in 3DS Max.
I mean: If I can do it in 3DS Max, I'm pretty sure there is a way in Blender

 

PS: Sorry if I'm not giving you the answer or solution; but I wondered this myself, because I want to migrate to Blender asap.

Edit: This is what I found with a quick search. I'll bookmark this too for future reference :matte-motes-bashful-cute-2:

https://www.google.com.ar/#q=blender%20shadow%20map%20bake

Link to comment
Share on other sites

If you just want to bake shadows then choose Shadow instead of Ambient Occlusion from the Bake mode menu.

If you want to give Ambient Occlusion another try have a look at messages 3 and 4 from this thread

http://community.secondlife.com/t5/Mesh/Need-advice-buildings-in-blender/m-p/2368791#M24858

Set the samples to 5 then play around with Distance and Strength until you find something you like.

Try for example setting both Distance and Strength to 0.2 to start with and then increasing or decreasing one or the other of them and baking.

With the sample set to 5 it will only take a couple of seconds so experimenting won't take too long.

For the final bake bump up the Samples to 30 or more. This will take longer to bake but the resulting AO will be alot less grainy.

 

There is  something else you could try which involves making a copy of your mesh and and scaling it up a little. This will be like a shell surrounding your original mesh which will give the rays something more to bounce off of when baking the AO texture.

For a given Distance value in the Gather panel, the closer the shell is to the original the darker the AO will be. The farther away it is the lighter the AO will bake.

When scaling out the copy it is important to scale only along the normals. So instead of using the usual S shortcut key to scale use Alt + S.

Image 1 shows the original dress with light AO texture.

Image 2 shows the copy in edit mode after it has been scaled out a little. (You can just make out the top of the original dress if you look closely).

Image 3 the original dress selected in edit mode and ready to start doing some test bakings.

baking AO 1.png

 

Now do the first test bake. If it turns out black then reduce the Distance value until the bake result starts to become visible as in the image below.baking AO 4.png

Image 4 shows the result of the first bake with the distance set to 0.150. All test bakes are done with samples set at 5. Note both the original and the copy are using the same UV map so both take the result of the AO bake. This means what you see on the larger copy will also be on the original.

 

baking AO 5.png

Image 5 is the result of a slightly lower distance value. Its better but there shouldn't be those dark AO areas at the top of the dress.This is caused by the shell (copy) to close to the original. To lighten this area and darken the waist a little you need to edit the copy

 

baking AO 6.png

 Image 6. editing the shell (coppy). Here some edge loops have been selected and with Proportional editing enabled they are scaled out a tiny bit (scaled along normals Alt+ S) to increase the space between the original and the shell in this area.

Then a couple of the edge loops at the waist were selected and scaled in a fraction (scaled along normals) to decrease the distance between the shell and the original so that this area will have slightly darker AO when baked.

 

baking AO 7.png

 Image 7 shows the result of baking after editing the shell. Lighter bust, darker waist. The shell can be tweaked by selecting complete edge loops or individual vertices as necessary. Best to do tweaking with proportional editing enabled.

 

baking AO 8.png

Image 8, the final bake was done with samples set at 50. This takes a lot longer to bake but gives a lot less grainy AO texture.

So it really all depends on how much effort you are willing to put in to get the result you want  :)

 

 Edited to Add:

I just noticed that in the Ambient Occlusion panel the Factor is set to 0.09 in the above example. (A left over from previous experiments i guess). Anways I have now retried the final AO bake of the above with the Factor set to the default 1 value and it didn't appear to change anything. So I think its ok just to leave it at 1 .

  • Like 1
Link to comment
Share on other sites

Honestly 20+ Is ridiculous. You won't see much improvement past 16, and it takes substantially longer on any of the higher detailed bakes. If you really need to smooth a gaussion blur of .1 - 1 pixels will do the trick. Save yourself some time, baking at 50 takes a LONG time unless you're running a new high end processor.

 

ETA: Referring to sampling

Link to comment
Share on other sites

I think Antumbra is asking here how to generate a map that containts Ambient Occlution map, Shandow Map and Light Map composed together.

Shadow map can be generated using "Shadow" in Bake Mode options, but it will not bake you the scene lights, only the shadows that are caused by lights. Non-shadow areas will be pure white.

Instead, you might try to bake all these effects into one map using a Lambert Material with specular intensity set to zero and diffuse color set to 50 per cent gray (R 0.5, G 0.5, B 0.5). Environmental light could be 1.0 (to avoid totally black areas) and Ambient Occlution settings according to your needs. The baking itself should be made using bake mode "full render".


The generated map can be then multiplied or overlayed in Gimp or Photoshop on top of the diffuse texture.

 



 

 

 

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 3654 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...