| Previous Topic (None) | Up (PRT Volume) | Next Topic (None) |
PRT Volume Grid And Random Particle Generation
Available in Krakatoa v1.5.1 and higher
Overview
- Krakatoa v1.5.0 introduced the PRT Volume object which can fill a geometry volume with particles by turning the geometry into a Level Set and then placing one particle in the center of each voxel.
- Krakatoa v1.5.1 added the ability to create more than one particle per voxel, thus allowing for the creation of dense clouds using low-resolution level set grids.
- In addition, it provided the ability to generate stable patterns of randomly distributed particles, producing a diffuse cloud without the grid pattern alignment.
- Diffuse (randomly distributed) clouds are better suited for particle (point) rendering.
- Rendering diffuse (randomly distributed) clouds in voxel mode can produce certain amounts of noise because a varying number of particles would be found in each voxel if the render Voxel Size is different from the spacing value of the PRT Volume.
- Grid distributed particles are generally better suited for voxel rendering.
- In addition, it provided the ability to generate stable patterns of randomly distributed particles, producing a diffuse cloud without the grid pattern alignment.
- Krakatoa v1.6.0 introduces an option to the Grid distribution method that can apply random jittering to the particles in the cube and produce results similar to the Random In Cube ones, but with less overhead.
- This method does not guarantee equal distribution of particles without clumping, but in the majority of cases its results are very usable - for that reason, this is now the default particle generation mode of the PRT Volume.
Exploring PRT Volume Particle Distribution
Grid Distribution - One Particle Per Voxel
- Let's create a simple default Teapot primitive for our tests:
- In the following screenshots, you see Spacing of 1,2,4,8 and 16.
- The left column shows the PRT Volume particles colorized using a KCM setting the Color to the Normal channel.
- The right column shows the original Teapot, the PRT Volume particles and the Level Set Voxels as seen in the Left viewport:
- As you can see, as the Level Set resolution goes down (Spacing / voxel size goes up), more and more detail is lost and less particles are created, because each voxel gives birth to only one particle, and this only if it is inside the volume of the mesh.
Grid Distribution - Grid Of Particles Per Voxel
- In the following examples, we will balance the reduced level set resolution by creating a denser grid of particles inside each voxel.
- The left column shows the Teapot primitive at Spacing of 1,2,4,8 and 16 using Grid Subdivisions of 1,2,4,8 and 16 to balance out the increasing voxel size.
- A Subdivision of 8 means a grid of 8x8x8 = 512 particles will be created inside every voxel and so on.
- The right column shows a Geosphere primitive at Spacing of 1,2,4,8 and 16 and Grid Subdivisions of 1,2,4,8 and 16 respectively:
- The left column shows the Teapot primitive at Spacing of 1,2,4,8 and 16 using Grid Subdivisions of 1,2,4,8 and 16 to balance out the increasing voxel size.
- As you can see, up to Spacing of 8 the loss of detail does not affect the Geosphere much, in fact it makes it appear smoother.
- At Spacing of 16 both the Teapot and the Sphere start to generate, but the particle count is still close. If a very rough shape is expected, for example to create a Cloud in the sky, lower resolution Level Sets can be very fast and useful.
Random Particle Distribution
- When rendering in Particle mode, the Grid distribution can become a problem - if the spacing is too low, the particles would not overlap enough within the rendered image and the spaces between the rows and columns could become visible.
- The Random Particle Distribution method creates one or more particles in each voxel, but not at the center of the voxel or in a regular grid, but randomly.
- The randomness is not completely chaotic, every voxel always produces the same random distribution, so there is no flickering of particles between frames.
- Also, the random distribution is "tileable", so there are no artifacts between the edges of neighboring voxels.
- In the following examples, the Teapot primitive shows the Random Distribution using Spacing of 1,2,4,8 and 16.
- The left colums uses a singe random particle per voxel.
- The right column uses a Power Of Three value to compensate for the increasing voxel size - at spacing of 2 it has 2^3 = 8 particles per voxel, at Spacing of 4 it uses 64 random particles, at Spacing of 8 the value is 512 and for spacing of 16 the value is 4096:
Rendering Random Particle Distribution
- The following images show the Particle Rendering output of the same teapot.
- The left column uses Spacing of 1, 2 and 4 and Random particle count of 1.
- The right column uses Spacing of 1, 2 and 3 and Random particle count of 1, 8 and 64 to produce the same density: