© Taichi Kobayashi


Table of Contents

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

This page provides information on texture baking using the V-Ray Baker Tool.

 

Overview


Rendering to texture, or "texture baking", creates texture maps based on an object's appearance in the rendered scene. The textures are then "baked" into the object that is, they become part of the object via mapping, and can be used to display the textured object rapidly on graphics cards using hardware-accelerated API such as OpenGL and DirectX.

V-Ray BakerTool is V-Ray's solution for texture baking in Houdini. It supports map baking, projection baking, bake to texture tiles and multiple geometries baking, All of these can also be animated.

 

UI path: ||obj Network|| > Geometry node > Digital Assets > V-Ray BakerTool

 

Node


The V-Ray BakerTool SOP comes with 2 inputs:

  • A low poly input used to specify the path to the baked object;
  • A high poly input used to specify the source high-res geometry when using Projection baking.

These two inputs are also present as parameter fields on the node itself, in case you specify the path to a SOP node in another network instead of e.g. object merging. You can also specify more than one object when using the parameter fields instead of the node inputs. See the Common Use section below.

 

 

Parameters


Execute Baking – Starts the baking process.

LowRes Meshes – Specifies the object(s) to be baked.

Status – Shows the current status.

 

 

Baker


Baking Mode – Specifies the baking mode.

Maps Baking – V-Ray creates texture maps based on an object's appearance in the rendered scene. The textures are then "baked" into the object.
Projection Baking – V-Ray does not bake to the specified object itself, but traces an offset ray from the object down the normal and shades whatever surface is hit underneath it.

UV attribute – Specifies the name of the uv attribute on the baked geometry. The attribute name should be the same across all objects for the baking process to work as expected.

Capture UV Range – Evaluates the Min/Max range of the UV attribute and populate the UV Min and UV Max parameters below. When baking multiple objects, the evaluated range is based on the Min/Max range for the entire set of objects.

UV Min/UV Max – Specify the UV domain to bake.

Dilation (Edge Padding) – Specifies the number of pixels to expand around geometry.

Bake to Texture Tiles – Enables texture tile baking. Make sure to add a tile token to the Output file path when baking to tiles. Such token can be one of:

${UDIM}, $UDIM, ${udim}, $udim - Mari style naming
${UVTILE},$UVTILE - Mudbox Style naming, starts from 1
${uvtile},$uvtile - Mudbox Style naming, starts from 0
${U},$U,${V},$V ; ${u},$u,${v},$v - for manually placing the u and v value in the file name, capital letters start from 1, lowercase start from 0

Further information on tile tokens is available here.

UDIM Mask – When Bake to Texture Tiles is enabled, you can add UDIM indexes here. You can specify a single tile or a range of tiles for baking. You can also exclude a single tile or a range of tiles with the ^ symbol, e.g. if you add 1001-1010 ^1005 1030-1050 ^1040-1045, all textures from 1001 to 1010 will be baked except for 1005, and all texture between 1030 and 1050 will be baked except for 1040 to 1045. Note that excluded tiles have a priority over included tiles. E.g. if you set 1001 as both included and excluded tile, VRayBakerTool treats it as excluded. To bake all tiles in the UV min - UV max range, use the * symbol. Tiles that are outside the UV min - UV max range are not baked, even if you explicitly write them in the UDIM Mask field.

Tiles are separated by empty spaces in the UDIM Mask field. Do not use comas or other characters to separate them.

Projection Settings

Mode – Specifies the direction of the traced ray.

Outside Geometry – The ray is traced along the normal vector.
Inside Geometry  – The ray is traced in the opposite direction of the normal vector.
Outside first, then inside  – The ray is first traced along the normal vector. If no intersection occurs, then a second ray is traced in the opposite direction of the normal vector.
Inside first, then outside  – Same as Outside first, then inside but in reversed order.
Closest  – Two rays are traced in both directions and the intersection that occurs closest to the surface is chosen.

Normals – Specifies which normals to use when shooting rays.

Geometry – Uses normals of the geometry.
Smooth – Uses normals generated by V-Ray.

Max Depth – Specifies the maximum depth for the traced rays, in scene units.

Cage Offset – Offsets the ray's initial location. Used when the baked low poly object and the high res geometry overlap perfectly, causing an inability to intersect the rays with the low poly geometry.

Guides – When enabled, allows you to control the Show Cage and Visualize Depth parameters.

Show Cage – Generates a wireframe preview of the baked low poly geometry based on the Cage Offset parameter.

Visualize Depth – Generates a clipping plane which can be useful when debugging projection artifacts.

Axis – Specifies the clipping plane axis.

Clipper Position – Specifies an offset for the clipping plane along the specified Axis parameter

Invert – When enabled, flips the clipping plane's orientation.

 

 

Renderer


V-Ray Settings

Engine –  Switches between the CPUGPU or RTX rendering modes of V-Ray.

Sampler – Specifies the image sampler type. Specific parameters for the selected type appear below.

Bucket – Takes a variable number of samples per pixel depending on the difference in the intensity of the pixels.
Progressive – Progressively samples the entire image.

Noise Threshold – Controls the desired noise level in the image.

Render Time (min) – Controls the maximum render time in minutes. This is the render time for the final pixels only; it does not include any GI prepasses like light cache, irradiance map etc. The default value of 0.0 means that the render is not limited in time.

Max Subdivs – Determines the maximum number of samples for a pixel. The actual maximum number of samples is the square of this number (e.g. 4 subdivs produces a maximum of 16 samples).

GI – Enables indirect illumination for baking.

Shadows – Enables shadows for baking.

Disable Lightning – Disables all lights in the scene during baking, even the default ones if there are no other lights. When the option is enabled, only self-illuminating materials emit light.

V-Ray Denoiser – Enables denoising for texture baking, provided the VRayDenoiser render element is present. Note that the Default V-Ray Denoiser is always used here.

You can denoise individual elements from their respective denoise checkbox in the Output tab. 

Preset – When using the Default V-Ray Denoiser, the presets can be used to automatically set the Strength and Radius values.

Default – Applies a mid-level denoising.
Mild – Applies a more subtle level of denoising than the Default preset.
Strong – Applies a stronger level of denoising than the Default preset.
Custom – Allows the Strength and Radius parameters to be set to custom values.

Mode – Specifies how the results of the Denoiser will be saved.

None – All render elements required for denoising will be generated so that denoising can be done with the Standalone Denoise Tool. The information calculated within them will not be applied to other render elements, and no DenoiserRender Element will be generated.
Replace RGB – The  RGB Color Render Element will be replaced with the denoised version, and the DenoiserRender Element will not be present as a separate channel.
Show the channel with the denoised result in VFB.
Separate Channel – The DenoiserRender Element will be generated to contain a denoised version of the RGB Color Render Element using the specified settings. The original render elements, including the RGB Color Render Element, will not be changed.

Use GPU – Uses the GPU device(s) to accelerate the denoising calculations. In case there is no compatible GPU device, denoising automatically falls back to use the CPU, even if the option is enabled.

Forced Materials – Specifies a list of materials to be exported to the .vrscene file even if they are not used by any V-Ray shading node. For example, if there is an Alembic file with a material path attribute pointing to /mat/customAlembicMaterial, V-Ray does not export the shading nodes unless they are assigned somewhere. Thus, even though the material is present in the scene, it is not picked up and the alembic file renders with default material instead of the /mat/customAlembicMaterial. Adding /mat/customAlembicMaterial to the Forced Materials list exports it. 

Forced Attributes – Specifies a list of attributes to be exported to the .vrscene file even if they are not used by any V-Ray shading node. This optimizes the export speed and reduces the size of the .vrscene file. Forced Attributes parameter is useful when instancing lights with per-point attributes for light color and light intensity.

Use Lights – The lights in this parameter are added to the render regardless of their value in their display flags.

Candidate Objects – The geometry objects in this parameter are included in rendering process if their display flags are turned on.

Batch Settings

When baking multiple geometries or texture tiles, the V-Ray BakerTool uses TOPs.

Auto Save HIPFile –  Enable to automatically save the scene. When a render is started in Background mode TOPs require the scene to be saved before rendering.

All Frames in One Batch – Enable to speed up the render when baking animation.

One Render at a Time – When enabled, starts only one render job.

CPUs To Use – Specifies how many CPUs to be used when rendering in batch mode. Positive values specify the actual number, negative values specify the number of cores NOT to use.

Post Translate

Use File –Use a file with python script for post translation.

File – Specifies a python file for post translation.

Use Script – Use a python script for post translation.

 

 

Output


Animation

Animation – Enables the rendering of animated sequences.

Start/End/Inc – Specifies a start/end/inc frame.

Resolution – Specifies the resolution.

Output – Enable to specify an output file name.

Preview Element – When enabled, applies the selected element over the object after the render is completed and files are saved.

Forced 32-bit output – When enabled, stores the render element as a 32-bit float even when writing a 16-bit raw image. This option applies only to multichannel .exr files.

Denoiser (D) checkbox – Enables the render element's denoising, provided the V-Ray Denoiser render element is present.

Anti-Aliasing (AA) checkbox – When enabled, Anti-Aliasing is used where possible.

 

Surface

Diffuse – The Diffuse render element is included in the rendering process.

Alpha – The alpha channel of the rendered image saved to a separate file is included in the rendering process.

Normals – The direction of the normal at the particular shaded point is included in the rendering process.

BumpNormals – The BumpNormal render element is included in the rendering process. 

Reflect - Refract

Reflection – The Reflection render element is included in the rendering process.

Refl Gloss – The Reflection Glossiness render element is included in the rendering process.

IOR – The Reflection IOR render element is included in the rendering process.

Refraction – The Refraction render element is included in the rendering process.

Refr Gloss – The Refraction Glossiness render element is included in the rendering process.

Additional

Ambient Occlusion – Normal ambient occlusion is included in the rendering process.

Self-Illumination – The Self-Illumination render element is included in the rendering process. 

Sub-Surface – The SSS render element is included in the rendering process.

World Position – The X, Y, and Z coordinates of the point that are converted to RGB data are included in the rendering process.

CryptoMaterial – The mattes based on the materials in the scene are included in the rendering process.

Unoccluded – The color that is returned by the texture for unoccluded areas. A texture map can be used for this parameter.

Occluded – The color that is returned by the texture for occluded areas. A texture map can be used for this parameter.

Radius – Determines the amount of area (in scene units) where the AO effect is produced.

Falloff – Controls the speed of the transition between occluded and unoccluded areas.

Subdivs – Controls the number of samples that V-Ray takes to calculate the AO effect. Lower values render faster but produce noisier results.

Custom Attributes

Outputs the specified attribute to a separate element.

Custom Operator

Outputs the specified VOP node to a separate element.

 

 

Common Use


You could specify more than 1 object when using the parameter fields instead of the node inputs, in which case the evaluation is handled as follows:

 Maps Baking Mode

The baking setup is evaluated for every object in the list. For example:

LowRes Meshes: /obj/First /obj/Second /obj/Third

 Bake to Texture Tiles is On and uv range is 0:0 , 2:2

 This produces 4 renders (one for every Texture tile) for every object in the list. A total of 12.

 

Project Baking Mode

In Projection Baking mode, with more than one object in either the Low or High Poly lists, one of the following happens:

  • For Single Low Poly and Multiple High Poly objects, each high poly object is, one by one, projected over the low poly object. To prevent overwriting of the output files, use the ${CTO} tag in the output file path.
  • For Multiple Low Poly and Single High Poly objects, the high poly object is projected over each low poly object, one by one. To prevent overwriting of the output files, use the ${CPO} tag in the output file path.
  • For Multiple Low Poly and Multiple High Poly objects, each high poly object is projected over the corresponding low poly object in the low poly list.

*${CPO} - currently processed object
*${CTO} - current target object

Notes


  • Preview of the final result is only available for one object.
  • Preview of the final result does not work when baking to texture tiles.
  • Object paths for the Low and High poly lists should be absolute.
  • Currently, there is no automatic support for Metalness workflow.
  • Final render must be started from the Execute Baking button in the V-Ray BakerTool's UI when the Low/High poly lists contain more than one object, or when baking to texture tiles.
  • When baking trough TOPs, files are saved with gamma 1.
  • Height/Displacement map based on distance between Low poly and High poly meshes no supported yet.
Was this helpful?