Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Shared Track Objects
03-12-2011, 05:50 AM,
i think we do want that. trucks and trailers have the geometry origin set at their joint/hinge. so positioning them together should be easy. they'll have to not collide with each other somehow (not sure how feasible this is). and it also makes sense to specify a point on the ground for their location.

i've been thinking about adding a few racing seats to the carparts folder; and center_of_mass could be useful there as the seat's geometry origin will have to be around (exactly at) the drivers butt so that they will work visually on many cars. it's not as much of a difference as the truck & trailer. but the extra parameter will allow us to have mesh origins that line up nice visually (tested in blender) but have different centers of mass. should be useful when you rip the doors and bumpers off of the att too.
03-12-2011, 06:34 PM,
Quote:they'll have to not collide with each other somehow
It is possible to disable collisions for linked(joints) objects and object groups(using bit masks). I don't think it is really needed in this case. Bullet can deal with stacking of objects quite well. I think I'll have to enable concave shapes and decompose them into convex parts creating a compound shape. Need to check if bullet can do this for me.

Another feature are joints. It would be cool to have objects breaking away on collision. Not sure how to expose them to the user yet.

A completely different approach would be to support .bullet files. This would allow to setup track physics directly in blender or maya with all the fancy features bullet has to offer, but also would make us dependent on this tools.
03-17-2011, 10:08 AM,
Good news. Bullet supports concave objects and object decomposition. I need to do some profiling to pick the faster method. It also offers hull calculation. We could remove the shape parameter eventually. Need to test to see how well it works.
03-17-2011, 10:37 AM,
NaN Wrote:Bullet supports concave objects and object decomposition. ... It also offers hull calculation.

Wow, that is awesome.
03-26-2011, 08:36 PM,
Mesh: 162 verts
btConvexHullComputer: 34 verts
Manually: 10 verts

[Image: hullp.jpg]

The latest convex hull generator in bullet is very impressive(selected vertices in the image). A user on the other side might be able to reduce vertex count even more as he doesn't have to follow the same constraints.

I've been thinking about replacing the shape by a hull and optionally box section. It would mean some more work for the artist but also a maximum of control. Multiple hulls/boxes would define a concave body.
texture = trailer_red.png
model = trailer.joe
mass-center = 0.0, -4.5, 2.25
mass = 3000

0 = -1.176580, -6.594260, 0.324940
1 = 1.183840, -9.965520, 0.324940
2 = -1.167250, -9.968500, 3.816870
3 = 1.183840, -9.965520, 3.816870
4 = -1.181360, 1.005980, 3.804560
5 = 1.169740, 1.009020, 3.804560
6 = 1.174410, -6.594260, 0.324990
7 = -1.167250, -9.968500, 0.324940
8 = 1.169720, 1.019910, 1.101590
9 = -1.181360, 1.019830, 1.101590

#center =
#size =
(The hull vertex values are retrieved by exporting the mesh as hull.obj)
03-26-2011, 10:02 PM,
i think this should be pretty do-able. a composite mesh. mostly done with a bunch of boxes no texture coords makes it quick to generate.

with the trailer example we'd have a big 6-sided box for the main body. but the smaller box for the wheels, and the even smaller box for the stand. would we remove the top face since it's inside the main body? would that be useful performance wise?

if it would be useful; should the stand be more of a tri-angular prism? (wedge shape) starting on the ground with the point going well up into the main body. so it would have fewer faces to do collision checks with.
03-27-2011, 03:58 PM,
Hull, box and compound shapes are in trunk. Try to get stuck below the trailer with the F1-02. I haven't had time to fully test it. If you run into issues report.

texture = trailer_red.png
model = trailer.joe
mass-center = 0.0, -4.5, 2.25
mass = 3000

center = 0.0, -4.47, 2.45
size = 2.36, 10.98, 2.7

center = 0.0, -8.02, 0.56
size = 2.36, 2.21, 1.1

center = 0.0, -1.85, 0.56
size = 1.38, 0.18, 1.1

#0 = -1.176580, -6.594260, 0.324940
#1 = 1.183840, -9.965520, 0.324940

The box values have been retrieved using scaled cube shapes in blender. It should be possible to mix hulls with boxes (haven't tested it though).

Quote:would that be useful performance wise?
The performance depends on the number of vertices for hull and on the number of child shapes for the compound. They should be as few as possible. Box shapes should be always faster than hulls (haven't verified it).

I think I could use the same fracture code for compound track objects as for the cars to make them break (if I ever get to finish it).

Forum Jump:

Users browsing this thread: 1 Guest(s)