Advertisement

Licensing Code Releases using Bullet 3D

Started by March 02, 2013 11:48 AM
7 comments, last by grhodes_at_work 11 years, 9 months ago

I've decided to go away from using my own physics code, and go with a 3D physics that's suitable that does its job much better than my code can. I'd like to use Bullet 3D and integrate it into my code, which shouldn't be too much of a hassle, however, I'd also like to release my code and video tutorials on how to use it for others.

I have no clue on what type of license to put it under, but my goal is for it to be free so it can grow with others' input. The problem is that it would eventually require a specific version Bullet 3D to build, which currently uses the zlib license. Would I be able to include Bullet's source code in my releases?

I will also be supporting 2D, and I'd like to incorporate Box2D into my sprite system under-the-hood. It's also got a similar free-license, but would I be able to include it in my released builds, or would I have to provide a link for the specific version it's built for, and give additional instructions on how to set it up?

Congratulations for your decision!

As far as I understand, yes, you can include Bullet source in your releases. You can even include a modified version of it (but I strongly suggest against doing so), as long as you state it's modified.

The only thing you cannot do is (in short) claim it's yours. But if you modify it you can say "those pieces of code are mine" (it's considered quite gross).

Anyway, it's really short.

I don't know about Box2D, I'm afraid you will have your world of problems trying to make the two cooperate. Bullet can be reduced to 2D operation by using some functions I don't remember, something involving locking an axis so objects won't rotate. Check out the documentation, I'm sorry but I don't remember much about this.

Previously "Krohm"

Advertisement

Bullet 3D will be used for 3D scenes, but Box2D will be strictly for my 2D stuff, which is all managed by the engine separately.

Alright, great. I may have to add some methods to Bullet's matrix class just to make it match up with my engine's matrix system, or just replace my matrix system with Bullet's, but credit will be given where it's due!

Thanks for pointing that out.

You shouldn't have to modify Bullet if you use object oriented programming to extend the library classes using inheritance.

Not really true - lots of stuff in bullet is non virtual on purpose for performance reasons, I've found it's definitely much easier just to add stuff in directly and a lot of people seem to have custom bullet builds.

Not really true - lots of stuff in bullet is non virtual on purpose for performance reasons, I've found it's definitely much easier just to add stuff in directly and a lot of people seem to have custom bullet builds.

Ok, I'll humor you. Which classes have non-virtual destructors? It's a bit difficult to go through all the header files searching for them. Also I would like to point out if you absolutely had to extend a class in Bullet that did not have a virtual destructor, you could add the word virtual to the library and still keep the larger modification outside the library.

Advertisement

Sorry, wasn't trying to be argumentitive, and I agree that inheriting is definitely a good way to access Bullet. When I've used it myself (mainly through my XNA port) I've often found it easier to change some of the source directly as the Bullet code has been written by different people with different ways of exposing data (some classes have public access to member variables, others only via accessors, some data sees to me to exist at the wrong level (e.g btMotionState only on rigid bodies),etc). Most of this could probably be cleared up by extending the classes but sometimes it's nicer just to fix it directly.

Sorry, wasn't trying to be argumentitive, and I agree that inheriting is definitely a good way to access Bullet. When I've used it myself (mainly through my XNA port) I've often found it easier to change some of the source directly as the Bullet code has been written by different people with different ways of exposing data (some classes have public access to member variables, others only via accessors, some data sees to me to exist at the wrong level (e.g btMotionState only on rigid bodies),etc). Most of this could probably be cleared up by extending the classes but sometimes it's nicer just to fix it directly.

No worries :) Of course a good "open source citizen" would push their helpful changes back to the Bullet community :)

Open source licensing can be tricky. I would at least be careful to understand ALL of the licenses involved, not just the main Bullet license. (For example, the full Bullet distribution includes binaries for GLUT, which is not open source, and GLEW, and maybe other things...I don't know what the license are for those.) One safe approach would be to release your code without Bullet, but include a README file that has a URL link where people can go to find Bullet and its dependencies for themselves. Just make sure you cover all your bases and make sure you know about everything that is there, what the exact terms and requirements are, before you release anything. And keep GOOD documentation on what you are doing and why. If you had good funding for your project, it wouldn't hurt to consult with an open source/intellectual property rights lawyer, just in case. But of course lots of people release open source without legal council.

Graham

Graham Rhodes Moderator, Math & Physics forum @ gamedev.net

This topic is closed to new replies.

Advertisement