Page 1 of 4

PhysX Read/Write capability in libPlasma

PostPosted: Mon Feb 15, 2010 1:43 pm
by Robert The Rebuilder
I managed to incorporate reading and writing of the PhysX 'cooked' triangular meshes and convex hull meshes in plGenericPhysical. I wrote a wrapper class around the PhysX calls. The code I inserted into plGenericPhysical's IReadPXPhysical() and IWritePXPhysical() methods make use of the wrapper class, so no PhysX SDK code is in the libPlasma code base. I put the wrapper class's library and header files into a new subdirectory of 3rdPartyLibs.

To test this, I used prcdc before and after the modification to decompile some PRPs into XML files, then compared the two. They are identical, and there's no more of those "[003f:*] Size-Read difference" error messages. I also used PageConvert to generate a MOUL version of some simple POTS-exported ages; now it no longer complains about plPhysical not being supported.

I haven't yet tested this with PlasmaShop, namely because I'm still wrangling with qmake/nmake compiling. Also, I only have libraries for Windows; the nVidia PhysX SDK archives page only provides the Windows version for v2.6.4 (the one used by MOUL).

I wanted to know whether I should create a branch within the branches subdirectory of the Plasma SVN repository, or within Contrib. [Either way, I won't be able to check in the source code to the wrapper class, at least on an open code base.]

Re: PhysX Read/Write capability in libPlasma

PostPosted: Mon Feb 15, 2010 1:48 pm
by Paradox
If you have commit rights to the libPlasma repo, I'd toss them into contrib and I'll take a look at them.

One word for you here is "Awesome!", but Zrax had a few reservations about adding anything PhysX-specific to libPlasma. If you've got a solution that doesn't get us into GPL trouble, and wouldn't add PhysX asa dependency to libPlasma, I don't see any reason not to include it. :)

Re: PhysX Read/Write capability in libPlasma

PostPosted: Mon Feb 15, 2010 3:21 pm
by Robert The Rebuilder
Hmmm... I can't put anything into libPlasma's Contrib folder; I apparently don't have an account. [I tried making a branch of Plasma and placing it in Contrib. Don't know if SVN would allow that, since the 'branch' would include the Contrib folder, due to the lack of a 'trunk'.]

Since there's no access controls to PyPRP's contrib, should I put it there? It would be nice to make a branch within the libPlasma repository, since that way you can see which files I changed.

Re: PhysX Read/Write capability in libPlasma

PostPosted: Mon Feb 15, 2010 4:00 pm
by Trylon
Paradox wrote:If you've got a solution that doesn't get us into GPL trouble, and wouldn't add PhysX asa dependency to libPlasma, I don't see any reason not to include it. :)


You should be able to make a small license exception for the nvidia physx libary in the license to avoid GPL trouble (if all the devs agree on that of course). I ususally prefer LGPL to avoid those issues

Re: PhysX Read/Write capability in libPlasma

PostPosted: Mon Feb 15, 2010 4:02 pm
by Paradox
Robert The Rebuilder wrote:Hmmm... I can't put anything into libPlasma's Contrib folder; I apparently don't have an account. [I tried making a branch of Plasma and placing it in Contrib. Don't know if SVN would allow that, since the 'branch' would include the Contrib folder, due to the lack of a 'trunk'.]

Since there's no access controls to PyPRP's contrib, should I put it there? It would be nice to make a branch within the libPlasma repository, since that way you can see which files I changed.


You can email me the files/diff if you want and I'll commit it to contrib. Zrax is MIA at the moment, but send him a PM to set up an account.

Re: PhysX Read/Write capability in libPlasma

PostPosted: Mon Feb 15, 2010 5:45 pm
by Robert The Rebuilder
I just sent you a PM with a link to the files I modified. Note: the PhysXIO directory goes under core/3rdPartyLibs.

Regarding GPL: I really think you all need to change licenses. Because according to GPL, it does not allow you to link in Microsoft Visual Studio's C libraries (libcmt.lib or msvcrt.lib) without distributing the source code for them as well. They don't qualify as "system libraries" because they are not part of the operating system; they are part of the MS VS C/C++ development environment. If you were compiling this using an open source C++ compiler (e.g. GNU C++) then using their C libraries wouldn't be a problem.

Re: PhysX Read/Write capability in libPlasma

PostPosted: Mon Feb 15, 2010 5:50 pm
by Nadnerb
So I see that you didn't contribute any actual code. This is not an acceptable libPlasma contribution. sorry.

Re: PhysX Read/Write capability in libPlasma

PostPosted: Mon Feb 15, 2010 5:51 pm
by Branan
Robert The Rebuilder wrote:I just sent you a PM with a link to the files I modified. Note: the PhysXIO directory goes under core/3rdPartyLibs.

Regarding GPL: I really think you all need to change licenses. Because according to GPL, it does not allow you to link in Microsoft Visual Studio's C libraries (libcmt.lib or msvcrt.lib) without distributing the source code for them as well. They don't qualify as "system libraries" because they are not part of the operating system; they are only for MS VS C/C++ developers. If you were compiling this using an open source C++ compiler (e.g. GNU C++) then using their C libraries wouldn't be a problem.


From what I understand, "System Libraries" doesn't just mean "Operating system libraries" it means "any library needed to make compiling, linking, and running possible on a given compiler/OS combination". That includes msvcrt.dll, closed-source versions of the C++ runtime library from compiler vendors such as Intel, and a whole host of other minor libraries on a variety of systems.

EDIT: I am not a lawyer, of course.

Re: PhysX Read/Write capability in libPlasma

PostPosted: Mon Feb 15, 2010 6:02 pm
by Robert The Rebuilder
I believe you're right, Paladin - I stand corrected. Unfortunately, if the license doesn't change, then I cannot include my changes because nVidia prevents me from providing the source for the PhysX IO library.

Nadnerb: I'm not following you. If you'd like to see my contributions, I can PM them to you (except for the PhysX IO library I wrote).

Re: PhysX Read/Write capability in libPlasma

PostPosted: Mon Feb 15, 2010 6:04 pm
by Nadnerb
That won't be neccessary. Your "contributions" are available on the libPlasma svn for all who wish to see.