Question about mesh data

Yogr

17-11-2008 22:21:58

Hi guys!
I've just started practicing with Ogre and PhysX and I integrated te libraries without using NxOgre. I tried some colliding boxes and spheres and everithing works well.

I hope I'm doing the right steps: I create the actor with the rigid body and shape descriptors and I store a pointer of the scene node to the userData field; then, after each simulation step, I get the position and quaternion for each actor and I update the scene nodes.

Now I'm trying to use the triangle meshes... I know that I have to convert the ogre mesh in a triangleMesh, create the actor and then update its status, but I'm wondering if there exists a way to directly bind the mesh data to the NxActor so that when the physix engine ends its simulation steps the vertices will be automatically transformed... maybe using FDF vertex buffers?
What if my mesh vertices are morphed every frame? I have to convert the new vertices before every step and then apply back the results to te ogre mesh?

Bye!

nargil

17-11-2008 22:36:50

Have a look at nxOgre's ManualMesh. As for the morphing - no - you can't do thath. TriangleMeshes have to be static.

Yogr

17-11-2008 23:04:51

mmm... so if I provide a NxStream implementation I can create a triangle mesh from everything... isn't it?

About the morphing, the static triangle mesh restriction does absolutely make sense...!

Another little (and maybe stupid) question... is there any way to avoid the position and orientation update and bind the world position and the quaterion of a scene node with an NxActor?

Man the NxOgre website rocks! I haven't seen such an original site for years, and the download page is great! :D

betajaen

17-11-2008 23:06:43

Man the NxOgre website rocks! I haven't seen such an original site for years, and the download page is great! :D

It's very incomplete. But it has a very "unique" style.

nasirus1983

01-12-2008 08:01:57

Site design is oryginal, that is correct. But when we can get more details - samples (not only snippets), tutorials - whatever ? I've choose NxOgre for my project on my studies and now I have a lot of problems with finishing him (project). And the time is going and going ... and nothing can not stop it.
It will be nice if there will be even simple sample, with movement mesh and detecting collision - because about this, there is nothing on site or wherever.
Knowledge from forums is useless because only person who asking and person who answering are interested.

nargil

01-12-2008 11:19:29

You are really annoying ;/ Just use some intellisense, and take a look at the classes. You also need to know how to make something in physX - then look for coresponing NxOgre classes. If you need something more documented - use pure physX. You can mix NxOgre and pure PhysX code just by

NxOgreScene->getNxScene()
NxOgreWorld->getPhysXDriver()
NxOgreWorld->getSDK()

nasirus1983

01-12-2008 12:10:09

You are really annoying ;/ Just use some intellisense, and take a look at the classes. You also need to know how to make something in physX - then look for coresponing NxOgre classes. If you need something more documented - use pure physX. You can mix NxOgre and pure PhysX code just by

NxOgreScene->getNxScene()
NxOgreWorld->getPhysXDriver()
NxOgreWorld->getSDK()


You're so smart but just in theory on the forum. When I've asked you about detalis, you did not know much. Nay you said you even not implemented nothing. So I think your opinion is rather valueless :]

betajaen

01-12-2008 12:25:02

You're so smart but just in theory on the forum. When I've asked you about detalis, you did not know much. Nay you said you even not implemented nothing. So I think your opinion is rather valueless :]

Now your just being rude.

You can work from the forum posts, website and ask help from us, or you can just leave.

nasirus1983

01-12-2008 13:01:56

So please help me ...
http://www.ogre3d.org/phpBB2addons/viewtopic.php?t=8722 - here is the post. I'm still do not understand how to - too much theory, but I need some practice advice.

mcaden

01-12-2008 14:05:00

Theory? You're not being told theory, you're being told a good method with which you can solve your problem. What you seem to be upset about is that we're not going to code it for you. However, most of the things you're asking about are basic things that you need to understand fully. You asked about animated physics...you were given the best answer to your exact question, ragdolls (at least, the best that I know of), and you rejected it.

It does seem to me like you're overcomplicating things. As long as you're not trying to be extremely precise you can simply change the walking animation you're using based on whether you're in contact with the stairs. The stairs will be a static triangle mesh and you simply put in the collision code to tell the character he's on the stairs or not in onEndTouch and onStartTouch. You should be able to check character movement/orientation in relation to the orientation of the stairs actor to see if you're going upstairs or downstairs and play the appropriate animation.

Collisions - search the forums - easy to find but differs between 1.0 and 1.0'22T3+.
Animation - basic ogre stuff, not nxogre.
TriangleMesh - bake with flour - see flour post.

However, if you're going to want your character to have each foot exactly on a stair, in order, with realistic animation...you're talking a LOT of procedural animation and math which isn't so much physics related.

If you're having trouble with NxOgre do a search on the forums for "Tutorials".

nasirus1983

01-12-2008 14:45:29

Ok. First I'll write this things which I understand and know and maybe then I'll ask next questions. My mistake that I asked for a few things at once.

So. I've got now a class that creating entity, scene node and physical representation for mesh as body.
Movement is made by unbuffered key input by moving body (is this right way ?). So I move body (and mesh) forward, backward, left and right. When it touch cube (cube.mesh + body for it) on my scene it bounds. So I guess I'am on right way. But how to eliminate character mesh bounding (bigger mass ?) and start to check collisions ?