PhysX setup

From Fitnect
Jump to: navigation, search

PhysX DCC plugin

Please find the DCC plugin links below! (Download according to your 3DS Max version)

3DS Max 2012 (64bit): http://get.fitnect.hu/download.php?f=tools/NVIDIA_PhysX_For_Autodesk_3ds_Max_2012_64bit_2.89.00705.01090.msi

3DS Max 2013 (64bit): http://get.fitnect.hu/download.php?f=tools/NVIDIA_PhysX_For_Autodesk_3ds_Max_2013_64bit_2.90.10903.18230.msi

3DS Max 2014 (64bit): http://get.fitnect.hu/download.php?f=tools/NVIDIA_PhysX_For_Autodesk_3ds_Max_2014_64bit_2.90.10903.18230.msi

Overview

This section is about setting up physical properties of the 3D clothing prepared in the modelling guide part. This tutorial won't cover all the aspects and possibilities of the nVidia APEX clothing plugin.

The complete user manual can be found in the PhysX plugin help, located on the main toolbar.

Physx help.jpg

It is highly recommended to read the manual before using the plugin.

Video tutorials by nVidia

PhysX toolbar

The most obvious way to interact with the PhysX plug-in is via the PhysX Toolbar. If you have just installed the plug-in, this toolbar should appear automatically, floating in plain sight. It appears as shown at right.

If the toolbar isn’t visible (if, for example, you have closed it), you can get it to show up again as with any other toolbar in Max: simply right-click in an unused toolbar area, and choose “PhysX Toolbar” from the right-click menu.


Physx toolbar.jpg


PhysX version

The current version of Fitnect uses APEX 1.2.3 / PhysX v3.2.3

APEX Plugin version: 2.89

Before continue make sure the PhysX engine version is set to 3.x:
(Press the "World parameters" icon on the PhysX toolbar - World icon.jpg this setting)

P Ver.jpg

Avatar/Ragdoll setup

Clothing created on a character does not, by default, know anything about the rest of the character. Although you can use a Max Distance of 0 to prevent certain vertices from moving at all from their skinned location, the rest of the vertices are free to flow right through the body of your character.

To get your clothing to interact with your character, there are two mechanisms to limit where it moves: Backstop and Rigid Bodies

Fitnect's avatars are already setup with PhysX ragdoll which is a set of rigid bodies attached to the avatar's bones.
All the rigid bodies can be manipulated individually, by selecting it's parent bone, and adjust settings in the PhysX rigid body modifier.


Avatar ragdoll.jpg

Important parameters are: radius, and the position of the rigid body.
To change the position of the rigid body, just select Mesh Transform from the modifier stack and adjust it's position with the select and move tool.

Converting mesh to physically simulated cloth

  • Select the previously skinned clothing and click on the "Create Clothing" Clothing icon.jpg button in the PhysX toolbar

Painting physical attributes (dress)

  • Select the APEX clothing modifier
  • In general attributes set root translation to hip
  • Select Max distance from the paint attributes section
  • set channel value to 0.5m
  • in the paint settings set brush max size to 0.1
  • paint max distance to the bottom part of the skirt only, this will let bottom particles to move 0.5m in every direction

Max distance.jpg

Painting physical attributes (coat)

  • Select the APEX clothing modifier
  • In general attributes set root translation to hip
  • Select Max distance from the paint attributes section
  • set channel value to 0.3m
  • click on the flood button
  • in the paint settings set brush max size to 0.1
  • set channel value to 0 m
  • paint max distance to the neck/collar part only, this fix those vertices to their animated values.
  • set channel value to 0.05 m
  • paint max distance with value of 0.05m to the arms region only.
  • make sure the armpit region is set to the original 0.3m

Max distance coat.jpg

Backstop (coat only)

The least expensive option is to use a feature called Backstop. Backstop is sometimes called “animation collision” or “a-collision”, as it (sort of) uses the animated surface of clothing as a collision surface for the clothing. For each vertex, you specify a distance backwards (along the normal) that the vertex may move, this distance is known as the “Backstop Offset”. A “Backstop” sphere (the intersection of the Backstop sphere with the Max Distance sphere shown by the red shaded region at the right dragram) can be specified for each vertex to prevents the vertex from moving backwards into that region. The radius of this Backstop sphere may be controlled per vertex.

Backstop.jpg

  • Set channel to backstop radius and value to 0.4m then press the flood button
  • Set channel to backstop offset and value to 0.1m then press the flood button

This will constrain vertices to move more than 0.1m behind

Testing

  • Press the Start simulation button in the apex toolbar

Exporting

  • Select the simulated cloth only, and click on export selected
  • Find PhysX and Apex (.pxproj)
  • Use the following settings, then click on the export button

Export.jpg