Chaos Phoenix's Blog

 

By Hammer Chen, Kristin Ivanova

Phoenix FD 4's new feature TexUVW opens a great opportunity for adding details to your fluids. It allows fluids to transport UVW information along with the moving fluid. You can find an example in the "Using TexUVW for Creating Thin Smoke" tutorial, available on the Phoenix FD official page. In the tutorial, smoke opacity is masked with a noise texture, with the help of TexUVW, to enhance the details that mimic thin smoke. 

In this article, we are taking advantage of this new feature in order to create a lava flow. The folding character of the lava is generated through bump maps and displacement.


References
When creating a lava stream, we need to consider what type of lava we want to use for reference. A variety of lava types exist depending on terrain, speed, hotness, and material composition. For the purpose of this article, we will create a "pahoehoe"  (pronounced 'paw-hoey-hoey") type of lava (see the reference images above), which creates folds as it moves. However, if you intend to simulate molten lava, you can check the "Solidifying of Molten Lava" tutorial on the official documentation site.



Scene setup
The simulation setup consists of the following:  a highly viscous liquid is emitted from Plane001, flowing down the slope of the Ground_Plane (with a Shelled Modifier applied). The flow then collides with several rocks, creating patterns in its TexUVW. Based on the animated TexUVW that follows the flow, we can then apply diffuse maps, bump maps and displacement to it.



Fluid Source
The liquid source is quite simply a standard plane. We mask the source with Stucco Texture, so the emission is not too uniform. A Noise modifier is added to the plane and set to animated. This way the liquid flows in different directions and varies in speed, making the lava collide with itself, generating interesting patterns in its UVs.

Since a plane with no thickness might not voxelize well when running the simulation, a shell modifier is added to Plane001. Then, we select one side of the plane and set the face IDs to ID 2. That's why we set the Polygon ID to 2 in the Liquid source. 

Another useful option of the Liquid Source is the "Inherit TexUVW From Geom". It sets the UVW Grid Channel value for each cell where fluid is emitted to the UV value of the emission geometry in that cell. When combined with the Variation option, it allows you to create an animated UVW pattern. If you are unsure of what it actually does, you can find an example here. 



Liquid Simulator
The first thing to look at here is the "Texture UVW". Be sure to enable the "Texture UVW" channel data in the Output rollout. Otherwise, the liquid won't contain any TexUVW information after simulation. 

The second thing you'll notice is the extremely low value of the Time Scale. This is because we want a slow moving lava flow. We also give some value to the Default Viscosity and Surface Tension options, as these two physical properties simulate thick and viscous liquids like lava.

The third important parameter is the Texture UVW Interpolation. In this example, we give it a value of 0.001. This parameter controls the frequency of Phoenix snapshotting the liquid mesh for UVW. When the Interpolation is set to zero, the TexUVW is determined in the first frame and continues to stretch over time, never to snapshot again. When the Interpolation is more than zero (0.1 for example), Phoenix snapshots the liquid mesh over a period of time and updates its TexUVW. The following table shows the Pros and Cons of these two extreme conditions. We choose in-between values (0.001) in this article for balanced results.


Other settings: SPF set to 2 for a more rounded thick liquid, it is okay to set SPF to 1 for a faster simulation. The Scene Scale is set to 8 for the same reason: the liquid appears thicker with a higher Scene Scale.

When the Interpolation is set to 0.1, as you can see, the TexUVW is less stretched. However, there is no realistic folding pattern that is usually seen in the "pahoehoe" lava. This setting is less expensive for computing, since you can run a rather low grid resolution and still get usable results.

When the Interpolation is set to 0.001, you can see patterns in the TexUVW, suitable for the "pahoehoe" type of lava. We still give the Interpolation a teeny tiny value instead of zero for balanced results. Notice we also up-res grid resolution in this example.

When applying a checker texture, you can see that  the leading edge of the liquid begins to update its TexUVW. So we set the Interpolation to 0.001 to avoid super overstretch of the UVs, hence, noisy mesh when we add VRayDisplacementMod to the liquid mesh.



Shading
The main topic of this article is TexUVW and we don't want to make it overly complicated. The whole idea of the shading network is simple: we have hot lava material and cold lava material, the two are blended with a VRayDistance Texture map as a mask (as shown in the image above).The hot lava is made of VRayLightMtl and the cold lava is made of standard VRayMaterial. So when the lava touches the rocks in the scene, it appears red hot, while other parts of the lava remain as cold and black. You can also add the ground plane in the VRayDistanceTex Objects list if you like to. The complete shading network can be found in the downloadable scene here.

To keep the scene simple, we don't use a Particle Turner, which allows you to manipulate liquid viscosity when particles age. However, when Particle Turner is used with PhoenixFDGrid Tex, you can get even more realistic molten lava, both in behavior and shading. That is worth another post or tutorial.


On top of the Phoenix FD liquid simulator we add VRayDisplacementMod. This modifier can turn the smooth mesh into a detailed one and make the pahoehoe lava mesh much more convincing.

Above are some images showing a variety of lighting conditions, different strengths of the applied displacement, and different TexUVW interpolation values. You can see distinct characters among them.

Final animation

Downable scene. Click here to download the final scene. Note that the texture maps and HDRI maps are not included in the package. You can download the texture maps from textures.com, and the HDRI maps from HDRI Heaven.

 


By Hammer Chen, Kristin Ivanova

In the previous post, we saw how to create a small-scale fire. In this article we are talking about large-scale fires. A large-scale fire can be a ground fire, a wooden house on fire, or maybe fire in an explosion. Let's explore how to create realistic large-scale fire with Phoenix FD.

Fire is very tricky to make in CG. In the previous article, we have introduced the VRayDistanceTex to alleviate artifacts at the fire root. That is, by using a VRayDistance texture to modulate the fire opacity. In this article, we are going to give more tips & tricks for creating convincing fire.



First of all, let's talk about how the fire is emitted. Take a ground fire for example, we can use a simple plane (with shell modifier on top) and vertex paint to mask the fluid source. To avoid getting one big chunk of fire, paint the vertex color with smaller areas. This way we can create a more natural form of the flame.

Secondly, Phoenix FD Turbulence has a great effect on the overall motion of fire. For example, below we compare the dynamics of a flame without Phoenix FD Turbulence and with Phoenix FD Turbulence. See how the flame looks dull without Turbulence.


Fire simulation without & with turbulence


The turbulence we are using here has the following parameters set: size is set to 10.0 m. Since the plane that emits the flame is 3x3 m, we can safely assume when setting up the Phoenix FD Turbulence, that the recommended size is approximately three times the size of the emitting source.

The outgoing velocity of the source is 6 m, and the Phoenix FD Turbulence in this case is 2 m, which is about one-third of the source's. These are some good reference values to set up Phoenix FD Turbulence. The Rate of Change is set to 2, so that the fire changes faster.

This is our source settings. Set the Emit Mode to Source Force and Smoke to 1.0. Enable the Fuel option with value of 1. Outgoing Velocity is set to 6.0m. Temperature is set to 2200.



Let's take a look at the Fuel section. 

First, the fire we create here is fuel-based. The advantage of a fuel-based fire is that we can control the ratio of smoke to fire through the parameters of the Fuel rollout. For example, we can increase the Smoke Threshold to 1.0, so that the smoke doesn't appear too early, and also decrease the Smoke Amount to 0.5, so that there isn't too much smoke. Note that the amount of fire to smoke ratio is also essential for a realistic flame.

Now let's look at the Dynamics settings. A slightly lower value for Gravity is needed to keep the fire from getting too high. Time Scale is set to 0.7  to make the fluid slightly slower, thus aesthetically pleasing. Cooling affects the length of the fire and allows for more color variation (this requires a proper Color Gradient in the Volumetric Shading, which we'll explain later). Smoke Buoyancy is set to 1.0  to separate the fire from the smoke. Randomize is used here to make the fluid simulation a bit more uneven and interesting. We set Conservation Method to PCG, unlike the Direct Smooth + Backtrace method used in the previous small-scale Fire tutorial. This combination is more suitable for large-scale fire simulations.


Next, let's take a look at the Volumetric shading. If we render with the default volumetric shading, as you can see, the details in the highlights are completely over-exposed and the smoke seems too thick.


To solve the problem of overexposure, we adjust the color gradient and curve. The vertical value of the curve is lower at high temperatures and higher at low temperatures, ensuring that the fire details are preserved. The range from low temperature to the highest goes from black to dark red, red and orange. The position of the gradient point in relation to the curve is very critical. Sometimes the point needs to be nudged for an optimal look. The smoothness of the curve and the distance between different colors on the gradient have profound influence on the final appearance of the fire. However, there is no ultimate correct curve/color gradient for fire, all depends on preferences and environments.


Now let's take a closer look to the right half of the curve, that is below zero. This segment contributes greatly to the detail of the fire (indicated by white arrows).


However, sometimes we don't need the details described above, we just want the image overexposed on purpose. For example, in this night scene of a burning car. We move this control point of the curve upward (it was below zero), and at the same time, we increase the Fire Multiplier to 20.0 to produce a convincing fire shading at night time.


Here is the same scene during daytime. Notice the point at the curve below zero. The Fire Multiplier is set to a lower value compared to the night time scene. The curve and the gradient are slightly different from the ground fire settings previously mentioned, so further tweak of the settings is possible depending on different scenarios.


The downside of using Vertex Paint as a mask for Fire/Smoke source: the fire is emitted from the same spot. Here we introduce another technique: using a procedural texture as a mask for the source. The Cellular texture will do the work  and we can animate its Z offset, so we get an animated mask. 


As shown in  the video above, the animated mask makes the fire emit from various places, producing more convincing fire in motion.

The image above is using the same fire settings plus some color correction in Photoshop. 
(3D Model by Lien Ying-Te)

Summary
1. To alleviate the artifact at the fire root, use VRayDistanceTex to modulate the fire opacity.
2. When painting vertex as a source mask, go for many small areas instead of one big chunk.
3. A Turbulence force is good for fire movement.
4. Adjust the fire curve and gradient to retain details in the hottest region.
5. Tailor volumetric settings for different lighting scenarios.
6. Use animated procedural texture as fire/smoke source.

Download
The quickest way of learning is by playing around with the sample scenes. Here we provide few scene files for you to download. Enjoy :)

By Hammer Chen, Kristin Ivanova

We recently introduced the Artillery Explosion tutorial available in Phoenix FD’s documentation. Now, we want to show you a variation of this scene setup - a winter explosion with its proper shading.

This scene is essentially the same as the Artillery Explosion one, except for the smoke color and HDRI lighting. The smoke color is set to light gray in order to get a snowy look. To focus on the shading we also limit the number of bombs to just one.

Since there is a hot explosion at the core, it could make the rendering over-exposed or lose detail in the white smoke volumetric shading.

The good news is Phoenix FD provides a cohort of parameters allowing you to fine-tune the shading. Here we compare some of the useful settings that deal with this issue.


Overall Setup
The scene we use here is modified from the Artillery Explosion scene, except we add one Phoenix FD Turbulence helper and change the color of the smoke. For a step-by-step tutorial of how the Fire / Smoke sources and thinkingParticles are set up, please check out the Artillery Explosion tutorial.

See the screenshot, the color of V_dust_A and V_dust_B are set to light gray. RGB values are (203, 177, 159) and (252, 249, 247) respectively.

When light from the red hot explosion pierces the white smoke, it is very hard to avoid washout with the default settings (shown above). Even if we adjust the exposure in the VFB we still wouldn’t get  balanced exposure in every area of an image.

To overcome this problem, intuitively the first thing we do is to lower the Fire Multiplier in the Volumetric Render Settings of the Simulator. It does alleviate the problem as the parameter is the general multiplier for the fire color's intensity.

Alternatively, while keeping the Fire Multiplier to 1, we can lower down both the Light Power on Self and Light Power on Scene to 0.1. We get similar results.

- Light Power On Self controls the light intensity of the simulator's smoke.
- Light Power On Scene controls the light intensity over all scene objects except for the Phoenix FD Simulator itself.

But if you look more closely: the second option (adjusting the Light Power) gives you more details in the shading. So, we favor lowering the Light Power over the Fire Multiplier.

While keeping both Light Power on Self and Light Power on Scene to 0.1, what else can we do to increase details of our smoke shading? The answer is by adjusting the Physically Based option.This is a realistic model that multiplies the fire intensity by the Black Body Radiation model, which gives strong brightness to the hot parts of the fire. It transitions between an artistic look of the fire,when set to 0 and a realistic physically-based Intensity, when set to 1. In this case, we gave it a value of 0.2.

To further improve the appearance of our smoke, we can apply LUT to our final image. In the V-Ray Frame Buffer you can remap the image colors based on an IRIDAS .cube LUT (Look-Up Table) file. It transforms color input values to output values based on the specific LUT file.

Many LUTs emulate the film process. Film emulation gives you mid-tune control in an image. In this case, I use a LUT file called - 8650 Log from IWLTBAP. You don't have to use this specific LUT file, try any other LUT that works for you. Alternatively, you can achieve similar results by adjusting Levels & Curve in V-Ray Frame Buffer. You might need to sharpen your skill but you will get there.

Be sure to tick the "Save in image" if you want your rendering baked with the LUT. You can also tune down the LUT effect by reducing the weight in the VFB.

As you can see, after applying the LUT color correction, we see more middle tune and more details in the smoke shading.

Summarize
Here are what we do to improve the smoke shading:
- Lower the value of "Light Power on Self and Light Power on Scene"
- Lower the value of Physically Base
- Apply a LUT file to the final image

Final animation


Download
Here is the download link to the 3ds Max scene file. Note, you need Phoenix FD 4 and cebas thinkingParticles 6 to run the scene. The download pack does not include the HDR file (Winter Lake 01) nor the LUT file. However, for the HDRI, you can download it from HDRI Haven.

Enjoy your simulation project with Phoenix FD!

By Hammer Chen, Gergana Lilkova

This is a kind of request tutorial. Many people have been asking me how I created a burning car in my previous "Burning Car RnD" video. It was done with fuel-based burning. The fuel starts to burn when the temperature reaches its ignition temperature. Fuel-based fire gives you a realistic burning effect; however, the fuel itself is a fluid, meaning the fuel will flow all over the surface. The overflow of fuels is harder to control and might cause undesired results.

In this tips & tricks article, I am going to show you an alternative method for creating a growing fire, based on an animated mask. The mask is generated with VRayDistanceTex from an animated box. Since we have full control over how far and how fast the mask expands, the fire is more directable than fuel-based. This method is more practical for production. That's why I prefer this technique.

Though I am using fire trails as an example, the same concept can be applied to many other burning effects - like a burning watchtower, a burning paper with the flame growing on a path of a letter, etc.

Overall setup. The fire is emitted from the plane on the ground. To control where the fluid is to be emitted, we place an animated box on top of the plane. The box is then added to the VRayDistanceTex object list. The VRayDistanceTex is a V-Ray specific procedural texture that returns a different color based on a point's distance to an object(s) specified in a selection list. So this procedural texture can be used in the mask slot of PHXSource. This way, we can direct the growth of fire simply by keyframing the box.

The box (22 X 38 X 568 cm) is animated in its height, with Noise Modifier on top, so the box can be used for the expanding of the fire as if it burns from one side of the plane to the other side. It is not necessary to be a box; it can be any geometry. We use box, in this case,  because we're going to create fire trails, and a box seems to be a natural decision for me.

Be sure to put the Box in the Exclude List in the Scene Interaction rollout of your Simulator. Otherwise, the geometry will disrupt your fluid simulation.

Fire / Smoke Source (PHXScource). For the fluid source, pick up the Plane in the scene. Put a VRayCompTex in the Mask slot. Set the Mask type to Texmap.

In the VRayCompTex, put a VRayDistanceTex in the Source A, and add Box001 in its Object list. This will generate a black-and-white mask for the PHXSource. To further make the mask more organic, we composite it with Source B - a procedural noise. In the end, you will have a growing mask as the image shown on left-bottom.

As for fluid simulation, beginners may find it is not easy to get the appearance of the fire they're after. Above is an image simulated with default dynamics and rendering settings. It is not bad but also it is not the type of fire we want in this case. There are several things you can do when creating small scale fire:

1. Use an appropriate conservation method in the Dynamics. The first thing to do is to change the conservation type. The default settings are Direct Symmetric + Multi-Pass, but they do not work for small scale fire. So we shift the conservation method to Direct Smooth and Backtrace for the Material Transfer. We also increase Steps Per Frame to 3, so we have a less noisy and smoother fire.

2. Gradient and Curve. Second, the curve in the Volumetric Options also plays an important role. Although the two images above look totally different, they are actually from the same simulation. The only difference is the curve and gradient in the Volumetric Settings. The default curve (left) creates an overexposure in the rendering, losing most of the details in the core of the fire; while the curve on the right shows details in the whole image. Notice the control point on the curve affecting the core strength of the fire and the corresponding color gradient at that position. With this curve and a custom-made gradient, we can have a flame without an over-exposure at its core (the highest temperature), as well as a realistic orange-yellow-blue color transitions.

3. Fire Opacity Modulation. The third thing is opacity modulation. This step might look trivial at first glance, but it affects the final look of your fire a lot. By default, the root of the fire appears too solid, and you can alleviate this problem by putting a VRayDsiatnceTex in the Modulate slot.
In the Objects list for the VRayDistanceTex, we add Plane001. This produces a mask modulating fire opacity at its root, and you get a more realistic fire by doing so. If the fire is set on a car hood, then you should put the hood bonnet geometry in the object list instead of a Plane. You get the idea.

4. PHXTurbulence. If you like your fire more energetic, you can add a turbulence force in the scene. With the right amount of Strength and appropriate size, the force will push the fire around, giving it an extra level of realism. Of course, if you like your fire more gentle, you can skip this step.Notice that I have also put a Plain Force act as a wind blowing the fire, but it is optional.

Final Results:


Another example with an extra bitmap (logo) composited in the mask for PHXSource:


Download the fire trails scene
The scene file for fire trails is rather small, and the setup is compact. As this article is not written in a step-by-step fashion, to make your life easier, you can click here to download the file and explore the scene yourself. Volumetric Setting file (*.tpr) file is also included. Happy sim and enjoy!

By Hammer Chen, Kristin Ivanova

In this article, I show how to create a fruit explosion with Phoenix FD for 3ds Max. The fruit explosion consists of two fruits colliding at a high speed, then they smash and their juices splash out.

For the purpose of illustrating this article, we’ve shaded the fruits to get a tomato-ye look. However, the shape and shaders of the two geometries can be customized to your liking to get whatever kind of fruit you want to smash We don’t focus on the shading information of the fruits here..

The most challenging part of this animation is the fruit mesh smashing. Instead of softbody or cloth simulation, I use 3ds Max's Morpher Modifier and keyframe the splitting fruit meshes. I avoid using any softbody/cloth simulation in this tutorial, because it is difficult to control the results. By keyframing the animation, you have full control and are able to add layers of detail.

Since the mesh motion purely relies on keyframe animation, it is crucial to find the right reference footage to align with. You could search for keywords like "high speed fruit" or "fruit explosion." Or you can go through any stock footage sites. Once you find a good footage, load it in 3ds Max. This way, you can align your keyframe animation to the footage in the viewport accurately.


1. Fruit geometry deformation
Based on observation from reference videos, I concluded that one basic fruit mesh and four different deformed meshes would be enough to recreate the fruit splitting effect. Start from modeling the basic shape. The fruit is modified from a simple sphere and the mesh is split as shown in the image above. All other four deformed meshes are derived from this basic mesh. This is to make sure all five geometries have the same topology and can be used as morph targets later.


We duplicate the basic mesh into four other meshes.. By moving the vertices or adding modifiers on top, we create four different deformed fruit meshes: split, bump_shape, dent, and FFD_deformed. These four geometries represent the various stages of changing the shape of the fruit during the collision. Add a Morpher modifier to the basic mesh and load up the four geometries as morph targets.

The above image shows the curves of four morph targets in the Curve Editor. At frame 15, the fruits collide. By mixing the various target shapes, we mimic the smashing effect when the two fruits collide, deform and rupture.

Beside the Morpher modifier, we add a Ripple modifier on top to get subtle oscillations when the fruits collide. Then, we keyframe the Ripple to emulate the effect.To randomize the motion and shape, we add an FFD3X3X3 modifier and set the keyframe to its Control Points. Then, we add a Shell modifier which enables the liquid to collide with the fruit meshes.

Once the single fruit is ready, we duplicate and rotate it, and then slightly shuffle the parameters in the Modifier stacks, so that the two don't look the same.

When the two fruits collide, we have to note that there must be one fruit that pushes the other. In this case, we assume that the fruit on the left side is stronger. We create a Dummy helper in the scene. Both fruits are linked to dummy. When they collide, set the key of the dummy so that the two appear moving together.

Final keyframed animation


2. Fluid Simulation 
Now that the fruit mesh animation is done, we're ready for the next stage - fluid simulation. Let’s put two ring-like geometries inside the two fruits (displayed as See-Through). These two ring meshes are added to the Liquid Source’s Emitter Nodes list.

In the real physical world, the juice (pulp) is packed full inside the fruit and it pops out when they collide. We don’t use the Phoenix FD Properties/Initial Fill to fill the fruit. Initial Fill, provides less control over the liquid leaking problem. Instead, we use a ring-shaped object to emit liquid. This way it is easier to control the fluid, especially when you have a fast-moving object . 


Keyframe the Outgoing Velocity so that it emits liquid from frame 9 and then stops at frame 15. This way we get an intense burst of juice when the fruits collide.

System Unit and Simulation Grid: The Cell size of the Liquid Simulator here is 0.64cm. Enable the Adaptive Grid option. In the real world, regular fruit size is in centimeters range; therefore, we set our 3ds Max System Scene Scale to Centimeter. Our fruit size is 50 cm in diameter. This is one giant fruit. We deliberately make it big because with a large object you get longer distance for fluid and mesh to run, which makes it more manageable when adjusting the effect.

Dynamics: Because gravity is not necessary in this case, let’s set its value to very low. The fruit moves fast, so increase the value of the SPF. I have set the Viscosity and Surface Tension to small amounts to give the liquid a little viscous look. Keyframe the Time Scale, so that we get a bullet-time effect when the fruits explode.

The curve shown is how we keyframe the Time Scale, so after the simulation, we have an exploding fluid that moves slowly over time.

Left: without Mesh Smoothness enabled; Right: with Mesh Smoothness enabled. For Mesh Smoothing, set the Smoothness to 10 and the Particle Size to 0.5.

Fluid simulation results


Final results


Download the Scene files
As a user, I know it's always handy to have the scene when following a tutorial. Here we provide you with the final scene to start with. Please note that the HDR image is not included among the assets in the zip file, so you may find differences with the final images. Feel free to insert your own  HDRI  into the V-Ray Dome light. Click HERE to download. Enjoy!
Older Posts Home
  • Home

Search This Blog

Categories

3dsMax Nightly Svetlin Nikolov tips & tricks video tutorial

Recent Posts

Powered by Blogger.

Blog archive

  • ▼  2021 (1)
    • ▼  January (1)
      • Making of Lava Flow with TexUVW
  • ►  2020 (2)
    • ►  September (1)
    • ►  March (1)
  • ►  2019 (5)
    • ►  July (1)
    • ►  June (1)
    • ►  April (2)
    • ►  January (1)
  • ►  2018 (8)
    • ►  December (2)
    • ►  November (1)
    • ►  October (1)
    • ►  September (1)
    • ►  May (1)
    • ►  March (2)
  • ►  2017 (8)
    • ►  November (3)
    • ►  September (5)

LINKS

  • Phoenix for Maya QuickStart videos
  • Phoenix for 3dsMax QuickStart videos
  • Documentation Page
  • Official Forum
  • Official Tutorial page
  • Phoenix FD Facebook Group
  • PhoenixFD Vimeo Group
  • Ivaylo Katev's vimeo
  • Svetlin Nikolov's youtube

Copyright © 2015 Chaos Phoenix's Blog . Designed by #