Jumat, 21 Februari 2014

VOLUMETRIC Understanding Point Density


I continue further with my research on Volumetric Rendering in Blender and have a go at trying to understand how all these really works. By no means I know everything, no I am not. I am actually learning from few available video tutorials out there, documentations and forum discussion.

In a way, I am writing this as note that links all those together, hopefully it is useful for you guys.

####################################################################

BLENDER ONLINE DOCUMENTATION ON VOLUMETRIC
http://www.blender.org/development/release-logs/blender-256-beta/volume-rendering/
http://wiki.blender.org/index.php/User:Broken/VolumeRendering
http://wiki.blender.org/index.php/User:Broken/VolumeRenderingDev

USEFUL VIDEO TUTORIALS ON VOLUMETRIC
Creating cloud texture by Nick Keeline:
http://vimeo.com/7177831

Cloud works by Matt Ebb
http://vimeo.com/2272749

Smoke Intro by Andrew Price (The Blender Guru Blog) --> Smoke simulation will be discussed at different article blog, when I understand Smoke a bit better.
http://vimeo.com/9442673

Nions Channel: (great inspiration)
http://www.youtube.com/user/NionsChannel

Matthias Müller Particle Works
http://vimeo.com/user624589

####################################################################


Previously, I wrote about Voxel Data and Point Cloud, I will recap them again:

  • We learned that "MRI scan data" or image sequences of slices can be imported into Blender as a Voxel Data that then can be rendered out as volumetric render. This Voxel Data is STATIC.
  • Voxel Data in Blender is also closely related to Smoke Simulation, which is probably the coolest part of all this Volumetric Rendering. Smoke Simulation is DYNAMIC. Smoke is a big topic but also very interesting to study, I will discuss this in the future post.
  • Point Cloud is a different topic that I should probably have separated this into a different article, but interesting enough since we are talking about "points" which more or less close to Particle Simulation, so they are sort of long distance relative.
  • Point Cloud can actually be rendered as Point Density

POINT DENSITY
Now, in this article we will talk about Point Density. From my understanding Point Density is a way to render Particles as Volumetric objects  or Voxels. Point Density is based on Particle System or Object Vertices. --- This also means we can also render Point Cloud volumetrically via Point Density.

I have not really write about Particle System, which probably I should have touched before trying to touch this topic on Volumetric Rendering. We will sort of learning backward (from SHADING back to setting up actual SIMULATION), but dont worry we try to touch everything.

Below is a rough diagram of all these together:


Up to this far, we basically has been mostly touching VOLUMETRIC SHADING and RENDERING. The volumetric rendering result is depending on what data coming from (DYNAMIC SIMULATION or STATIC). In the end, we are converting those information into voxel that is then rendered out to look like fog, fire, cloud, smoke, etc.


Again, all these elements are overlapping, so it is can be just a bit confusing at first.


Volume Material, and how this Material works together with Texture, is something to understand in order to get a good render result. --- as you know in Blender there are 4 types of Material: Surface, Wire, Volume, Halo. At this time, make sure you set renderer using Blender Internal Render, not Blender Cycles. Blender Cycles cannot render Volume Material yet.

VOLUME MATERIAL
Lets take a look at Volume Material, a little deeper. Volume Material by default has a Density value of 1. If you left it as is and test render on a 3D mesh (with volume), you will get a volume render that is more or less like a fog. This Volume Material will react with lights and also has subsurface scattering effects.

Default Volume Material. Not very visible, semi transparent, and a bit noisy.
With Density = 1, we can increase Density Scale = 20 (from default of 1). Value of 20 might be overkill for most case, but just to make a point.

Density Scale = 20, it is much thicker.
Now, under Integration, set Step Size from default 0.2, to 0.02.

Step Size = 0.02. The blocky result is because of Light Cache. See below for more information.

Changing Step Size will give you smoother look. Careful not to make it too smooth, as you like that bit of noise to look more realistic.

Now you have something that is solid enough like dense smoke, yet still appear fuzzy and has some transparency. These are the settings you can play around until you get the look you wanted, but basically those are a good start.

By default, Light Cache option box is Checked, with value of = 50 by default. This is actually way you can reduce render time. You can Unchecked this when you do final render (most accurate). Or you increase to higher value, less accurate, but faster for render.

Turn on also Full Oversampling for maximum quality of voxel render.

Before we continue by making Density value to 0 (zero), and have the Density controlled by other means (Voxel Data, Point Density, other 3D procedural texture), have a play by adding Texture and test all the options to see the effects of each parameters. See also the effects of Light for this material.

Light will affect the render result, whether you put the light behind, inside, or at the front of object will influence the volumetric render. Subscatter is how much light can go inside a volume before it gets scattered.

Pay attention to Transmission, Emission, and Reflection under Material,
Check also their options under Texture - Influence.
Blender Material Preview can be really helpful to see quickly the resulting effect. Sometimes it is not available depending on the options you set.

ZERO DENSITY TO HERO DENSITY
Now, it is time to set Density value to 0. We will now fill up the Density using different data. We will focus on Point Density and other 3D textures option, since we already touch Voxel Data a bit. Voxel Data will relate to Smoke Simulation, we will talk about it in the following post.

We want to have the Density controlled by Texture. Under Texture Tab, check Density and uncheck everything else for now. By default, Influence-Emission Color is checked. Uncheck this and activate Density instead:



There are some options available under Texture Type: Point Density, Voxel Data, Clouds, Musgrave, etc all the 3D Procedural Texture).

And this is where you can adjust the look of Volume Material. Think of it like this, when you set Density Influence on, you will be affecting the Density based on the value of the texture (WHITE = density value of 1, BLACK = density value of 0).

From now on, we will solely focus on a BOX as our "Domain" object. When you later work with Point Density, only Particles/Vertex inside this BOX will be rendered out.

Before going to Point Density. Lets try some of Procedural 3D Texture and see how it affects the Density (adjust the Density Scale if the result is too thick):

Clouds - Hard - Blender Original

Clouds - Hard - Voronoi
Distorted Noise, with less Density Scale value
Blend texture (gradient).
Marble texture

Musgrave

There are unlimited possibility of Density look you can get. You can also LAYERS those texture to have more complicated look, which is beyond the scope of this post.

VOLUMETRIC SHADOW
Before we go further, I need to also mentioned this important information. If you want to render Volume and have proper shadow (transparency), make sure that on the ground object Surface Material, you enable: Receive Transparent.

BACK TO POINT DENSITY (finally!)
Ok, now we are ready to touch Point Density.

We will use this BOX volume to contain our Particles or Mesh Objects. Similar to what you did with ZERO DENSITY setup above, but now instead of controlling the density via 3D Procedural Texture, we will use Point Density.

We will use this Donut geometry as our Mesh Geometry source for the Point Density.



Under Point Density, you have 2 options: render from Particle System or Object Vertices.Since you may not be familiar with Particle System, we can just use Object Vertices for now. They are more or less treated the same, every "points" is equal a radius of Voxel.

NOTE: With your BOX, be aware that if you want to SCALE or MOVE them, make sure you do that OUTSIDE of edit mode! Depending on situation, sometimes scaling the DOMAIN BOX can cause confusion for simulation.

Render result of Volumetric Density based on Point Density: Object Vertices.
Turbulance option turned on.

High intensity turbulance with Voronoi Noise Basis.

Voronoi Crackle Basis. The black color is self shadowing from the source mesh.
If you make the source mesh transparent.
As you can start to see the result is starting to look gorgeous. You are affecting Volumetric voxel at Shader level. Even with just using a Static Mesh, you can have some turbulance details.

Of course with Particles, you can take this to the next level. Particles can filled up a volume so you can have a Volumetric Render that is more "solid", it can be simulated as well to create animations.

Particle System, 8000 Particles filling up the volume of mesh.
More solid volume.
With Particles Simulation, you can of course use Force Field, like actual Turbulance that affects Particles:


As a result you will also affect the Volumetric render and if you add Turbulance Basis at Shader Level, you get something like below:


Remember that this is NOT Blender Smoke Simulation. The behaviour of this is still pretty much like Particles. Smoke Simulation can give more detailed and realistic look and animation of actual smoke.

Anyhow, at least you can starting to understand Point Density inside Blender. Right? I hope so. Its not particularly easy, but I think its still a lot simpler than trying to achieve this in other commercial 3D packages.

BONUS: If not known already, Blender comes with "Cloud Generator" add-on. It does an automatic setup for your for Point Density, more or less what we have discussed above. Have a look and do reverse study, you will understand it better.

UPDATE 2012.08.19
CGDudes has some awesome tutorial and demo vidoes on smoke and fire using Blender:
http://www.youtube.com/watch?v=cWNH3Jd7NqU&feature=player_embedded

Related Posts by Categories

0 komentar:

Posting Komentar