Material for Particle


Panels for matrial setting is shown in property panel by clicking material icon.


Material settings for particles determine size, color, texture and shader of the each particle.

Particle system can have multiple materials. If particles have data of its type, particles with type 0 are shown with material.0, and particles with type 1 are shown with material.1 and so on. Particles can be rendered in several way. Shader mode setting determines how data are rendered. Point material mode, Billboard material mode, and sphere material mode exist.

Point Material



In point material mode, data are rendered as point cloud.
This mode is the fastest rendering mode, and with the help of shaders or textures, particles can have looks as if it were not just simple points.
However, since it is rendered as 'points', some failure of rendering may occur. Expecially, when camera is too near to the particle system, or using fisheye or other special rendering mode.

Shaders

Though point drawing in classical openGL pipeline is quite simple (just a dot or point with some pixels size), it can be rendered with effects using GLSL shaders.
The shader mode determines the basic shapes of points.


Point shader

This shader renders particles as classical box-shaped points.

Circle shader

Circle shader draws each particle as a circle, (not a square in originl point drawing). It is good to express featureless particles.

Pseudo Sphere shader

This shader draw cirlces with shaded color. This shade is not rendered in a usual way, but calculated inside the shader, and shown on the screen as a colored circle.
Thus, this particles are not true spheres, but like billboards with automatically calculated texture (which look like as images of spheres).

No Rendering

Hide unnecessary particles.

Billboard Material

In Billboard Material mode, particles are rendered as a billboard with physical size (not pixel based size). Some what slower than Point Material, but several weak points of Point Material can be resolved with this mode.
Billboards look towards the camera, (Not parallel to the direction of camera), and can be used even in the fisheye or equirectangular rendering.



Most common way to use Point or Billboard Material is to express gaseous particles with texture.
Note that when semi-transparent texture is used, proper settings for sort is necessary to prevent incorrect hidings of particles.

Sphere Material

In Sphere Material mode, particles are rendered as 3D objcests with shape of sphere.



Rendering speed is not so fast. However, since all polygons would be rendered faithfully, they can cast shadows and the rendereing would not be broken even if fisheye or other special rendering mode is adopopted.

Common Settings

Parameters on this panel is commonly used for materials.

Dissolve

In "full" dissolve mode, semi-transparent object is drawn stocastically pixel-by-pixel.
Combining this effect with ensemble-averaged rendering, stocastic transparency method can be used.

In "Not-full" dissolve mode, only very low alpha polygons are drawn with dissolve effect.
This mode is implemented to prevent Mach-band to some degree in the case with drawing many low alpha polygons.

1pass-2pass

If all particles are non-transparent, Z-sorting is not necessary. Or, if blend type of all particles are additional one, drawing without depth buffer rendering is O.K without Z-sorting. Otherwise, Z-sorting is required, and it can take significant time.

However, some special combination of particles type can be rendered without Z-sorting.
In two pass rendering mode, alpha-blend particles would be drawn at first, and then, additive-blend particles would be drawn without depth buffer rendering in second pass. If alpha-blend particles are all non-transparent ones, this case does not require Z-sorting.
For example, solid particles within thin gas particles can be rendered with this method.

Texture

Define textures used for particles. You can add new texture with "+" button. You can use up to 3 textures for one particle system.
Note that defining texture in common setting does not means it would be used in rendering. You must set texture index in material settings for each material type.

Point Size

In point shader, size of particles must be set in unit of pixel. If it is set to constant, the size of point is set constant (regardless of its distance from camera). Instead, if it is set to be "depend on distance", the size is set according to its distance from the camera. In this case, a particle with a distance that equals to the configured value would be shown with the defined point size.

Alpha Crit

Sometimes, many large but thin particle, which is not important, exist in the data. They can consume much rendering time. The fragment shader discard the pixel with alpha value under this criterion. This can fasten the rendering. Of course, there is a trade-off between speed and accuracy here.

Division Depth

When rendered as sphere, this parameter controls quality of its polygon shape. Same to the parameter in primitive sphere object.

Material Settings

Name

The name is just a tag for users and has no effect. It may be useful if you have data with many types, such as stars, gas, and darkmatter, etc...

Constant Color / Color Curve

Each material have constant or variable color based on color curve. Particle system can have multiple color curve information, and each material can use different color curve.
Color curve is selected via its index.

Dependency for color curve

When color curve is used, you can select what data is used for input value. Particle inde, size, ID, value1-3, its position (x,y,z), sorted index, and Lua script can be used.

An example for z-dependent color curve.



When Lua script is selected, edit button is shown in panel.
If text editor panel is shown, the target of the editor will be swithed to the script by this button.

Blend mode

Alpha is a factor that controls transparency. Alpha 1 means non transparent, and 0 means full transparent. Alpha blend is normal blending mode for semi-transparent object.
In this mode, "(1-alpha) * background_color + alpha * forground_color" is used for mixing of semitransparent object.
At additive blend mode, color of foreground object is added to the background color. This mode is good for brilliant particles such as stars. In the case that alpha blend is too dark and additive blend to too bright, use Mix blend.

Size Factor

Particles can have size factor data respectively. When "Use Data" is selected, size factors are multiplied to the common point size. When "Constant(1)" is selected, the size or particles are neglected and treated as 1.
Finaly, an aditional numerial factor is multiplied to the common point size.

Emission Color

Base color of particles. (It is similar to ambient color but named emission because it does not affected by lightings.)

Diffuse and Specular Color

In sphere material mode, or using pseudo sphere shader, additional two colors for diffuse and specular can be set.

Alpha

Alpha determine the opacity of particles. Alpha 0 means entirely transparent object. If this parameter is set to constant, all particles has the same opacity determined by the Alpha Factor.

When this is set Depend on R (power -2), the opacity depends on particle radius square inversely. This is good to represent SPH simulations, because the density depends on R-3, while the length of the light path which travel through the particle depends on R, the absorotion of the light roughtly depends on R-2. In this case, Opacity is set to Max[Amax, (R/Rbase)2], where Rbase and Amax are set by Base/Max parameters.

Note that R is evaluated after the size factor multiplication process. So if you chaneg parameters such as common size factor, particle opacities would be changed.

Texture

Bind texture image to particles via texture index. For example, with a texture like glaring light, you can render particles like shining stars.


Note that in Pseudo Sphere shader, texture is mapped to the box-shaped point itself. Use Sphrere Material Mode to obtain texture mapped spheres.

return
inserted by FC2 system