[SOLVED] Collision body incomplete

abhinavxrai

05-04-2006 12:31:29

Any suggestions on why this is happening and how can it be solved. I am using TreeCollision on the body. Any means through which we can increase this collision body size?

walaber

05-04-2006 17:55:55

wow, that's really weird. is that all 1 mesh attached to a single SceneNode?

abhinavxrai

05-04-2006 18:34:30

Hehe - yes walaber - that is all one mesh... it is a big mesh actually, but still. I dont see how TreeCollision can give such weird results.

If you notice, only one fourth of the mesh has the collision body + two other "buildings". Now that is what confuses me.

The mesh was created in Blender and then exported into Ogre.

danharibo

05-04-2006 19:36:02

i was gona say the newton world is too small but then i realized the buildings are ooutside the selected area

abhinavxrai

05-04-2006 20:56:26

You know what, that could be the case. I will check it tomorrow at work. But, if I remember, I did extend the Newton World. Not entirely sure though.

abhinavxrai

06-04-2006 06:22:14

Nope, I checked at work and my Newton world is quite huge in itself. Any other ideas why this is happening?


m_World->setWorldSize(Ogre::AxisAlignedBox(-100000,-100000,-100000,100000,100000,100000));

danharibo

06-04-2006 18:11:47

is it all one body? as in did you go into object mode to create rhe buildings?

abhinavxrai

06-04-2006 20:20:53

Yes, the entire mesh is one object and all done in edit mode of blender. So the entire "terrain" is just one HUGE mesh. While exporting, it was exported as one mesh.

However,when I use smaller meshes (with lot of noise) exported from blender, everything seems to work A-ok, its just with this particular mesh. Dont really know why?

I will try using smaller and less complicated meshes and scale them and see if it still works.

danharibo

06-04-2006 20:48:50

have you tried to re-export it? maybe there was an error?

abhinavxrai

06-04-2006 21:41:52

I havent tried that yet, but alas its the weekend here in Israel. First thing Sunday I will try that. Thanks for your concern and time. It is appericiated.

pfo

08-04-2006 09:20:17

Are you building the static collision with optimization? Try turning it off and see if you get the other faces. If so, you may have duplicate faces on top of each other in your mesh. I had this problem once and the tree collision optimizer seamed to eat my faces.

abhinavxrai

09-04-2006 07:22:36

So I replaced that with another basic terrain. It just has two huge walls and notice the difference.



Note: The lines outside the box are different bodies, each with a different collision body.

This terrain is about 4 times larger thant he previous one and still only 1/4th of the terrain has the collision body on it.

I havent turned off the optimization yet, however, my other smaller (much smaller) terrain models, exported from blender are working just perfectly fine with treecollision.

But I will still try pfo's suggestion and let you know

Thank you for your help!

abhinavxrai

09-04-2006 12:39:04

So I did many many things to try and fix this problem, but nothing worked. And then I think about pfo's comment and work on it. And the moment I turn optimizations off... voila problem solved. In fact by just looking at the number of triangles created, holy crap, it brought down my frame rate to 10 fps.



Anyhow, with optimizations off, the problem was solved. Koodos to pfo and thanks to walaber and danharibo for their time! I'm changing the title of this thread as solved. w00t!