Forum
Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC:

Everything you need to know about Carbon Physics Draw in Maya 6 months 3 weeks ago #704

  • Sebastian
  • Sebastian's Avatar Topic Author
  • Offline
  • Administrator
  • Administrator
  • Posts: 122
  • Thank you received: 25
Physics Draw is available for almost all Carbon nodes. These visualizations are to help gain a better understanding of what the actual physics solver processes.

We recommend to always use Physics Draw, as its the only tool to visualize the real size / thickness of Carbon objects, which impacts your perception of the “look”, and shows exactly what surfaces are colliding and to highlight any issues with either geometry or any Carbon node’s settings, such as accidentally applying a way too large thickness value to a Carbon Cloth.

How to change it, turn it on and turn it off?

Per Node Control
Almost every Carbon node has a Physics Draw section, which contains a Draw Mode dropdown. Setting the Draw Mode to None will disable the Physics Draw for that individual node only.
Additionally, the visibility of the node’s shape and transform are taken into account. If either the node’s shape or its transform is hidden in the viewport, no Physics Draw will be displayed for this node, irrespective of the node’s Draw Mode choice.
Note: Selecting a node’s shape or transform and pressing the “H” button on the keyboard toggles the visibility of the selected shape or transform.

Simulation-Wide Control
The Carbon Simulation Show/Hide Physics Draw button is a simulation-wide override to turn on and off all Physics Draw for all nodes assigned to that simulation. If this is set to hide the Physics Draw (button is red), no Physics Draw will be displayed for any nodes assigned to that simulation, irrespective of the nodes’ individual settings and visibility.
Additionally, the visibility of the simulation shape and transform are taken into account. If either the simulation shape or its transform are hidden in the viewport, no Physics Draw will be displayed for any nodes assigned to that simulation, irrespective of the nodes’ individual settings and visibility, and the state of the Carbon Simulation Show/Hide Physics Draw button.
Note: Selecting a node’s shape or transform and pressing the “H” button on the keyboard toggles the visibility of the selected shape or transform.

Summary
In summary, a node’s Physics Draw is only visible when all of these factors are true:
  • Node’s shape and transform are visible.
  • Node’s Draw Mode dropdown is set to anything but None.
  • Simulation’s shape and transform are visible.
  • Simulation Show/Hide Physics Draw button is set to green.

Why can't I select the Physics Draw in the viewport?
That's because it is purely drawn in OpenGL.
We draw a lot of data and the best way to do it efficiently is to directly draw it ourselves using OpenGL.
This is why you cannot select the Physics Draw geometry. We never create Maya geometry, but have OpenGL render instructions directly inside the c++ plugin code.

Why is the Physics Draw not shaded like my meshes in the viewport?
This is because we render all Physics Draw ourselves, directly performing OpenGL calls from inside the c++ plugin. Please see previous section.
So our Physics Draw geometry does not go through the standard Maya viewport render pipeline like meshes; and any custom viewport overrides/settings you might have are probably not being applied.
In our code, we get the current Draw Context from Maya and use its view, perspective matrices, and a few select other settings, like wireframe drawing and then run a highly optimized draw of the physics information. By taking the matrices from the MDrawContext, we ensure that the Physics Draw is always lit from the camera's perspective.

In very rare occasions, this can lead to artifacts in the Physics Draw render, like shading from the wrong direction.
The most likely reason for that is that you have custom viewport overrides/settings, which can interfere with the Carbon plugin's render pipeline.
The first thing you should check is to see if there are different / standard viewport settings you could try.
If you still encounter any further artifacts or issues, we would appreciate it if you could contact us with a reproducible (if possible) at This email address is being protected from spambots. You need JavaScript enabled to view it. and we will do our best to help you find a solution.
In the meantime, or if all fails, we recommend hiding the Physics Draw and visualizing the output meshes instead, once you have done the initial setup, and only show Physics Draw when needed.

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Time to create page: 0.070 seconds