How to genreate edge lists for a mesh?

Problems building or running the engine, queries about how to use features etc.
playerwing
Gnoblar
Posts: 20
Joined: Fri Nov 19, 2004 9:48 am

How to genreate edge lists for a mesh?

Post by playerwing »

I have some problems of edge lists, I wanna use them to generate stencil shadow.....

1) How to generate edge lists of a mesh manually?

2)How to assoicate edge lists to a mesh ?

Please help me! :cry:
Last edited by playerwing on Tue Jan 18, 2005 4:15 am, edited 1 time in total.
AssiDragon
Greenskin
Posts: 145
Joined: Wed Apr 28, 2004 12:10 pm
Location: Hungary

Post by AssiDragon »

Now I probably shouldn't say this after my lame thread just below this one, but this question has been raised like... many times. ^_^
http://ogrewiki.digitalsentience.com/in ... VertexData

And why not make OGRE do the stencil shadows? :/
Hope is the first step on the road to disappointment.
playerwing
Gnoblar
Posts: 20
Joined: Fri Nov 19, 2004 9:48 am

Post by playerwing »

Thank you.

My mesh file has not edge lists, but OGRE do the stencil shadow need it.
I wanna try generate edge lists......

help help........ :cry:
User avatar
monster
OGRE Community Helper
OGRE Community Helper
Posts: 1098
Joined: Mon Sep 22, 2003 2:40 am
Location: Melbourne, Australia

Post by monster »

So, you mean you have a mesh which you would like to cast stencil shadows, but the edge lists haven't been built?

In which case, just call "buildEdgeList" on the mesh and Ogre will do it for you.

Or, do you mean you want to manually calculate the edge lists? In which case, don't. Let Ogre do it for you, see above.

If you still want to create the edge lists yourself, then look at the Ogre code and see how it's done there, then plug in whatever calculation methods you like.
playerwing
Gnoblar
Posts: 20
Joined: Fri Nov 19, 2004 9:48 am

Post by playerwing »

Thank you Monster!!!! 8)

I have called Mesh::buildEdgeList(), but I can not see shadow yet.
( I use Demo_Shadows ( Ogre sample ) to test Mesh::bulidEdgeList(), still failed.)

why...?

Code: Select all

-----------------------------------
Details:
-----------------------------------
Error #: 6
Function: EdgeListBuilder::createEdge
Description: Edge is shared by too many triangles. 
File: D:\My Space\OGRE\ogrenew_CVS\OgreMain\src\OgreEdgeListBuilder.cpp
Line: 468
Stack unwinding: <<beginning of stack>>
11:50:40: RECOVERY: attempting to find valid hull by assuming all individual submeshes are manifold with their own geometry...
11:50:40: An exception has been thrown!


-----------------------------------
Details:
-----------------------------------
Error #: 6
Function: EdgeListBuilder::createEdge
Description: Edge is shared by too many triangles. 
File: D:\My Space\OGRE\ogrenew_CVS\OgreMain\src\OgreEdgeListBuilder.cpp
Line: 468
Stack unwinding: <<beginning of stack>>
11:50:40: WARNING: edge calculation process detected ambiguous hull. This is almost certainly going to result in stencil shadow artefacts.
AssiDragon
Greenskin
Posts: 145
Joined: Wed Apr 28, 2004 12:10 pm
Location: Hungary

Post by AssiDragon »

As far as I know, that message is thrown when you have edge(s) in the modell that have more than two triangles.
Hope is the first step on the road to disappointment.
playerwing
Gnoblar
Posts: 20
Joined: Fri Nov 19, 2004 9:48 am

Post by playerwing »

:wink: thanks
User avatar
Banania
Gremlin
Posts: 150
Joined: Wed Oct 20, 2004 2:35 pm
Location: Paris, France

Post by Banania »

maybe you can try Ogre 0.15.2. I understand there were some improvements to the edge list building.
Banania
playerwing
Gnoblar
Posts: 20
Joined: Fri Nov 19, 2004 9:48 am

Post by playerwing »

thank you~~~~~!! :)