4 Replies - 641 Views - Last Post: 25 October 2014 - 06:23 AM Rate Topic: -----

#1 ben255  Icon User is offline

  • D.I.C Addict

Reputation: 39
  • View blog
  • Posts: 504
  • Joined: 09-September 13

blender tutorial needed for problem

Posted 24 October 2014 - 02:14 PM

so, is there any good tutorial for making custom collision meshes or what its called.
my issue atm is.
Spoiler

This post has been edited by ben255: 24 October 2014 - 02:16 PM

Is This A Good Question/Topic? 0
  • +

Replies To: blender tutorial needed for problem

#2 modi123_1  Icon User is online

  • Suitor #2
  • member icon



Reputation: 13758
  • View blog
  • Posts: 54,934
  • Joined: 12-June 08

Re: blender tutorial needed for problem

Posted 24 October 2014 - 02:23 PM

That's a little vague. Would you be more specific why a cursory search for "blender collision mesh" is not pulling up what you need?
Was This Post Helpful? 0
  • +
  • -

#3 ben255  Icon User is offline

  • D.I.C Addict

Reputation: 39
  • View blog
  • Posts: 504
  • Joined: 09-September 13

Re: blender tutorial needed for problem

Posted 24 October 2014 - 02:36 PM

ive watched vids on youtube, but they use only square shapes. and applying that knowlage to curves would make it bad
Was This Post Helpful? 0
  • +
  • -

#4 BBeck  Icon User is offline

  • Here to help.
  • member icon


Reputation: 792
  • View blog
  • Posts: 1,886
  • Joined: 24-April 12

Re: blender tutorial needed for problem

Posted 25 October 2014 - 05:39 AM

I haven't seen much of anything on collision detection.

Are you using Blender as a game engine, or are you exporting a model to something else? And if so, what?

Spheres are even more easy than collision boxes to implement.

For the wagon above you should probably have the wagon body as a parent of the wheels. Hacking my way through Blender's Python code I noticed that there may be something there for collision geometry for each sub-mesh. I'm in the process of writing my own custom Blender Python export script right now. So, I'm trying to figure out Blender's data structures and how to extract that data. I haven't specifically worried about collision detection yet because I'm just not there yet. But for a wagon like that, I might be inclined to define a collision sphere and a collision box for each sub-mesh and see if I could export that data.

One problem you would come across very quickly is that for a moving object you have to use OBBs (Oriented Bounding Boxes) for the collision detection. AABBs (Axis Aligned Bounding Boxes) are just not going to work on moving objects because by definition you cannot turn an AABB. If you used boxes to represent round wheels, it might be best to keep them flat against the ground rather than rotating with the wheel, but you still have to yaw the entire vehicle along with the wheels. So, you would pretty certainly need OBBs.

If you're worried about the shape of the collision geometry not matching the object, it just gets far more complicated after OBBs. OBBs are pretty ugly mathematically. After that, you're probably looking at collision hulls. You can check every single triangle in the object's geometry to see if another object intersects it. That could be a very expensive operation. I've never really seen it implemented. But I know that you can at least simplify that by making a collision object that is a greatly simplified version of the actual object.

So for the wagon wheels, for example, you could make a hexagon cylinder. That would not be as many triangles as the actual wheel geometry. That would be what they call a "collision hull" I believe.
Was This Post Helpful? 0
  • +
  • -

#5 ben255  Icon User is offline

  • D.I.C Addict

Reputation: 39
  • View blog
  • Posts: 504
  • Joined: 09-September 13

Re: blender tutorial needed for problem

Posted 25 October 2014 - 06:23 AM

im exporting it as ogre. The wheels atm are written as geometry in the game engine. I dont have to think much about collision detection or anything, i just add it as a physics body. Im using jmonkeyengine.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1