Lighting and Rendering / Maya
This page contains the information about lighting, rendering and background settings which can be used with Verge3D for Maya.
- Environment Lighting
- Reflection Cubemap Light Probes
- Reflection Plane Light Probes
- Global Rendering Settings
- Ambient Occlusion
- Outline Rendering
- Per-Object Rendering Settings
- Rendering on HiDPI (Retina) Screens
- Fit to Camera Edge
- Visibility Breakpoints
- Clipping Planes
Verge3D is designed to represent Maya's Viewport 2.0 hardware renderer as closely as possible. It supports physically-based shading, lights, shadows and image-based lighting (IBL).
Environment lighting is a very important component of Verge3D graphics pipeline. You can illuminate your entire scene with just an environment map alone, without using any light objects. See the Scooter demo as an example of this approach.
The default cube template provides an HDR texture for image-based lighting. You can replace this texture with your own file, or setup environment lighting from scratch. To do so, simply append Arnold's aiSkyDomeLight object to your scene and assign some texture to it as Color.
In addition, you may use the Intensity attribute to tweak intensity of your environment lighting and Texture Resolution to configure its quality:
- Low (64x64) and Medium (128x128) - values are not supported, Verge3D will use High (256x256) setting instead of these.
- High (256x256) - optimum quality with low memory consumption (default value).
- Higher (512x512) - better quality with moderate memory consumption and reduced performance. Use it to render high quality reflections e.g for rendering jewelry.
- Ultra (1024x1024) - best quality with high memory consumption and low performance (generally not recommended).
When using HDR texture for your skydome, make sure you set the Color Space setting to Raw:
You can also aiSkyDomeLight without any texture to simulate light coming evenly from all directions. However, it's much more efficient to use Ambient Lights for that.
In some cases, using just image-based lighting to illuminate your scene is not enough. If you'd like to simulate some additional light source, need dynamic shadows, or if you need to move your lights (as with car lights), you may use direct light sources.
Verge3D supports the following light types:
- Ambient Lights - Color and Intensity attributes are supported in Verge3D.
- Directional Lights - Color and Intensity attributes are supported in Verge3D.
- Point Lights - Color, Intensity and Decay Rate attributes are supported in Verge3D.
- Spot Lights - Color, Intensity, Decay Rate, Cone Angle and Penumbra Angle attributes are supported in Verge3D.
- Area Lights — Color, Intensity attributes are supported in Verge3D. Light transform scaling controls the emissive area.
In addition, you can assign Depth Map Shadow Attributes on Directional, Point and Spot lights. See here for more info.
Reflection Cubemap Light Probes
Verge3D add-on adds a custom light probe object called v3dReflectionCubemap, which can be used to apply indirect lighting to objects via a local reflection cubemap.
The new light probe object can be found inside the custom Verge3D shelf:
This object defines a volume of influence represented by a box or a sphere.
All objects contained inside that volume will use a local reflection
cubemap generated in runtime instead of the scene's global environment
The advantage of using a local reflection map is that it has surrounding objects baked in it, while the scene's global map only contains the background texture/color that can be specified via Arnold's aiSkyDomeLight object. Local reflection maps also have a parallax effect depending on the geometry of the influence or parallax volume.
v3dReflectionCubemap objects have the following parameters:
- General Settings
general light probe settings:
- Influence Type
- type of the influence volume: Sphere or Box. Only objects located inside this volume are affected by the probe's lighting. Default is Sphere.
- Influence Distance
- the size of the influence volume. You can also change object scaling and make the shape of the influence volume non-uniform. Default is 1.0.
- the intensity of the indirect lighting. Any value different from 1.0 is not physically correct. Default is 1.0.
- Clipping Start
- near clip distance. Objects located closer than this value won't be rendered into the reflection cubemap. Default is 0.1.
- Clipping End
- far clip distance. Objects located further than this value won't be rendered into the reflection cubemap. Default is 100.0.
- Visibility Selection Set
object visibility settings:
- Selection Set
- limit objects that should appear on the reflection cubemap to those belonging to this selection set. Choose the empty string option in order to not specify any set of objects - that way all scene objects will be used for generating the reflection cubemap. Default is empty string.
- Invert Visibility
- invert the selection of objects visible to this light probe if Selection Set is specified. Disabled by default.
- Custom Parallax
- Use Custom Parallax
- enable custom settings for the parallax correction. This group of settings defines a parallax volume, which is used to project the lighting captured by the probe. If Custom Parallax is not enabled the parallax effect is calculated based on Influence Type and Influence Distance. Disabled by default.
- Parallax Type
- type of the parallax volume: Sphere or Box. Default is Sphere
- Parallax Distance
- the size of the parallax volume. Default is 1.0.
- Custom Influence
custom influence settings:
- Use Custom Influence
- enable custom influence settings. This group of settings allows defining a selection set of objects that will be affected by this light probe. Selection Set (if specified) will be used instead of the Influence Type and Influence Distance general probe settings.
- Selection Set
- limit objects that should be affected by this light probe to this selection set. If specified it is used instead of the Influence Type and Influence Distance general probe settings.
- Invert Influence
- invert the selection of objects affected by this probe if Selection Set is specified.
Reflection Plane Light Probes
Reflection Plane Light Probes used to apply real-time reflections (indirect lighting) to planar objects, such as mirrors, floors, walls, etc.
The new light probe object can be found inside the custom Verge3D shelf:
Reflection plane objects have the following parameters:
- Influence Dist.
- Influence distance of the probe.
- Controls how fast the probe influence decreases.
- Clip Offset
- Near camera clipping for objects rendered in the light probe.
- Visibility Selection Set
- Selection set of the objects visible for the probe.
Reflection plane light probes can only act on surfaces with zero roughness and maximum metalness:
Planar reflection probes can greatly reduce performance of your scene, since they multiply the number of draw calls by a factor N+1. To make rendering faster, specify a limited set of reflected objects as the Visibility Selection Set property.
By default Verge3D renders the same background you see in Maya's Viewport (grey in most cases). When using image-based lighting (provided by aiSkyDomeLight objects) you see the environment texture instead.
To change your background to some other color, do not edit Viewport settings in Maya, simply assign Background Color and enable the Render Background attribute on your main camera:
You can use Maya's Render View window or Verge3D's Sneak Peek feature to preview the scene with custom background.
Global Rendering Settings
Global rendering settings accessible from the Verge3D Export Settings dialog window (Verge3D->Export Settings... in Maya menu).
select what anti-aliasing algorithm to use for the scene:
- use system default method.
- MSAA 4x
- prefer multisample anti-aliasing with 4x samples if the target hardware supports it.
- MSAA 8x
- prefer multisample anti-aliasing with 8x samples if the target hardware supports it.
- MSAA 16x
- prefer multisample anti-aliasing with 16x samples if the target hardware supports it.
- force fast approximate anti-aliasing (FXAA).
- disable anti-aliasing.
- Use HDR Rendering
enable high-dynamic-range rendering.
If activated, Verge3D will use 16-bit float textures as rendering buffers. This feature can significantly improve rendering of the Bloom post-processing as well as smoothness of node-based gradient textures. The downside of this — increased GPU memory consumption and reduced performance.
This feature is not related to HDR textures which are commonly used to produce image-based lighting, thus activating it won't improve rendering of such textures.
- IBL Environment Mode
- PMREM (slow)
- high quality (default value).
- Light Probe + Cubemap (medium)
- reduced quality of image-based specular reflections, better performance.
- Light Probe (fast)
- disabled image-based specular reflections, highest performance.
Ambient Occlusion is a rendering technique that improves a scene's realism by adding soft shadows from indirect (ambient) lighting based on how much the point is exposed to the light sources.
Verge3D implements Ground Truth Ambient Occlusion (GTAO), which settings you can find in the AO section of Verge3D Export Settings (accessible through Verge3D->Export Settings... in Maya menu):
Verge3D adds the ambient occlusion effect only for Standard Sufrace and aiStandardSufrace materials and only if the scene has environment lighting (via Arnold's aiSkyDomeLight object).
- Enable Ambient Occlusion in the scene.
- The radius (in system units) within which to calculate ambient occlusion. Higher values make the effect more noticeable by over-darkening and expanding the area of it, but also can decrease performance. Lower values make occlusion less noticeable.
- The strength of the occlusion effect.
- Trace Precision
- Higher precision means more accurate occlusion at increased performance cost. Lower precision means better performance but the effect appears less prominent.
- Bent Normals
- Use modified (or "bent") normals to sample the environment instead of the original ones. The modified normals represent the least occluded direction and make environment lighting a bit more realistic.
Outline rendering (aka silhouette edge rendering) is a common non-photorealistic rendering (NPR) technique that can significantly enhance the visual perception of your scene. This effect can be used for various applications such as e-learning, games, architecture visualization, and technical drawing.
To use object outlining (and optional glowing) in your Verge3D application, first enable the effect in the Verge3D Exports Settings:
then use the outline puzzle to apply it to your object(s).
The outline rendering does not work inside AR/VR sessions. Use other methods to highlight your objects, such as animation or changing material's color.
You can tweak outlining using the following properties:
Enabled — enable/disable the effect.
Edge Strength — outlining strength factor.
Edge Glow — intensity of additional glowing (rendered beyond the main outline edge).
Edge Thickness — outline edge thickness factor.
Pulse Period — pulse period in seconds. Specify to make the effect animated.
Visible Edge Color — visible edge color.
Hidden Edge Color — color of the outline edge being rendered behind any other scene objects.
Render Hidden Edge — enable/disable rendering of the outline edge behind other scene objects.
Though it's possible to render glowing objects, in the most cases the outline rendering is used to improve visual clarity of your scene. If you need glowing from lamps or another bright objects, consider using the bloom post-processing instead.
Per-Object Rendering Settings
Verge3D supports the following additional rendering settings for your geometry objects:
Render Order - modifies the rendering order for a particular object. The smaller the index, the earlier the object will be rendered. In most cases, you need to tweak this value when using Blend transparency to eliminate transparency artifacts.
Frustum Culling - enables/disables frustum culling optimization for the object. Uncheck this option if you have some skinned object which can move beyond the screen space to prevent it from being culled.
In addition, there is a set of object transform settings located on the Verge3D -> Advanced Rendering panel:
- HiDPI Compositing
- Render object using HiDPI compositing pass. See below for more info.
- Fix Ortho Zoom
- Apply inverse orthographic camera zoom as scaling factor for this object. Enable this property for object parented to ortho camera, so they don't move/scale when the user zooms the camera.
- Fit to Camera Edge
- See here for more info.
- Visibility Breakpoints
- Enable object visibility breakpoints. See here.
Rendering on HiDPI (Retina) Screens
As of today, most mobile and many desktop screens have high pixel density (so called "Retina" displays). These displays allow you to substantially increase quality of your renderings. The downside of rendering many pixels is reduced performance.
There are two approaches how to make your content look better and do not make your scenes really slow:
- Using somewhat better resolution, e.g by setting screen scaling factor to 1.5 or so. See here for more info.
- Using HiDPI rendering only for important content, such as text, screen-space UI elements, etc.
The latter approach can be easily achieved by enabling the HiDPI Compositing property located on the Advanced Rendering panel:
Fit to Camera Edge
Fit to Camera Edge is a technique to draw screen-space UI elements based on 3ds Max models. This approach to UI design is more “native” to the 3D artist than using HTML/CSS, and does not require external tools. But there is more in it: since the UI elements are genuine 3D objects, you can apply shaders, lighting, animation, morphing – you name it – making them truly interactive and seamlessly integrated into the scene.
When you parent some object to the camera, the following settings appear on the Advanced Rendering panel:
- Horizontal canvas edge to fit object to. None — no horizontal fit, Left — fit to left edge, Right — fit to right edge, Stretch — scale object horizontally to fit on the screen.
- Vertical canvas edge to fit object to. None — no vertical fit, Top — fit to top edge, Bottom — fit to bottom edge, Stretch — scale object vertically to fit on the screen.
- Canvas fit shape. Box — use object's bounding box, Sphere — use object's bounding sphere to fit the object on the screen.
- Fit Offset
- Additional offset used to fit object on the screen. Effectively, this value extends object bounding (box or sphere) by the specified absolute value.
Visibility Breakpoints allow you to show/hide content depending on 3D viewport width/height or orientation settings. The most important use case of this feature — adapting your scene to different screen sizes and orientations. E.g you may have two different models for portrait and landscape screen orientations.
If assigned to the current camera, tries to switch to an alternative camera (must have acceptable visibility breakpoints) in the scene, if no alternative camera is found, does nothing.
You can configure the breakpoints on the Advanced Rendering panel:
- Min Width
- Minimum canvas width the object stays visible.
- Max Width
- Maximum canvas width the object stays visible.
- Min Height
- Minimum canvas height the object stays visible.
- Max Height
- Maximum canvas height the object stays visible.
- Screen orientation the object stays visible.
Clipping planes (aka section planes, cross-section planes, mesh sections) is a technique used to show internal arrangement of complex objects, such as buildings, cars, appliances, gadgets, machines etc.
To add a new clipping plane, use the Verge3D -> Add a v3dClippingPlane object button located on the Maya tool shelf:
The objects on your scene will be clipped in the negative Y direction of the clipping plane object.
Clipping planes have the following parameters:
- Affected Objects
- Set of the objects clipped by the plane. If empty, all scene objects will be clipped.
- Swap clipped and unclipped sides.
- Clip Shadows
- Clip shadows cast from the clipped objects.
- Union Planes
- Construct a union from all the clipping planes, affecting the object, not their intersection.
- Fill cross-section between the clipping plane and the affected objects.
- Cross-Section Color
- Cross-section diffuse color and opacity.
- Cross-Section Size
- Cross-section plane size. Increase this value if you use larger scene size.
Feel free to ask on the forums!