5. PresenZ specifications for transparent and reflective surfaces.¶
5.1. Deep reflection¶
One major goal of PresenZ is for our volumetric rendering to look exactly like the same 3D scene that you are using for a ” standard perspective ” rendering. Unless you really know what you’re doing you should always do your final renders with the deep reflection parameter enabled. Rendering without it would make any reflection feel like it is baked on the surface of the reflective object.
5.2. The thickness of a surface.¶
For thin double-sided objects, without much thickness and without the same material on both sides, PrezenZ may mix up the backside/frontside material on one side. This happens if you can see the two sides of an object inside the zone of view. If you need two different materials on each side, try to give the geometry a little thickness.
5.3. The transparencies for windows.¶
This is applicable for clear transparent objects like windows, glasses, a glass fish tank, etc ... .
Below we can see the position of the VR camera inside the zone of view. The further you will be from the center of the ZOV, the stronger the effects of baked transparencies, except if you are using the material designed for transparencies in PresenZ.
Using the native V-ray materials on glass in PresenZ, will lead to a skewed perspective on objects behind glass. Almost like they are coming towards the viewer. This is because the transparencies were baked in the glass. As we can see marked in red on the image below, it may seem like the transparency is correct from a certain angle, but as soon as we move and look around inside the zone of view, the effects of the baked transparencies will be more visible.
If we use the modified V-ray material for PresenZ to render glass, this problem will no longer occur. Whatever position you may be in or whilst moving ( as seen in the image below). If you do not specify an object as glass. All the transparencies and refractions will be baked at its surface and it will be similar to a “stereoscopic poster” of the scene behind the glass surface. This works quite well for glass far away ( 10 meters or more ), or for complex refractive objects like a lamp or a vase.
5.4. How to setup the material for a transparent object¶
This is applicable for closeby transparent objects like windows, glass fish tank, etc ... . Not mandatory for curved and irregular glass objects, or windows further away than 20m. Without doing anything special the transparency will be stereoscopically baked onto the surface, as explained in the chapter above.
There are 2 ways to set up materials for transparent surfaces in PresenZ. Notice the difference in the image below.
- Using the “Glass Dialog” button in the PresenZ toolbar to tag an object. This will make the tagged object transparent, but you can’t have any textures on it.
- Creating and applying a PresenZ glass shader to your object. With this solution you can apply textures to your glass object.
5.4.1. Adding a tag in object properties¶
On the PresenZ toolbar you will find the following button.
Select a transparent surface that you wish to render as such. Click the button and a window will pop up.
- Transparency: By default this will be set to 1,0 . This controls how transparent your mesh has to be. For a perfectly see through window 1,0 is recommended.
- IOR: By default this is 1,6. This should match your IOR settings from the material shader you used for the surface.
By clicking ” set glass attributes ” the following lines will be added to your selected mesh’s object properties.
This will tell PresenZ which object to render as a transparent object.
The transparent material must be applied on the whole object’s mesh, and not on some faces only. Just like the prz_glass_IOR flag which is only effective on the whole object. The V-ray Multi/Sub material, assigns materials by ID and thus can’t be used for a transparent material in PresenZ.
5.4.2. Creating and Applying a PresenZ glass Shader¶
In the near future we will provide a way to automatically convert the shader.
- Open your material editor
- Navigate to Materials -> V-ray -> VRayPluginNodeMtl. The PresenZ glass shader has to be embedded in the VRayPluginNodeMtl.
- In the dropdown window in your parameters select ” BRDFPrzGlass “
- In the parameter block you can adjust your settings to match your original VrayMtl shader
- For example, here we have our original shader (Above) with a refract bitmap linked to it. In our new PresenZ glass shader (below) we adjust the settings in the parameter to match our original shader, and link the refract bitmap as well.
- Apply the new material shader to your object, overwriting the old one.
Since you are applying a texture on a surface make sure that your UVW Map is set up. Otherwise the texture might be mirrored on the otherside of the object.
5.5. How to render the transparent surfaces for PresenZ¶
Transparent surfaces in PresenZ must be rendered in two passes, with two different PresenZ settings.
- With the presenz parameter “opaque only” option selected, the surfaces with the prz_glass_IOR or special PresenZ shader will be ignored and not rendered.
- With the presenz parameter “transp only” selected, only the surface with the prz_glass_IOR or the shader will be rendered.
- With the presenz parameter “opaque and glass” selected, will render both passes.
5.6. The transparencies for irregular or curved objects in PresenZ¶
Some transparent objects do not need to be rendered with a special shader and pass, because the objects’ curvature distorts most of the refractions. Flat and transparent surfaces far from the viewer ( more than 20m ) can also be rendered with the original shaders.
For the transparent and curved object, the standard transparent mtl shader can be used with the trace refraction enabled. These shapes alter the geometry of shapes behind them , hence why we can use the normal shader with all the refractions traced and with the PresenZ deep reflections parameter enabled.
5.7. Stenceling by opacity¶
The stencil is a method to cut a surface with an 8-Bit alpha map. For instance in V-ray this consists of assigning a map in the opacity slot of the mtl_shader. Applied on a flat object, the shader will only be computed where there is opacity through the white on the alpha channel, but this will cause complications with PresenZ.
|The stencil applied. It will be rendered correctly by V-ray, but will lead to complications with PresenZ|
|PresenZ - without stencil||PresenZ - with stencil|
This is the typical artifact of a stencil in PresenZ. The wall behind the tree can not be reached by camera rays, because the opacity map is not considered by PresenZ for the spatialisation. The strange artifact caused by the tree stencil cannot be avoided. The only work around is to model the tree and avoid the use of stencils.