CreateDynamics Changes
with Release #9: December 29, 2006
Changes:
- Revised version of NxuStream
- Minor
bug fixes, additional support for soft bodies.
- Added
new feature to read EZ-Mesh files with embedded tetrahedral meshes.
- Key/Value
pair processing functions made available to interpret the contents of the
‘userProperties’ fields. Used to bind graphics to physics
content on the fly.
- New System Software installer
compatible with 2.6.2
- A
new system softer installer ‘PhysX_6.12.02_SystemSoftware.exe’ was
included so that this version can run against the latest SDK release.
- Completely Re-written PhysXViewer application
- A
completely new version of the PhysXViewer was
written on top of the DirectX Sample Framework. This is a much smaller code base and
should allow developers to make their own applications by using it as a
shell.
- Many
new features including mouse dragging, debug visualization, and rigid
body shape visualization.
- Lots
of support for tetrahedral soft bodies (2.7.0 SDK only) as well as
skinned meshes.
- Requires
the October 2006 release of the DirectX SDK to build.
- Introduction of the SoftBody library
- The SoftBody library is a source code library that should
help developers learn how to integrate soft bodies, nxustream,
as well as skinned meshes into their own games.
- NOTE:
SoftBodies are only available with
the 2.7.0 SDK release. This SDK
release is not yet publicly available so you will not be able to
experiment with this functionality.
As soon as the 2.7.0 SDK is officially released the CreateDynamics download will be revised to include
it.
- Improvements to skeleton pruning
- A
new algorithm has been introduced to automatically prune skeletal
meshes. It does this based on
examining the individual bone weightings as well as the volume of each
mesh section. If there are too few
vertices assigned to a bone or the volume it encompasses too small then
that bone is removed from the skeleton.
There are now sliders on the dynamics page that let you adjust the
minimum number of vertices and the minimum volume required to keep a bone
in the skeleton. This technique
works well but if so much of the skeleton is removed there are large gaps
it appears to produce poor behavior.
I am still researching this.
- Support
for auto-generated constraints.
With this version you can experiment with automatically generated
skeletal systems. This should be
performed on static objects. There
is a flaw in the algorithm in that if the merge threshold is high it will
fail to detect a constraint. I am
still working on fixing this bug.
However, for now, it is just as well to experiment while having
the merge option disabled.
- Import
a simple static object, like a chair.
- Move
the decomposition depth to 3 or 4.
- Click
the checkbox to ‘disable concavity check’
- Click
the checkbox to ‘disable merge’
- Click
the checkbox to ‘auto-generate constraints’
- Now
select ‘createdynamics’
- Your
object should now have been turned into a skinned mesh.
- Improvements to ConvexDecomposition
- A
bug was found that caused some split triangles to be in error. This is now fixed and the convex
decomposition works better.
- A
lot of work went into trying to perform a CSG split during the
decomposition phase. However, this
has proven to be very difficult to implement and is currently
disabled.
- Option to enable fixed joints and
breakable joints.
- On
the constraints page you can now specific a ‘fixed’ joint as an option.
- In
concert with this you can select the checkbox ‘breakable joint’.
- If
you enable these two options and then auto-generate a constrained mesh,
you will find that the object can be ‘broken’ when you shoot at it with a
large sphere.
- Note
that when you enable this option the graphics rendering of the original
object will not be available. This
is due to the fact that the original graphics object would have to be
broken up into many individual graphics pieces. This is something I want to do, but it
is not available yet.
- MeshFW prototype 3D Studio Max plug-in
included.
- A 3d
studio max plugin that provides the convex
decomposition tool directly inside 3d Studio max is included in the tools
folder.
- As
before, this is still a work in progress as I have not been able to get a
transform bug fixed. I hope to
update this soon.
- Directory Layout Completely New
- Since
the code has been completely refactored the
directory layout is all new. Here
is how the directory layout is designed now.
DIRECTORY
STRUCTURE WITH DECEMBER 29, 2006 RELEASE
\Production : Root folder,
launch batch files.
..\Samples : Contains the
source and run-time for PhysXViewer
..\..\PhysXViewer : Contains source and
run-time for PhysXViewer
..\..\PhysXViewer\documentation : Constains
various doc files
..\..\PhysXViewer\src
: Source to the PhysXViewer application.
..\..\PhysXViewer\src\common
: Contains the DirectX9.0 GUI
for samples.
..\..\PhysXViewer\src\tui : Utility code for the text user
interface
..\..\PhysXViewer\PhysXViewer262
: Executable for the 2.6.2 version.
..\..\PhysXViewer\PhysXViewer270
: Executable for the 2.7.0 version.
..\..\PhysXViewer\media : Data assets used by PhysXViewer
..\..\PhysXViewer\compiler : Workspaces for .NET 2003 and
2005
..\..\PhysXViewer\compiler\xpj
: Scripts to generate the
workspaces
..\..\PhysXViewer\compiler\vc71win32
: Workspace for .NET2003
..\..\PhysXViewer\compiler\vc8win32
: Workspace for .NET2005
..\tools : Source code
libraries, NxuStream, SoftBody,
CreateDynamics
..\tools\nxustream2 : Source to the latest
version of NxuStream
..\tools\SoftBody
: Source to the soft
body library used by PhysXViewer
..\tools\CreateDynamics
: Source to build the CreateDynamics DLL
..\tools\CreateDynamics\AutoPhysX
: Source to autogenerate
physics models.
..\tools\CreateDynamics\ConvexDecomposition : ConvexDecomposition library.
..\tools\CreateDynamics\CreateDynamics
: Workspace to build the DLL
..\tools\CreateDynamics\CreateDynamicsStandalone :
Console version
..\tools\CreateDynamics\granny
: granny header and lib
(licensees only)
..\tools\CreateDynamics\GrannyPhysX
: The run-time Granny PhysX library
..\tools\CreateDynamics\grimp
: A generic granny mesh importer
(licenees only)
..\tools\CreateDynamics\MeshEZM
: EZ-Mesh importer.
..\tools\CreateDynamics\psk
: Unreal PSK importer
..\tools\CreateDynamics\snippets
: Shared utility source
..\tools\CreateDynamics\TinyXML
: The TinyXML
parser
..\tools\MeshFw : Contains the
prototype 3d studio max plugin for convex
decomposition
CreateDynamics Changes
with Release #8: November 10, 2006
Changes:
- Revised version of NxuStream
- Minor
bug fixes, added support for
soft bodies.
- New System Software installer
compatible with 2.6.2
- A
new system softer installer ‘PhysX_6.11.01_SystemSoftware.exe’ was
included so that this version can run against the latest SDK release.
- New executable folder and launch batch
files.
- The
old executable folder ‘CreateDynamics’ still exists
and runs against the 2.4.4 public release SDK.
- A
new executable folder has been created called ‘CreateDynamics262’ which
contains binaries compatible with the 2.6.2 release of the PhysX SDK.
- To run
the 2.4.4 version of the modified rocket application launch ‘CreateDynamics.bat’
- To
run the 2.4.4 version of the PhysXViewer
application (source code provided) run ‘PhysXViewer.bat’
- To
run the 2.6.2 version of the modified rocket application launch ‘CreateDynamics262.bat’
- To
run the 2.6.2 version of the PhysXViewer
application (source code provided) run ‘PhysXViewer262.bat’
- New build configurations
- If
you are a licensee and have access to the official 2.6.2 SDK then you can
now build the PhysXViewer source code. When you load the solution file \CreateDynamics\src\PhysXViewer\PhysXViewer.sln you
will see that there are two new build configurations that target the
2.6.2 SDK.
- The
default ‘debug’ and ‘release’ configurations still target the 2.4.4
public SDK.
- A Note about the PhysXViewer
- The
purpose of the PhysXViewer is to be an open
source application that is the ‘official’ tool to view NxuStream data exported from Max, Maya, or from your
own product.
- Currently
it can import NxuStream files in XML, binary,
and COLLADA.
- I
have been unable to spend the time on this tool that I would have
liked. It does not currently have
mouse dragging, debug visualization, or graphics bindings. These are fairly essential for this to
be a usable tool.
- You
can run the CreateDynamics toolkit however and
load and save data.
- The
reason the source is included is as a learning tool. All of the source
have now been placed in distinct libraries with minimal
dependencies.
CreateDynamics Changes
with Release #7: October 12, 2006
Changes:
- Revised version of NxuStream
- This
version now uses auto-generated serialization code. It has been thoroughly tested against
all versions of the PhysX SDK 2.6.0 and higher.
- There
is much improved documentation.
- The auto-generated
schema should be much easier to iterate on.
- Fixed
bugs related to CCD skeleton serialization.
- There
were numerous cleanups done to the syntax of the XML layout. Since the old version was created
manually it also suffered from manual errors. The new version is in perfect
one-to-one correspondence with the SDK using object mirroring.
- In
case anyone has created content with the previous version of NxuStream this revision maintains backwards
compatibility with the format of the last release. However, it is recommended that you
recreate your assets if that is easy for you to do.
- DecomposeSample revised to reflect latest NxuStream format.
- AutoPhysics : Accumulate.cpp revised to
reflect the latest NxuStream format.
- New Demo Applications
- CreateDynamicsStandalone : Demonstrates how to use the Create Dynamics tool
directly as source code and shows, by example, how you could hook it up
to your own file format pipeline.
Also demonstrates how to read EZ-meshes (samples provided) that
handle full skeletal meshes and even animation channels.
- MakeSchema : This source is not really for public
consumption. It is only included
for educational purposes. This
code auto-generates the NxuStream serialization
code. It reads a template file
called ‘schema.csv’ which describes all of the
data elements in the PhysX SDK and then
produces the serialization code ‘NXU_Schema.h’
and ‘NXU_Schema.cpp’
- MeshEZM : The EZ-mesh importer extracted as a stand-alone
library. Dependencies are
‘snippets’ and ‘TinyXML’. EZ-Mesh is a very simplistic 3d
graphics file format in XML. It is
sophisticated enough that it handles skeletons, animation data, mesh deformation, two channels of UVs,
texture assignments, and node instancing.
Sample files are provided.
This code can be modified easily to match your own file format and
added as a new mesh importer for the create dynamics toolkit. See ‘CreateDynamicsStandalone’
for how to do this.
- MeshFW : This is a 3d Studio Max plug-in that exposes support for the convex decomposition library. It is a work in progress and is not
fully complete, though you can play with it. Box fitting, sphere fitting, capsule
fitting, and various output file format support
is going to be added.
- NxuStream : Largely refactored source
for NxuStream serialization. The files NXU_Schema.cpp
and NXU_Schema.h are auto-generated from the MakeSchema tool.
The file NXU_SchemaStream.cpp and NXU_SchemaStream.h handles reading and writing data
either in binary or XML format as well as maintaining backwards
compatibility with the previous release of NxuStream. If you do not care about compatibility
with the previous release you can change the #define OLD_FORMAT from 1 to
0 in NXU_SchemaStream.cpp
- PhysXRagdoll : Is a small console app that demonstrates how to use
the CreateDynamics toolkit as a plug-in DLL
rather than as raw source code.
- PhysXViewer: This application is going
to become the official viewer for NxuStream and
COLLADA physics data.
Unfortunately not enough time has been spent on it yet to make it
truly usable. With this release
this should allow further development of this application to include
mouse dragging, debug visualization, and better Granny support.
- GrannyPhysX: Has been revised to compatible
with the latest drop of NxuStream
- Samples:
This folder contains a PhysX SDK sample that
shows how to load, save, instantiate, and build physics collections with NxuStream. The
solution file is in
\CreateDynamics\src\Samples\SampleSceneExport\compiler\vc7\SampleSceneExport.sln
- To
build any source code that uses the PhysX SDK
requires that you have installed the 2.4.4 SDK into the default
directory. The 2.4.4 PhysX SDK is publicly available on the Ageia website.
- Documentation
- Documentation
is in \CreateDynamics\docs.
- ChangeList.doc
: This file contain a list of changes with each release.
- NxuStream.chm: Contains documentation for the
NxuStream API (NXU_Helper.h)
and also the class diagrams for the serialization library (NXU_Schema.h)
- Schema.csv : The data template that is used
to auto generate NXU_Schema.h and NXU_Schema.cpp
- An
Excel version of the same template nicely formatted.
- The
CreateDynamics Toolkit.doc :
The original documentation for this toolkit. Not recently revised.
- The
NxuStream FAQ.doc and HTML: General
information about NxuStream.
·
What’s coming up next?
o
More integration
of features in Max and Maya plugins.
o
Improvements to PhysXViewer such as mouse dragging, debug visualization,
and better Granny integration.
o
Improved
interface to tweak individual bones in a skeletal hierarchy.
o
The ability to derive
joint limits from a reference animation.
o
The ability to
apply a drive model to a granny skeleton using the GrannyPhysX
library.
o
Improvements to
the convex decomposition library so that it generates internal faces. This will prevent crash problems and produce
better quality compound shapes.
CreateDynamics Changes
with Release #6: August 31, 2006:
Changes:
- Revised
version of NxuStream
- Many
improvements to NxuStream.
- PreNotification events
- Fail
notification events
- Revised
samples to support fluid and
cloth loading.
- Asset
exporting supported, can now
save any individual SDK component.
- Hierarchical
scene instancing support.
- Faster
binary cooked loading and saving.
- Schema updated
- Added
the ability to load or save data from a buffer in memory.
- Added
user property fields support.
- Wrote
a FAQ for NxuStream
- Created
Doxygon HTML docs
- http://www.amillionpixels.us/nxustream/namespace_n_x_u.html
- PhysXViewer
- File
Import/Export options implemented.
- Improved
graphics for physics
- Got
the log message console working again
CreateDynamics Changes
with Release #5: August 11, 2006:
Major Changes:
- Revised
version of NxuStream
- Many,
many, improvements and bug fixes.
- Revised
version of COLLADA
- Added
support for physics models
instancing physics models relative to a node.
- CreateDynamics
- Small
revisions to support scene
instancing..
- PhysXViewer
CreateDynamics Changes
with Release #4: August 3, 2006:
Major Changes:
- Revised
version of NxuStream
- More
memory leaks fixed.
- Cooked
data better supported,
especially in binary mode.
- Implemented
‘pre-Notify’ mechanism.
- Revised
version of COLLADA
- Fixed
many bugs.
- Removed
‘graphics proxies’
- Added
support for drive model in
constraints.
- CreateDynamics
- Eliminated
the dummy root bone. This in
general provides better rag dolls, however, if
the root bone had two children it causes them to be disconnected. Patching the skeleton still needs to be
done.
- Added
direct COLLADA export support.
- Added
support for a drive model.
- PhysXViewer
- Added
import/export options for all file formats.
- Added
sliders for the drive spring and drive damping.
- Better
menu interface for import and export.
- Added
numerous demo/test scripts to the ‘data\scripts’ folder.
- Included
PhysX_2.4.4 system software installer.
CreateDynamics Changes
with Release #3 : July 28, 2006:
Questions/comments: mailto:jratcliff@ageia.com
Major Changes:
- Revised
version of NxuStream
- Memory
leaks fixed
- API
slightly revised and improved
- Schema
provided
- COLLADA
support
- Now
supports import and export of COLLADA physics files.
- Create
dynamics will save in COLLADA physics format.
- Import/Export
menus cleaned up.
- CreateDynamics
- Bug
fixed related to root bone.
- If a
root bone has two or more children, the hierarchy will be broken. (example cat.bin). This
bug will be fixed in a future release.
- Default
hull points increased.
- NxuStream2
and COLLADA source release
- The code
to import and export NxuStream and COLLADA is
provided.
- GrannyPhysX library revised to work with the latest NxuStream
CreateDynamics Changes
with Release #2 : July 11, 2006:
Questions/comments: mailto:jratcliff@ageia.com
Major changes:
- New
version of NxUStream
- Inclusion
of the GrannyPhysX binding layer.
- Inclusion
of a draft copy of the PhysXViewer with source.
- CreateDynamics revised to be compatible with the new NxuStream
- NxUStream is located in \CreateDynamics\src\nxustream
What is it? NxuStream is a
library to serialize the state of the PhysX SDK
descriptors. It can also be used to
transport and instantiate data assets.
It provides support for both binary and XML file formats.
How do you use it? First, make sure your include paths point to
the PhysX 2.4.4 SDK.
Next, add the source into your project.
In your own code simply include ‘NXU_Helper.h’. This is the only header file you will need.
To save the current state of
the PhysX SDK to a file on disk you would have a call
like this:
NXU::coreDump(*gPhysicsSDK, “dump.xml”, false, false, false, this );
To load the physics data:
NXU::NxuPhysicsCollection *c = NXU::loadCollection(“dump.xml”, false, this );
To instantiate the physics data:
NXU::instantiateCollection(c,*gPhysicsSDK,myScene,rootNode,this,this);
To release the collection once it has been instantiated:
NXU::releaseCollection(c);
If you reset your instance of the PhysX
SDK or when you application exits you clean up the persistent bindings in NxUStream by calling:
NXU::releasePersistentMemory();
To convert a file from XML to binary you would do the
following:
NXU::NxuPhysicsCollection *c = NXU::loadCollection(“dump.xml”, false, this );
NXU::saveCollection(c,”dump.nxb”, true, false, false, this );
Whenever you see the ‘this’ pointer in the
code above it is intended to be an interface pointer to your application. This will be one interface that handles error
notification (NXU_errorReport) and another one that
handles notification of object creation (NXU_userNotify).
What is GrannyPhysX?
The GrannyPhysX library provides
bindings between an animated Granny model and an instantiation of an nxustream physics collection.
If you are not a licensee of Granny then you will not be
able to build a functional version of this code. However, it does serve as a reference example
for how one might go about binding a character animation system to the PhysX SDK at run time.
If you are a Granny licensee simply stick ‘granny.h’ and ‘granny2.lib’ into the directory ‘\CreateDynamics\src\granny’ and the library will fully build
with Granny support.
To see an example of how to invoke the Granny PhysX bindings you can refer to \CreateDynamics\src\PhysXViewer\GrannyFactory.cpp
What is the PhysXViewer?
The PhysXViewer is a new
application that is being developed based on the original PhysX
Rocket source code. The goal was to
create a slimmed down version that would be much easier to maintain and work as
useful sample code. By breaking things
down into individual libraries the goal is to make as much of the code
‘reusable’ for developers.. The code has been heavily refactored
and has a much cleaner layout and library breakdown.
Another goal was to use it to create better interactive character
demos by leveraging against the Granny engine from Rad
Game Tools.
Eventually we would like to provide much more sophisticated
libraries that show how to do corpse recovery, complex motion blending,
physically modeled characters by using drive motors, cloth/character
interaction, and a lot of other cool technologies.
For this project it was out of scope to write a full blown
character animation system from scratch so, instead, by leveraging against the
Granny tools we can develop some excellent technology demos. For licensees of Rad
Game Tools they will have access to the source to these libraries. For non-licensees they can at least learn
from the interfaces how they might go about accomplishing the same features and
integration using their own animation engine.
We might implement many bindings through pure virtual interfaces. While this would create some extra layers of
source to maintain it would allow developers to more easily map the libraries
to their own animation engine by simply re-writing the implementation of the
pure virtual interface.
The PhysXViewer doesn’t do much of
anything right now. There has not been
sufficient time to yet to do much more than get a shell application
together. However, it does allow you to
invoke the create dynamics toolkit, load an NxuStream
file, and simulate it. You cannot pick
up and drag the model or do anything more complex than that. At this point it is mostly a ‘hello world’
application to demonstrate the usage of NxuStream, CreateDynamics, and the GrannyPhysX
bindings.
This is why we have provided a binary executable version of PhysX Rocket that does provide many of those features. In time, we hope the PhysXViewer
application can become a standard ‘viewer’ for NxuStream
and COLLADA files.
What is COLLADA?
COLLADA is a 3D data asset exchange format that is a
proposed industry standard. In the 1.4.1
specification it does provide limited support
for describing physics and dynamics data.
A conversion tool will be provided that converts COLLADA physics to NxUStream and from NxuStream back
to COLLADA physics. Go to www.collada.org to learn more.
What changes were
made to NxuStream?
- The file
was reformatted to be as close as possible to a truly reflective object
model of the PhysX SDK descriptors. Some cleanup remains but it is close to
done.
- NxuStream source was switched over to use the TinyXML parser.
This parser is extremely stable and robust. It has been widely used for many years.
- The
source was placed into a namespace ‘NXU’ to avoid any clashes or conflicts
with the rest of the source in your application. It will not even clash with previous
versions of NxuStream that have been released. All source files begin with the prefix
‘NXU_’.
- The
suggested default file name extensions are ‘.XML’ for the XML version and
‘.NXB’ for the binary version.
However, you may use any file name extension of your choice.
- A
simple public interface was provided to make NxuStream
easier to integrate into an application.
The interface is located in ‘NXU_Helper.h’
and this should be the only header file you have to include in your
application.
- All
internal classes were revised to make sure they were being fully
initialized in their constructors.
- A
global persistent name table was created to make sure that ‘name’ fields
would persist even if a ‘collection’ was released. The global name table can be explicitly
destroyed by the user application on exit or on SDK reset.
- The
floating point representations in the XML file were cleaned up. The number ‘1’ is now always ‘1’ (not
1.00000). Sufficient decimal
precision was maintained in the output to minimize any precision
loss. If the value was the maximum
floating point number it would be more conveniently expressed as ‘FLT_MAX’
or ‘FLT_MIN’ as the case may be.
- Memory
optimizations were done by switching to the global name table.
- Performance
optimizations were made by improving the XML parsing on input and the XML
generation on output.
- The
code was made to be extremely forgiving about unexpected or malformed XML
data in the source file.
- An
error reporting interface was implemented so the user could find out ‘why’
a file failed to load.
- Redundant
and unnecessary ‘default models’ were removed.
- Multiple
instantiation of mesh data was fixed.
NxuStream now maintains a named
association for instantiated mesh assets and only ‘creates’ them one
time. If the user resets the
physics SDK it must also make a call to ‘NXU::releasePersistentMemory’
to cancel these associations.
- A bug
where joint names were not preserved correctly was fixed.
What changes remain
to be done to NxuStream?
- There
still remain some memory leaks in some of the destructors. These are being tracked down and will be
fixed completely very soon.
- A
mechanism where a user can load a collection straight from a buffer in
memory or straight to one will be provided.
- Any
small deviations found from a perfect reflective object model will be
fixed.
- Stability
problems that show up if any part of a loaded file fails will be fixed.
- Better
error reporting to the user about failures during load, save, or
instantiation will be fixed.
- Improvements
to the public interface to give the developer more fine control over how
they manage collections.
- User
properties will be added for all objects.
This will allow the developer to pass game specific ‘mark up’ data
through the pipeline.
- The
ability to convert to and from COLLADA physics format will be supported.
- Better
cloth serialization support.
- Fixes
to memory ownership issues related to cloth and fluids during
instantiation.
- Thorough
testing of both the XML and binary version will be done. Bugs found will be fixed.
- As
best possible, backwards compatibility will be maintained between the
2.4.x SDK and the 2.5.x SDK.
- Full
support for ‘cooked data’ will be tested.
- To
allow users to hand edit an XML file (for example deleting a single actor
from the file) the locations in NxuStream where
array indexing is performed (body pairs, joints) will be rewritten to do a
named lookup.
- Better
support for the suppression of saving default values (as an option).
- A
revised XML schema.
- Support
the ability to create a valid convex hull if only points are provided.
- Fix an
issue related to ‘stride’ when saving and loading.
- Revise
the Max and Maya plug-ins to transport NxuStream2 and COLLADA physics.
- New
revised sample programs; including CreateDynamics,
PhysX Rocket, and PhysX
Viewer