how to break down mesh object into primitives

The place for artists, modellers, level designers et al to discuss their approaches for creating content for OGRE.
Post Reply
User avatar
anear
Gnoblar
Posts: 11
Joined: Wed Jun 14, 2006 4:23 pm
Location: Jordanstown, UK

how to break down mesh object into primitives

Post by anear »

Hi,
I need to break down some complex mesh objects into primitives (cubes, spheres, cylinders, and convex sub-parts) and organise them into a group of shapes, because the physics engine I use (Novodex) requires primitives for collision geometry.

I'm not a professional artist and I use 3ds Max for modelling. Is there any tool in 3dsMax for this purpose? Any suggestions? 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 »

In my experience this is best done by hand. You can decide the trade-off between smaller numbers of proxies versus accuracy.
User avatar
xavier
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 9481
Joined: Fri Feb 18, 2005 2:03 am
Location: Dublin, CA, US
x 22

Re: how to break down mesh object into primitives

Post by xavier »

anear wrote:Hi,
I need to break down some complex mesh objects into primitives (cubes, spheres, cylinders, and convex sub-parts) and organise them into a group of shapes, because the physics engine I use (Novodex) requires primitives for collision geometry.

I'm not a professional artist and I use 3ds Max for modelling. Is there any tool in 3dsMax for this purpose? Any suggestions? Thanks.
Actually it is not true that Nx requires primitives. You can have Nx do the pmap proxy creation for you.

You should look into NxOgre if you are using Novodex with Ogre. It handles all of these details for you.

http://www.ogre3d.org/phpBB2addons/viewforum.php?f=6
User avatar
betajaen
OGRE Moderator
OGRE Moderator
Posts: 3447
Joined: Mon Jul 18, 2005 4:15 pm
Location: Wales, UK
x 58
Contact:

Post by betajaen »

He is using NxOgre, and NxOgre doesn't support pMaps. :wink:

On many occassions I've read the Aegia staff saying pMaps are slow and complicated and it would be better to use a group of primatives to make up a good approximation of the model.

I agree strongly with this, however without a real exporter your in the modeller matching boxes, convexes and spheres to certain parts of the model. Writing down the locations, positions and scale then converting into code.

It works, it's just a really slow process. :)
User avatar
xavier
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 9481
Joined: Fri Feb 18, 2005 2:03 am
Location: Dublin, CA, US
x 22

Post by xavier »

betajaen wrote:He is using NxOgre, and NxOgre doesn't support pMaps. :wink:
He didn't bother saying that.

What about this "Scythe" thing I've seen mentioned in the forums?
User avatar
betajaen
OGRE Moderator
OGRE Moderator
Posts: 3447
Joined: Mon Jul 18, 2005 4:15 pm
Location: Wales, UK
x 58
Contact:

Post by betajaen »

Scythe would work, but then you'd need to write a phs (it's file format) to NxOgre convert it over. Not exactly hard, but something to keep in mind.
User avatar
BlasterN
Gnome
Posts: 378
Joined: Thu Mar 24, 2005 1:07 am
Location: Spain
Contact:

Post by BlasterN »

I have an idea.

User the BoundingBox as the first primitive. divide the box into 4 and then again an again. using OPCODE/NxOgre you know if the BOX is inside or collide and then export the smallest box that collide to a xml or any format that you could import.

Now I'm search in Google "Decomposion" "complex mesh in primitives" and things like that. If I find something I'll post it.



Interesting threat.
Works:
MapToMesh | Bengine B9 @ www.sourceforge.net/projects/maptoogremesh/
3DWorldStudio exporter@ www.blastern.info
User avatar
BlasterN
Gnome
Posts: 378
Joined: Thu Mar 24, 2005 1:07 am
Location: Spain
Contact:

Post by BlasterN »

I found new info:

Hierarchical mesh segmentation based on fitting primitives (I like this one, no sources i try to find them but nothing, better for maps)
http://www.ima.ge.cnr.it/ima/personal/a ... eprint.pdf


Plumber: a method for a multi-scale decomposition of 3D shapes
into tubular primitives and bodies (I'm really lost with this paper, use skeleton to know the basic orientation of the tubes or something like that, better for models)
http://www.gvu.gatech.edu/~jarek/papers/Plumber.pdf


sleep time !
Works:
MapToMesh | Bengine B9 @ www.sourceforge.net/projects/maptoogremesh/
3DWorldStudio exporter@ www.blastern.info
Post Reply