New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement a generic hull/trimesh collider format #533

Merged
merged 1 commit into from Jan 7, 2017

Conversation

Projects
None yet
4 participants
@Hoikas
Member

Hoikas commented Dec 28, 2016

PhysX requires all of its actors to have cooked mesh data. This cooked data is unfortunately not compatible with other versions of PhysX outside of the minor branch. The format is also largely unknown. Therefore, it is relevant to allow CWE prps to include an engine agnostic physical format to reduce our dependencies on proprietary libraries.

All PhysX blobs thankfully begin with the magic string NXS\x01, so we now abuse that by adding our own format that begins with the magic string HSP\x01. These blobs are cooked on the fly while already cooked blobs are passed directly on to PhysX.

@Hoikas Hoikas referenced this pull request Dec 28, 2016

Merged

Generic PXPhysical #82

@Hoikas Hoikas requested review from Deledrius and zrax Dec 28, 2016

Implement a generic hull/trimesh collider format
PhysX requires all of its actors to have cooked mesh data. This cooked
data is unfortunately not compatible with other versions of PhysX outside
of the minor branch. The format is also largely unknown. Therefore, it is
relevant to allow CWE prps to include an engine agnostic physical format
to reduce our dependencies on proprietary libraries.

All PhysX blobs thankfully begin with the magic string NXS\x01, so we now
abuse that by adding our own format that begins with the magic string
HSP\x01. These blobs are cooked on the fly while already cooked blobs are
passed directly on to PhysX.
@Hoikas

This comment has been minimized.

Show comment
Hide comment
@Hoikas

Hoikas Dec 28, 2016

Member

Changed the magic string to HSP\x01 ("HeadSpinPhysical) after discussion in IRC

Member

Hoikas commented Dec 28, 2016

Changed the magic string to HSP\x01 ("HeadSpinPhysical) after discussion in IRC

@zrax

zrax approved these changes Dec 29, 2016

I really like this idea -- it'll give us a lot more flexibility with PhysX libraries now and in the future.

fLog->AddLine("Initialized simulation mgr");
fLog->AddLine("Initialized PhysX SDK");
if (!NxInitCooking(nullptr, &gErrorStream)) {

This comment has been minimized.

@zrax

zrax Dec 29, 2016

Member

Does the normal PhysX client software include the cooking SDK libraries? If not, can they be redistributed?

@zrax

zrax Dec 29, 2016

Member

Does the normal PhysX client software include the cooking SDK libraries? If not, can they be redistributed?

This comment has been minimized.

@Hoikas

Hoikas Dec 29, 2016

Member

You have to redistribute NxCooking.dll with your app, which is what I've been doing with Korman. It works as long as the user has the legacy PhysX package installed 😄 I have not seen any prohibition on redistributing this file. I could be mistaken, however.

@Hoikas

Hoikas Dec 29, 2016

Member

You have to redistribute NxCooking.dll with your app, which is what I've been doing with Korman. It works as long as the user has the legacy PhysX package installed 😄 I have not seen any prohibition on redistributing this file. I could be mistaken, however.

This comment has been minimized.

@dpogue

dpogue Dec 29, 2016

Member

NxCooking.dll is distributed with MOUL

@dpogue

dpogue Dec 29, 2016

Member

NxCooking.dll is distributed with MOUL

@Deledrius

This looks like a sane and simple solution.

@Hoikas Hoikas merged commit fb7d1ad into H-uru:master Jan 7, 2017

@Hoikas Hoikas deleted the Hoikas:hax-physical branch Jan 7, 2017

@Hoikas Hoikas referenced this pull request Jan 16, 2017

Closed

Generic Physical R/W #319

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment