|
I'd like to use a less detailed mesh to approximate the shadow cast by a highly detailed mesh. For example a character in the game would use a detailed mesh to render the character and a less detailed mesh to render the character's shadow. This approach would presumably speed up the shadow rendering pass.
(comments are locked)
|
|
What I do in such a case is to add a low detail object as shadow proxy to my scenes and assign an alpha cutout shader to it and pull the cutoff value up to full. This makes the shadow proxy object invisible to the camera but is still casting a shadow. Of course, you have to switch off 'receive shadow' on the proxy and 'cast shadow' on your high poly object to make this work the way it should. Sorry to resurrect this but try as I might I can not get this to work as you describe Whimsical. When I apply a transparent>cutout>diffuse the shadows of the proxy always disappear as the cutoff is ramped up. I need one object to be visible (& not cast shadows) while another is invisible (& casts proxy shadows). Hopefully someone can give me a point in the right direction. Cheers
Nov 14 '11 at 11:55 PM
adkkda
I also have trouble with this method but would quite like to be able to do this.
Jan 09 at 08:25 AM
Ludeme Games
(comments are locked)
|
|
I think there would need to be something like a Camera.OnRenderShadow function for that to work, but unfortunately there isn't. However, the shadows are already rendered without lighting or anything, so it's just polygons, which isn't much of a speedup except on very low-end cards. I have no experience with dealing with this. However, I must say that I saw this technique being used a LOT on the last generation of consoles. Even the PS2's best-looking series, God of War (including the 720p version on PS3) used extremely blocky geometry for shadows, at least on the main character. So if those guys used it, I'll have to assume it's worth doing sometimes. Then again, the PlayStation 2 is ten years old, so as Eric says, we're probably talking very low-end there.
Apr 15 '10 at 10:17 AM
Jessy
I really think that you are right with telling us that this will not speed up the shadow rendering process by a lot, but it does a bit. Filling polygons is still work, even though there's no light and anything rather complicated to do for the graphics hardware. But still, it has to fill those polys every frame. I had some high-poly-scenes where using this technique resulted in a 10% decrease of time taken to render each frame.
Jul 24 '10 at 06:56 AM
Whimsical
(comments are locked)
|

maybe this helps: http://answers.unity3d.com/questions/31087/shadow-on-plane-for-iphone.html