- Home /
Semi-Realtime Shadows - How would you do it?
We are doing a tycoon game, where the player has an ingame-editor to place objects into the scene. Some shadows on those objects would be nice, but obviously lightmap-baking is no solution as we have a dynamic positioning of the objects.
But once positioned the objects are static and won't move, so there is no need for "all the time shadow calculation" like the realtime shadows do it. (we're targeting webplayer low end performance).
I thought of maybe baking the shadows into a texture layer but then I would have no idea how to calculate the shadow silhouette..
Any thoughts, how would you do it?
Thanks & cheers
I have a similar problem. The scripting reference seems to suggest it's possible to script a lightmapping job (http://docs.unity3d.com/Documentation/ScriptReference/Lightmapping.html) but I'm not sure about performance.
Answer by $$anonymous$$ · Mar 08, 2012 at 11:40 PM
There is an add-on at asset store, have you taken a look at it?
http://gustavolsson.squarespace.com/shadow-volumes-toolkit/
http://forum.unity3d.com/threads/102079-Dynamic-shadows-in-Unity-Free-Pro-possibly-Mobile
I'll take a look at it, thanks! At first glimpse it looks like a similar solution to the built in shadow system, so there might be similar problems ;) I still don't realy need a realtime-shadow solution.
Answer by save · Mar 08, 2012 at 11:53 AM
Have a look at Character Shadow on the wiki. It uses projectors and render textures (which needs Unity Pro).
I think the solution with projector would be very performance hungry, caused by the fact that there will be about 100 gameobjects in the scene. And Projectors still update in realtime but thats where I'd like to get some performance, because it's not needed.
Could be a solution if there would be a way to bake projected materials, or at least batch projectors to reduce draw calls.. (Is there?)
Thanks anyway for the link, I didn't know that script! :)
Your answer
Follow this Question
Related Questions
Slower realtime shadow update speed? Possible? 1 Answer
Lightmapping Problem 0 Answers
Change Material VS Change Texture Performance 0 Answers