This page provides information on the Ptex Map.
The VRayPtex node allows you to load and use PTex textures with V-Ray. PTex is a mapping system that applies a separate texture to each face of a subdivision or polygon mesh and therefore requires no UV assignment. A PTex file can store an arbitrary number of textures along with mipmaps and adjacency data used for filtering across face boundaries. For more information on the PTex concept, see the Notes section below. See also the tutorials on Rendering PTex Textures from Mudbox and Rendering Vector Displacement with Object-Space PTex. The example shown here, has PTex textures for the Diffuse and Bump channels of a V-Ray Material.
FileName – The .ptx file to be used for the texture. Load the .ptex file from the Browse (...) button.
Cache size – The information in a PTex file is compressed for storage. In order to be used, it has to be uncompressed and stored in the RAM. This parameter controls how much memory (in MB) is available for the current texture. If the value is large enough for the whole texture, the information is extracted only once and is stored during the entire rendering. Otherwise, the information is constantly read from the hard drive, extracted, and used when necessary. Low value for this parameter may cause large PTex files to render slowly.
Filter type – Specifies the type of filtering that is going to be applied to the texture.
Filter width – Specifies the width of the filter.
Filter blur – Applies additional blur to the filter.
Filter sharpness – (Only available when the Filter type is Bicubic) Controls the amount of sharpening applied by the filter.
Interpolation between mipmap levels – A ptex texture may have several mipmap levels which are basically versions of the texture at different resolutions. This allows a higher resolution texture to be applied to parts of the object closer to the camera and a lower resolution version to be applied to parts of the object that are far away. When this option is enabled, V-Ray interpolates between different mipmap levels to create a smooth seamless texture in the end.
Anisotropic filtering – Enables anisotropic filtering which improves the rendering of textures when viewed at sharp angles.
Reverse vertex order – A ptex is generated for a specific mesh. Sometimes the program generating the ptex numbers the vertices of the mesh in a reverse order. When this happens, the object is not properly textured and enabling this option fixes the issue.
Auto color channels – A ptex may have an arbitrary number of channels and there is no sure way to determine which channel contains which information. When this option is enabled, V-Ray tries to select the correct channel for Red, Green, and Blue. When this option is off, the user manually specifies which channel contains which information.
Red/Green/Blue channel – Manually specifies the channel numbers for Red, Green, and Blue.
Alpha type – Specifies the mode in which alpha is applied.
Solid – Ignores all alpha information.
Alpha from texture – Takes the information for the alpha from the specified Alpha channel in the texture.
Alpha from luminance – Takes the alpha information from the Luminance of the RGB channels.
Auto alpha channel – When enabled, V-Ray automatically selects the alpha channel from the PTex file.
Alpha channel – Manually specifies which channel from the PTex file is the alpha channel.
The options in this group deal with cases when the texture is animated through an IFL file.
IFL Start Frame – Specifies the frame at which the playback of the texture begins.
IFL End Condition – Specifies what happens when the final frame of an animated texture is reached.
Loop – Once the final frame is reached, the animation jumps back to the start frame.
Ping-pong – Once the final frame is reached, the animation is played backwards towards the start and continues looping in a Ping-pong manner.
Hold – The animation stops at the final frame.
IFL Playback Rate – A coefficient for the playback rate of the animated texture. It allows you to slow down or speed up the playback rate of the texture.
Gamma type – Specifies the gamma of the texture.
None – The gamma of the texture is considered to be 1.0 and no gamma corrections are applied.
Specify – Manually specifies the color space and gamma of the image with the color space and gamma value parameter.
3ds Max – The 3ds Max options for gamma are considered for this image and the appropriate gamma corrections are applied. If the 3ds Max gamma options are disabled, then the gamma settings are still taken from the other parameters.
Color space – Specifies the color space of the image when the Gamma type is Specify or when the 3ds Max global gamma corrections are disabled:
Linear – Specifies that the color data in the file is in linear physical space and no additional correction is necessary for rendering.
Gamma – Specifies that the color data is gamma-encoded in the file; an inverse gamma correction is applied to the color data to convert it to linear physical space for rendering, based on the gamma value.
sRGB – Specifies that the color data in the file is encoded in the sRGB color space; the standard inverse sRGB correction is applied to the colors to convert them to linear physical space for rendering. Note that sRGB color space is similar to the gamma 2.2 color space, but there are slight differences for dark colors.
Gamma value – Manually specifies the gamma of the loaded texture when the Gamma type is Specify and the Color space is Gamma.
- More information about PTex is available here: https://ptex.us/
- PTex files are strongly connected to the topology of a mesh. Therefore, any modifiers which change the topology (including TurboSmooth and MeshSmooth) break the rendering of the PTex texture. If you want to smooth the object, you can use the VRayDisplacementMod modifier with Subdivision Type and 0.0 for Displacement amount.
- When importing .obj files in 3ds Max for use with PTex textures, make sure that the Retriangulate Polygons option in the OBJ Import Options dialog is disabled.
- When using PTex textures for displacement, small cracks might appear along polygon edges because of slightly different filtering applied to the PTex texture on adjacent polygons. Setting the Filter width to 0.0 improves the situation, but causes the most detailed mip-map level of the PTex file to be loaded thus increasing the required memory.
- When using PTex textures for displacement, it might be necessary to adjust the Texmap min and Texmap max parameters of the VRayDisplacementMod modifier, especially if the texture has negative colors. Otherwise, the texture values might be clipped away.