Physx xml or binary import from 3dsmax

Hi, All

I’m a new to PhysX and have a newbie question regarding importing objects into PhysX SDK. I’m using 3ds max 2013, create a simple scene and use Export menu, where I select the 'PhysX and APEX (PXPROJ)’ file format to export the scene to.
In PhysX SDK I use the following code which fails to load the exported data into SDK:
PxPhysics& physics = getPhysics();
PxScene& scene = getActiveScene();
PxCollection
buffers = physics.createCollection();
PxCollection* objects = physics.createCollection();
PxDefaultFileInputData data( “c:\Projects\RoboPhysx\3dsMaxModels\box.xml” );
assert( data.isValid() );
assert( repx::deserializeFromRepX( data, physics, getCooking(), NULL, NULL, *buffers, *objects, NULL ) == repx::RepXErrorCode::eSuccess );
physics.addCollection( *buffers, scene );
physics.addCollection( *objects, scene );
objects->release();
buffers->release();

I tried to use the export from 3dsmax to Xml or Binary or loading Fbx file format without success. I’m using Physx SDK 3.2.3 and PhysX plugin for 3dsmax 2.86. Obviously it seems I’m trying to do something wrong because RepX seems do not support the xml or binary exported format. I have neither found an info or tutorial showing how to perform exporting of objects from 3dsmax and sample code for importing into PhysX SDK. I will be glad if you point me to some info regarding the subject.

Thanks for you help.

Hi,

I’ll try to find a snippet sample for you.

Thanks,
Mike

Hi Mike,

Any news on the subject? By the way I have found that wavefront *.obj file can be properly exported from 3dsmax and then imported into Physx using WavefrontObj class, after that the object may be reconstructed in the engine. Is it the proper way of doing export/import and if so then why is there an option to export into Physx *.PxProj file format?

Thanks,
Vitaly

Hello :)

Any news on the subject?
I would like to use “Export MassFX Scene” in 3d max 2015 - it is possible to export the scene as xml or binary.
How can I import it with the PhysX SDK?

I found:
https://developer.nvidia.com/sites/default/files/akamai/physx/Manual/Serialization.html

There is the code sample:
PxPhysics* physics; // The physics SDK object
PxSerializationRegistry* registry; // Registry for Serializable types
PxCooking* cooking; // Cooking library needed for instantiating objects by repx

// Deserialize

// Binary
void* memory128 = …; // A 128-byte aligned buffer previously loaded from disk by the user
PxCollection* collection = PxSerialization::createCollectionFromBinary(memory128, *registry);
//~Binary

// RepX
PxInputData& inputData = …; // Implemented by the application
PxCollection* collection = PxSerialization::createCollectionFromXml(inputData, *cooking, *registry);
//~RepX

PxScene* scene; // The scene object
scene->addCollection(*collection);
collection->release();
registry->release();

I don’t know how to use “memory128 A 128-byte aligned buffer previously loaded from” and link it with my scene file from 3ds max… Does anybody know how to implement it?

Thanks :)

Hi,
I also encountered a similar problem. After checking a lot of information, I couldn’t find the relevant code on how to import FBX, OBJ, XML and other model files into PhysX. I want to know if there are any relevant snippet in the PhysX4.1 SDK or what can I do to import the model into PhysX?
Thanks for your help

The PhysX SDK doesn’t provide any such import capabilities as part of its own feature set. We did have 3DS Max plugins many years ago but they are completely obsolete now. We plan to provide such interoperability as part of our Omniverse effort going forward, using the USD format.