Home Technical Talk

How to export Multiple Physics Proxies from Maya for CryEngine 3?

polycounter lvl 7
Offline / Send Message
CarlK3D polycounter lvl 7
*** SOLVED ***
So thanks to my team member Ryan Manning he has figured this issue out!

So for anyone else trying to fix this issue were is what you need to know:

From CryDocs:
"CRYENGINE will automatically try to replace physics proxies with parametric primitives by comparing the proxy geometry against the supported primitive shapes and approximating the potential primitive within some calculative limits. The shape is generated around the general bounding box of the geometry and uses the original pivot point to attempt to rotate the primitive to match the geometry as good as possible."
"within some calculative limits"

From UDP CryDocs:
"UDP strings must be assigned to a node ending with the name "_group" that has not been transformed relative to the parent "cryexportnode"

If this is deviated, the engine will try to fit the contents of mesh data below the group node to the UDP assigned primitive. In most cases this fitting works but it should be noted that it isn't perfect and at times can result in unpredictable behavior.

For every UDP primitive used, each should have its own _group node. This is the theory behind it but here are some Images of my Setup & Results.

- each proxy piece (created from cubes) has _group at the end of it
- each proxy piece as UDP Settings "box" (this tells CryEngine to use a box Primitive)
*UDP is found under the Crytek toolbar in maya*

***NONE OF THE OTHER NAMES MATTER***

Maya Setup:
xtXYb5y.png

CryEngine 3 Proxy View:
dSVL7LN.png

Replies

  • mole420
    Options
    Offline / Send Message
    mole420 polycounter lvl 10
    http://docs.cryengine.com/display/SDKDOC3/Physics+Proxy

    Most the info you need should be in this document. couple of problems I can see from your scene.
    The proxy mesh must be called "PhysicsMesh" and the proxy material must be called proxy and be set up as stated in the document.
    If you have multiple meshes for the proxy and wish to keep them separate you can add them to a group called for example "brokentv_proxy_group"
    Hope this helps give me a shout if you have any more questions.
  • CarlK3D
    Options
    Offline / Send Message
    CarlK3D polycounter lvl 7
    So I tried all you discussed above and no change. I tried using both a combined proxy mesh called PhysicsMesh & having the 2 pieces separate in a group called brokentv_proxy_group
    I changed the mat to proxy also. any more ideas? I'd like to see someones Maya setup & multiple proxies working in CryEngine 3
  • mole420
    Options
    Offline / Send Message
    mole420 polycounter lvl 10
    Cant show meshes but can show the set up of the Cryexportnode

    db5w4JG.jpg

    Little un-organized with the naming but should give you the picture. Bit busy this morning but any questions let me know and I can set up a better example at lunch or something.
  • CarlK3D
    Options
    Offline / Send Message
    CarlK3D polycounter lvl 7
    I tried following what you said on a new model and it renders the same result.
    ZBO3ijj.png
    Are you sure your models are rendering as Primitives and not custom collision geometry in CE3?
    If you go to the roll-up bar and enable show proxy you should see no geometry lines on your proxy if its using a Primitive. If there are lines its using custom collision geometry which is far more experience to use over Primitives
    MJEJkrW.jpg
  • CarlK3D
    Options
    Offline / Send Message
    CarlK3D polycounter lvl 7
    Still looking for an answer to how to do this.
    A step-by-step setup guide would be great. there seems to just be nothing on this and in a larger project its kinda important to do
  • CarlK3D
    Options
    Offline / Send Message
    CarlK3D polycounter lvl 7
    *** SOLVED ***
    So thanks to my team member Ryan Manning he has figured this issue out!

    So for anyone else trying to fix this issue were is what you need to know:

    From CryDocs:
    "CRYENGINE will automatically try to replace physics proxies with parametric primitives by comparing the proxy geometry against the supported primitive shapes and approximating the potential primitive within some calculative limits. The shape is generated around the general bounding box of the geometry and uses the original pivot point to attempt to rotate the primitive to match the geometry as good as possible."
    "within some calculative limits"

    From UDP CryDocs:
    "UDP strings must be assigned to a node ending with the name "_group" that has not been transformed relative to the parent "cryexportnode"

    If this is deviated, the engine will try to fit the contents of mesh data below the group node to the UDP assigned primitive. In most cases this fitting works but it should be noted that it isn't perfect and at times can result in unpredictable behavior.

    For every UDP primitive used, each should have its own _group node. This is the theory behind it but here are some Images of my Setup & Results.

    - each proxy piece (created from cubes) has _group at the end of it
    - each proxy piece as UDP Settings "box" (this tells CryEngine to use a box Primitive)
    *UDP is found under the Crytek toolbar in maya*

    ***NONE OF THE OTHER NAMES MATTER***

    Maya Setup:
    xtXYb5y.png

    CryEngine 3 Proxy View:
    dSVL7LN.png
  • CollinBishop
    Options
    Offline / Send Message
    CollinBishop polycounter lvl 2
    I would just like to say that this has been shown to be the same thing whether it shows triangulation or not. Crytek staff stated it is the same consumption in memory on proxies regardless if you combine or do so like this thread states.
  • CarlK3D
    Options
    Offline / Send Message
    CarlK3D polycounter lvl 7
    Can you link me to your source on where Crytek stated this?
    It's not about consumption or optimizing memory. Its about optimizing hit detection.

    Example: If you drop something onto an item it has to check every face of the proxy to see if you collide with it.

    The Engine uses functions in the physics dll such as:
    collide_box_with_box
    collide_box_with_triangle
    collide_box_with_sphere

    If you have a Mesh Proxy, triangles has worse precision because of the edges
    With a primitive proxy it knows the mathematical formula for the shape, so it uses that instead of checking faces.

    This is all new documentation for 3.6 but its clear on the advantages of primitives and when you have 1000+ assets in a game this saving can be substantial: http://docs.cryengine.com/display/SDKDOC3/Physics+Proxy
  • CollinBishop
    Options
    Offline / Send Message
    CollinBishop polycounter lvl 2
    I looked for the posting but can't find it. Regardless no game engine will accept a 4 sided poly. They all restrict to tri's because a single plane is only possible on triangulated geo. Go turn on wireframe and look at your non-triangulated geo you have there. Then post a side-by-side image showing me what the wire and render image look like. If it shows non-triangulated geo I will keep quiet.

    As for the other UDP info it is still valid. Simply I am saying the geo can show triangulation either way. Even on Cryteks samples they possess triangulation on many proxies.
Sign In or Register to comment.