Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member
In a typical 3d scene we refer to the objects we view and manipulate in the viewport as pieces of geometry, or meshes. In a dynamic simulation, however, we need to understand that there is a distinction made between what we see in the viewport, which you refer to as graphical mesh, and what we simulate or calculate collisions with, which is referred to as a physical mesh or a physical shape. Very rarely are the two identical in makeup. In fact, for the sake of speed, we will oftentimes prefer them not to be.
This physical shape or mesh is a nonrendering representation of the graphical mesh and is created when we set a piece of geometry in a scene to be either a rigid or soft body object. The physical mesh is what is used as a collision object. We cannot stress that very important point enough. It is this that will collide or interact with other objects in the simulation and thereby create the simulated motion that we are looking for. The fact that these physical meshes have to be specifically added or attached to objects in the scene means that, well, only elements that we deem required are actually added into the simulation, of course ensuring that the number of calculations required to produce the simulated effect are kept to a minimum.
Now, to optimize a graphical mesh, or what we think of as a 3D model--maybe for something like a real-time game engine or possibly just to get faster render time from our scene--we would edit the number of vertices and polygons making up the geometry. Most likely, we would reduce the overall count wherever possible. Well, in a similar way, when it comes to a dynamic simulation, we really want--in fact need--to control the amount of information in our physical meshes. The lighter the physical mesh, in terms of vertices and faces, the easer the collision detection process for the simulation engine and so the faster our simulation will calculate.
Typically speaking, the amount of information needed in a mesh for accurate dynamic simulation purposes really is far less than that needed for an accurate or pleasing graphical representation. For example, to render a perfectly smooth sphere we may need to have somewhere in the region of two hundred vertices on our object before we would stop seeing any surface faceting. But to create a reasonably accurate simulation using the same sphere, we would really only need our collision mesh to have something like thirty-six vertices, which is a considerable reduction and would make all the difference in the world to our simulation speed.
Typically, simulation software will have a number of simplified primitive shapes available for use as physical meshes or shapes. In MassFX, for instance, we have primitives such as Sphere, Box, and Capsule. Whenever possible, we will want to use these shapes simply because they are typically both smoother and faster inside the simulation than a polygonal representation such as a concave or a convex hole. To use the example found in the 3ds Max help file, a beachball using a faceted convex hole for its physical shape will roll unevenly on the ground, resulting of course in an unrealistic-looking simulation.
Using the built-in sphere physical shape to represent the ball, however, would let it roll smoothly across the ground and would yield much-improved collision detection performance. Of course primitive shapes we only be useful in a certain, and possibly limited, number of situations, so we may find that we need to use more complex collision shapes such as convex and concave holes. In fact, under certain circumstances we may even need to generate a physical mesh from the actual graphical mesh we have in the scene.
Typically though, this only works for the static or passive rigid body type, and of course it has the potential to impact performance quite significantly, particularly if our mesh is a complex one. The more complex our physical or a collision mesh becomes, the higher the number of calculations required to track its interaction with other physical shapes in the scene. This in turn will most likely result in our simulations becoming slower and slower as collisions increase in complexity and/or frequency. Of course, now that we understand how our simulation tools are calculating collisions--that is, these physical representations are being used--we are in a much better position to be able to tweak and fine-tune the setup so as to get the best possible performance from a given simulation.
Keeping an eye on which physical shapes we're using and where possible, using the simple shapes available, we'll go a long way towards keeping our dynamic simulations as speedy and interactive as possible.
Get unlimited access to all courses for just $25/month.Become a member
107 Video lessons · 36943 Viewers
100 Video lessons · 7572 Viewers
94 Video lessons · 25900 Viewers
147 Video lessons · 5565 Viewers
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.