Ogre 1.0.0 Shadow : camera cause crash

The place for artists, modellers, level designers et al to discuss their approaches for creating content for OGRE.
Post Reply
alelink
Halfling
Posts: 54
Joined: Sun May 16, 2004 11:59 am
Location: Italy
Contact:

Ogre 1.0.0 Shadow : camera cause crash

Post by alelink »

Hello,
my simple app crashes when the camera is too close to a complex (25.000 poly) mesh with stencil shadow turned on.
The mesh cast and receive shadow corretly, but when the camera is too close to it (not in the shadow volume) the apps crashes.


It'a know bug of 1.0.0 or it's a problem with my mesh?

thanks
Alessandro
Crashy
Google Summer of Code Student
Google Summer of Code Student
Posts: 1005
Joined: Wed Jan 08, 2003 9:15 pm
Location: Lyon, France
x 49
Contact:

Post by Crashy »

I get some shadow distortion while looking too close at a high poly mesh with stencil shadows, but no crashes.
Follow la Moustache on Twitter or on Facebook
Image
User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19269
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
x 67
Contact:

Post by sinbad »

If your mesh requires 32-bit indexes, it won't work with stencil shadows. At that level of tesselation you you shouldn't be considering them anyway.
alelink
Halfling
Posts: 54
Joined: Sun May 16, 2004 11:59 am
Location: Italy
Contact:

Post by alelink »

Hello Sinbad, thanks for reply at this post.

My mesh is'n an heavy tassellated uniform mesh,
but it's a building made by more parts and the total number of poly is 45.000...

So how can I do? I must split it in more meshes and attach all of them to the same scenenode?
So there's a limit to the number of "casting shadow" edges?


thanks
User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19269
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
x 67
Contact:

Post by sinbad »

Definitely split things up - this will help with more than just shadows. There is a limit on the number of vertices (not polys) you can address (65,000) and we don't support 32-bit indexes (the solution to that) with stencil shadows, because it would complicate the shadow code more, and when you get to that level of geometry, stencil shadows are very inefficient since they are CPU-bound.

So split everything up, which will also have the advantage that you'll have less geometry generating shadow volumes each frame.
alelink
Halfling
Posts: 54
Joined: Sun May 16, 2004 11:59 am
Location: Italy
Contact:

Post by alelink »

thanks Sinbad 8)
User avatar
BlasterN
Gnome
Posts: 378
Joined: Thu Mar 24, 2005 1:07 am
Location: Spain
Contact:

Post by BlasterN »

Sinbad there is a way to render model's shadow with a specific LOD ??
( show LOD 0 & the shadow of LOD 3 for example )

maybe that helps to increase fps
Works:
MapToMesh | Bengine B9 @ www.sourceforge.net/projects/maptoogremesh/
3DWorldStudio exporter@ www.blastern.info
User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19269
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
x 67
Contact:

Post by sinbad »

Covered before. The mismatch of the shadow geometry of the caster would cause artefacts - they have to directly match to look right. By all means use LOD with stencil shadowed meshes though, it helps a lot (see Stunt Playground) - but the LODs have to be the same.
Post Reply