Modelspace particle simulation in workspace D3D

Post Reply
User avatar
clintonman
Captain
Posts: 5422
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

Modelspace particle simulation in workspace D3D

Post by clintonman »


This is a test for scripts used to render modelspace animations in the workspace. It was based on a short lived Thanos disintegration tutorial. I had to do a bunch of crazy stuff to get the particle motion and I'll write up a description of the process later.
Clinton Reese

http://clintons3d.com
User avatar
clintonman
Captain
Posts: 5422
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

Re: Modelspace particle simulation in workspace D3D

Post by clintonman »

Summary of the process:

Started by importing the alembic(abc) file into trueSpace which brings in the last frame of the mesh animation.
ClothSim.jpg
Ran a cloth simulation to be used as a collision in the modelspace particle simulation. It took a few attempts. First I found out that the cloth simulator ignores gravity settings and always points downward. So I couldn't run it moving to the side. Then I got a poor result because the head wasn't a closed mesh. After a lot of tweaking the settings I got a good result. Finally, I hand edited the mesh so some parts were closer to the shape of the head than others to try to get some offsets for the start of the disintegration effect.
Cloth2CollisionShape.jpg
The collision shape caused the pieces to fly off in different directions like an explosion. The solution here was to cut all the faces of the collision, select all edges and then cut selected images, then flatten all the faces in the direction of the collision using a script. Now with some variation in the particle sim the pieces bounced more or less in the same direction.
InternalSlices.jpg
The particle system had 2 emitters. One was from fragmenting the head mesh and another to fill the inside of the head. The particle emitter set to fill the volume was limited to something like 200 particles. The solution to that problem was to fill the head with geometry and emit particles from the surface of that geometry. The internal geometry was created with a process of using a bunch of parallel plane meshes boolean cut slices and removing all the outside faces manually. I set the resulting slices mesh to emit 4000 cube shaped particles from the surface.
LookDev.jpg
The particles emitters were set to create all particles at the first frame. Wind is used to move the particles towards the collision mesh. The particles bounce with a value of 1000%, so they are moving much faster after the collision overcoming the wind force. After the first successful run I saved the resulting mesh for material development. The material changes based on the distance from the purple torus. The first image shows the result with the particles furthest away being more transparent and less saturated. The second image shows how it looks when the torus is moved towards the right, it gets brighter. It's the same mesh, but looks very different because of the material distance response.
CameraTracking.jpg
The camera was setup with a composite render node and a background image filling the view. The particle sim wind force is pushing the head towards the collision, so to keep the head centered I added a cube to the head mesh just out of view of the camera. I created a matching cube and attached it to the camera then ran the simulation a few frames at a time, moved the camera to keep the cubes lined up and keyframed it. The head is still a little floaty, but it works. The head looks like it's standing still with the pieces flying off, instead of the truth of the head basically falling and bouncing.

More particles would give a better result. The imported head was decimated to a much lower resolution and many more particles could have been emitted from the interior to fill the space. The particle system was extremely finicky, going bad for no apparent reason. Sometimes it ran fairly quickly, other times it was super slow. If you save the scene with a new name you have to reestablish the collision relationships - took a while to figure that out. That all being said it is a relatively simple collision plugin that must be close to 20 years old at this point in time. Not bad for ancient software. 8-)
Clinton Reese

http://clintons3d.com
jamesmc
Captain
Posts: 1776
Joined: 08 Jul 2009, 15:35

Re: Modelspace particle simulation in workspace D3D

Post by jamesmc »

Fascinating! Looks to be many possibilities here. Thanks for all your difficult and technical work!
Walk by faith, not by sight.
Post Reply