Search Home Members Contacts
About Us
Products
Downloads
Community
Support
Pages: [1]
  Print  
Author Topic: TVPhysics CreateStaticMeshBody chokes on some models  (Read 524 times)
Craigomatic
Customers
Community Member
*****
Posts: 78


« on: May 12, 2008, 07:26:47 PM »

Occasionally we will find that certain models cause the TVPhysics.CreateStaticMeshBody call to hang indefinately. It doesn't throw an exception, just gets to that call and sits there.

Code:
physicsID = Core.Physics.CreateStaticMeshBody(theMesh);

I can provide a model that causes it to fail if that will help?
Logged
jviper
Community Member
*
Posts: 1381

Discipline in training


« Reply #1 on: May 13, 2008, 07:24:06 AM »

What you want to do is check your debug, make sure the mesh is not empty, and the file you were trying to load into the mesh actually got loaded. Perhaps you could also post the mesh. Be great if your mesh is in .x text format, as I can read such file to see what's wrong.
Logged

JAbstract.....Don't just imagine, make it happen!
Craigomatic
Customers
Community Member
*****
Posts: 78


« Reply #2 on: May 13, 2008, 11:26:19 PM »

Everything loads correctly and there isn't an error in the log file. Physics is actually only applied when the app goes into a certain mode. The model (pool table) shows up as expected prior to this mode being activated.

After the mode is activated the CPU is pegged at 100%. It seems like the CreateStaticMeshBody algorithm is getting jammed.

The forum doesn't want to let me attach ("upload folder full") so here's a link to the model: http://rapidshare.com/files/114755390/pool_table.zip.html
Logged
vsleepy
Customers
Community Member
*****
Posts: 245


« Reply #3 on: May 15, 2008, 01:07:40 AM »

i too have noticed this. it especially happens if there is a void area in the mesh (eg terrain with hole punched), or if the mesh has groups of triaingles not touching, but single group.
Logged
darqSHADOW
Administrator
Community Member
*****
Posts: 2735


« Reply #4 on: May 15, 2008, 08:53:25 AM »

I'll test this model out and see what I can find.

John
Logged

TrueVision3D Project Manager
The fast and simple way of 3D development.
jviper
Community Member
*
Posts: 1381

Discipline in training


« Reply #5 on: May 15, 2008, 09:04:01 AM »

Actually, I notice that if you have a mesh with coincidental verticies (multiple verticies with the exact same position), the physics engine does not function right. One such object is This Cone. I've tested it and it crashes when used as a dynamic body. Don't know if it crashes as a static body.
Logged

JAbstract.....Don't just imagine, make it happen!
SylvainTV
Administrator
Community Member
*****
Posts: 4479


WWW
« Reply #6 on: May 15, 2008, 12:50:46 PM »

Well there is a Optimize parameter in CreateMeshBody.
Maybe try both ways, see if one works better than the other. The Optimize is maybe not working for several meshes. We can't control this though, it's done by Newton directly.
Logged

Regards

Sylvain Dupont
TrueVision3D Developer
sylvain@truevision3d.com

TV3D IRC at http://chat.truevision3d.com or on server irc.truevision3d.com #Truevision3D. Come talk with us !
Pages: [1]
  Print  
 
Jump to:  

Powered by SMF 1.1.3 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks