Coder Social home page Coder Social logo

Trimesh to Trimesh Collisions about ode4j HOT 7 CLOSED

tzaeschke avatar tzaeschke commented on May 23, 2024
Trimesh to Trimesh Collisions

from ode4j.

Comments (7)

tzaeschke avatar tzaeschke commented on May 23, 2024

Sorry, I'm a bit confused, the title mentions trimesh-trimesh collision, but the question is about ragdoll?

I don;t have experience with modelling cars, but here are some thoughts. First, I think you could disable collision between ragdoll and Box, so the ragdoll could be put inside (even anchored to?) the box.
But then the ragdoll could still svere a lot to the sides, even outside the box. For more realistic physics, you could probably build a 'hollow' box out of five boxes, one for the floor and 4 for the sides.
But there may be smarter solutions.

You could also ask the question on the classic ODE forum. ODE doesn't have ragdolls, but they have a lot of experience and may be able to solve your problem.

Btw, please have a look at issue #30. I believe such questions should be made on a forum, so I think we should finally create one.

from ode4j.

jfelrod1960 avatar jfelrod1960 commented on May 23, 2024

Tilmann I'm sorry for the confusion. I want to use a trimesh geom for my vehicle. This will allow me to seat the pilot (which is a kinematic object) inside the open areas of the geom. But colliding with the other vehicles that are represented by a trimesh geom make performance degradation severe. I hope that clarifies. Now with that said I may try the hollow box suggestion and not use a trimesh.

from ode4j.

ppiastucki avatar ppiastucki commented on May 23, 2024

I am surprised as I have not really noticed such a severe performance degradation. See the following video for instance - https://vimeo.com/133474815. Suzie model I used consists of 564 vertices and 968 faces which is quite a lot for a collision mesh IMHO. Of course the performance drops at the end but there are 15 meshes colliding with each other. How complex is your car collision mesh then?

from ode4j.

jfelrod1960 avatar jfelrod1960 commented on May 23, 2024

@piotr-piastucki Sorry for the late response. I didn't see the email notification until last night. The model I use has 11022 vertices and 19679 faces. My game will have about 20 vehicles and the steering behavior framework should keep them from colliding as much with each other. I may have to get low poly versions of the vehicles. With box geoms they work well so I plan to follow Tilmann's advice. I would appreciate any suggestion you have. Thanks for replying. :)

from ode4j.

chriscamacho avatar chriscamacho commented on May 23, 2024

@jfelrod1960 you really need to have collision proxies - you shouldn't really be just throwing a complex triangle soup to a collision library, fine for detailed visual representations but crippling for collisions!

Make a limited number of primitive geometries (box etc) for the car proxy, if you want the driver to rag doll when you do a rapid brake, then only introduce the rag doll model when you determine a collision is violent enough to have ejected the driver from the car...

I have in the past used cylinders for tires for a 4x4 vehicle and even 64 triangles for tread mesh (32 rects made from tri's) any higher detail will lead to slow downs in any collision library.

This isn't really an ide4j bug - you're asking for basic advice on game programming...

from ode4j.

jfelrod1960 avatar jfelrod1960 commented on May 23, 2024

@chriscamacho Thanks for replying. I am new to game development so I appreciate the advice. I did enter this as an issue, but only to get some advice on optimizing trimesh to trimesh collisions. You are totally correct, this is not an ode4j bug. For now I'm just using a box geom for the vehicle. It would be cool to have a forum. Just my two cents. :)

from ode4j.

chriscamacho avatar chriscamacho commented on May 23, 2024

don't forget that a body can have mutiple geoms (shapes like boxes or spheres) and I'm sure that when Ode4J does get a forum there will be plenty of people happy to give advice...

from ode4j.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.