x


Is it possible to use a different mesh for shadow casting than for normal rendering of an object?

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.

more ▼

asked Apr 14 '10 at 09:57 PM

qhhh gravatar image

qhhh
124 8 8 13

(comments are locked)
10|3000 characters needed characters left

2 answers: sort voted first

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.

more ▼

answered Jul 24 '10 at 06:51 AM

Whimsical gravatar image

Whimsical
240 6 7 18

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)
10|3000 characters needed characters left

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.

more ▼

answered Apr 14 '10 at 11:20 PM

Eric5h5 gravatar image

Eric5h5
81.5k 42 133 529

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)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x504
x491
x355
x221

asked: Apr 14 '10 at 09:57 PM

Seen: 1728 times

Last Updated: Jan 09 at 08:25 AM