Previously we stated that we’d be using Bifrost to create or simulate the vomit, however, having under gone a bit more research, I personally think the use of nParticles would be our best bet for simulating vomit.
The reason why I’m coming away from Bifrost is heavily influenced by the aspect of gravity within maya, and it can be quite tricky to control as a result. As of yet, Bifrost will mainly just interact with a scenes geometric assets as a collider and doesn’t really allow a great amount of control for the user.
Where as I found nParticles allow more control over the emition of the particles in general, ranging from how they move, the amount of particles used and setting specific directions for the liquid to travel.
As a result I came across this really helpful tutorial on Digital Tutors thats convers the use of nParticles within Maya, and applying them into Houdini. However, for now we’re just interested in how nParticles can be used within Maya.
Using Houdini Engine to Simulate Finite Elements in Maya
Clink the image above to be taken to the project overview of the the set of tutorials used to achieve the vomit effect.
Create an object (in my case a cylinder)
with the object selected, hold space, select nParticle and select emit from object
In our outliner, we will now two new attributes have been added:
nParticle1 & Nucleus1
With the attribute ‘nParticle1’ selected, go to basic emitter attributes:
here, we are able to edit values such as:
- Particle Rate per second
- Emission Speeds
- Speed Random
Once the desired values have been set, select the ‘Nucleus1’ attribute
Here we are able to edit values such as:
- Time Scale
- Space Scale
- Particle Spread
(Personal note: Deselect ‘Ignore solver gravity,’ this will enable our particles to act under a slight influence of gravity but still allow the user to edit and control the particles with ease.)
I then decided to add a collider into the scene to test how our particles would react with collider objects.
To create the collider, I made a default cube in maya, with the cube selected, hold ‘space‘ select ‘nCloth’ and select ‘create passive collider‘
Under the attribute editor of our new collider object (cube): we can edit its attribute values, such as:
To finish off the creation and simulation of the vomit, we select the nParticle1 attribute, enable ‘Liquid Simualtion’ (causes our particles to behave more like a liquid within our scene) and then convert our nParticles into into polygons by:
- Selecting our nParticles
- going to ‘modify’ – ‘convert’ – ‘nParticles to polygons’
This will convert our an particles into an output mesh
from here we can edit the meshes
- blobby radius scale
- material attributes such a colour and transparency
Personal Note: Sometimes editing the poly mesh can be difficult, so, if you’d like to restore the original nParticles, do the following:
- Delete the generated poly mesh in your outliner
- Then under the nParticle mesh attribute, select nparticle shape1
- under object display, untick, Intermediate object.
- Your nParticles have now been restored.
Below are a series of tests I carried out throughout the vomit creation process:
In this test, I was simply testing to see if the nParticle pre-sets I used worked correctly: Like Emission speed, directional attribute and collider attributes.
In this test, I was playing about with the ‘Space scale’ values with the nParticles having been converted into a poly mesh, I didn’t like the random spaces that existed within the vomit in this test.
Following off the last test, I fixed the ‘Space scale’ values so it’s now just the one continuous stream of liquid.
This test was carried out to see how well the mesh and flow of the liquid worked whenever the poly count of the mesh was increased, smoothed.
An animation test carried out to see how the liquid reacted whenever the emitter mesh was being moved. This was a very important test because in our final outcome, the vomit is going to have to be able to move with the character its being emitted from. so gaining a brief understanding of how the liquid moves under an animated influence was crucial.
Final render test.