Jump to content

  • Log In with Google      Sign In   
  • Create Account


Is the bullet engine compatible with d3d9?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
10 replies to this topic

#1 lucky6969b   Members   -  Reputation: 570

Like
0Likes
Like

Posted 13 December 2011 - 07:15 AM

Seems only support opengl. Any ideas? So sad, can't register to bullet's forum...
Also, How do I get started to interface with this library? How do I approach to use this library?

Thanks
Jack

Sponsor:

#2 kauna   Crossbones+   -  Reputation: 2277

Like
1Likes
Like

Posted 13 December 2011 - 08:39 AM

Seems only support opengl. Any ideas? So sad, can't register to bullet's forum...
Also, How do I get started to interface with this library? How do I approach to use this library?

Thanks
Jack


As far as I know, there is no reason that prevents you from using bullet with D3D9. Bullet works even with a console application without any graphic output. It is a another matter that the Bullet tutorials mostly use OpenGL.

There is a simple "hello world" application in the bullet web site which helps you set up the bullet API without worrying about graphics. It is a good approach to start there.

Edit : Look here for simple bullet program

Cheers!

#3 magicstix   Members   -  Reputation: 191

Like
1Likes
Like

Posted 13 December 2011 - 06:53 PM

I use bullet at work. It doesn't strictly *need* OpenGL unless you want to use its debug drawing functions (which I don't use, even though I use GL to visualize the data bullet produces). There's no reason you can't use it with D3D. IIRC though, one of the annoying things is that it won't build without opengl, even if you don't use the opengl functionality, though I'm not entirely sure about this (it may be that you only need the GL portion for building the examples).




#4 Hodgman   Moderators   -  Reputation: 28421

Like
3Likes
Like

Posted 13 December 2011 - 07:13 PM

Bullet is a physics API. D3D9 is a graphics API. They both do different tasks and have nothing in common.
You're free to connect the two together. There's no reason you couldn't.

#5 Krohm   Crossbones+   -  Reputation: 3011

Like
0Likes
Like

Posted 14 December 2011 - 01:14 AM

1. Seems only support opengl. Any ideas? 2. So sad, can't register to bullet's forum...
3. Also, How do I get started to interface with this library? 4. How do I approach to use this library?

  • You got your facts wrong and I have no idea how did you get into this line of thinking. As far as I remember, the core Bullet libraries have no gl calls at all. All debugging draw calls are wrapped trough a class interface.
    Only thing to keep in mind when using D3D is that the z axis is in the opposite direction bullet expects so you will have to keep this is mind when doing transformations or when fetching data to it.
  • I suppose it's a temporary problem. Don't worry too much however, traffic is rather low.
  • I strongly suggest BasicDemo (it drops some boxes to a basic plane). All demos have an init function which explains the bread and butter of scene building. Documentation is unfortunately still a bit inconsistent, the provided examples are going to be your main source of knowledge. Unfortunately, some are a bit old.
  • How does this question differs from previous? Anyway... there's a tick call (stepSimulation). You just call it and Bullet does everything for you. Static and dynamic objects are basically hassle-free. I'm having quite a few issues with kinematic objects however.


#6 lucky6969b   Members   -  Reputation: 570

Like
0Likes
Like

Posted 14 December 2011 - 08:01 AM

Hi, I also wonder if the engine is bound to certain space partition format. Like grid, polygons etc Or it just simply use the distance between objects without the knowledge of the underlying map format? Sorry, I am just a complete starter on the engine Thanks Jack

#7 Krohm   Crossbones+   -  Reputation: 3011

Like
0Likes
Like

Posted 15 December 2011 - 02:07 AM

The engine must, on creating the physics simulator, choose an appropriate broad phase (see CDTestFramework). This requires indeed some engine support as the Sweep-and-Prune algorithms require to know world's extents in advance. This is not much of a big problem but if you're on the run, just use the dynamic AABB tree. It does not need that information and it's the best for highly dynamic scenes.

Once the world is created, the program must fetch to bullet the various shapes used (see Collision Shapes) and then instance them in the world as rigid bodies. How you do that is only your business and Bullet does not care about it. Be warned it requires quite some work - do not even think about using raw grid/triangles/polygons/whatever, especially from graphics representation. The performance will just be painful - of course on your Core i7 you might still think it's "good", until you give your game to one of your friends who is not a computer science aficionado.

#8 lucky6969b   Members   -  Reputation: 570

Like
0Likes
Like

Posted 15 December 2011 - 05:16 AM

Just unsure how to get started incorporating the engine into my code base. I would consider it a software engineering practice rather than in technical rhymes A very daunting task for me. Let's take a break... :) Thanks Jack

#9 lucky6969b   Members   -  Reputation: 570

Like
0Likes
Like

Posted 26 December 2011 - 02:31 AM

Hi, Just came back after the Christmas holidays. Now I am thinking about the alignment between max objects that I export and the collision shapes that I generate from my program during run-time. Are there any good interfaces/utilities that automatically map object positions to the collision shape transformations? I find it quite painful to manually do that by hand. What is your way of doing it? Thanks Jack

#10 lucky6969b   Members   -  Reputation: 570

Like
0Likes
Like

Posted 26 December 2011 - 06:47 AM

One more question, I notice that there is a .bullet file exporter located somewhere at bullet engine web site. But this is only available to Maya users. I wonder, if it exists, the link for blender. Also, is it possible to export the mesh and collision shape in just one file without hassle? Many thanks in advance Jack

#11 Promit   Moderators   -  Reputation: 6327

Like
0Likes
Like

Posted 26 December 2011 - 09:10 AM

The only explicit reference to OpenGL in the Bullet physics stuff itself is the call to get the transform matrix for a rigid body. Luckily, GL and D3D matrices are identically laid out in memory, so you can just cast it to a D3D matrix and send it along its merry way.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS