Baking VrayExtraTex ( vraydirt )

Hi,

i gut stucked while trying to get a Vraydirt map in ambient occlusion mode to work in VrayNext GPU work. As described in the manual this isn`t supported in GPU mode.
So i`d like to bake ( render to texture ) the vraydirt map on my mesh with using a VrayExtTextmap. I can choose this element in the render to texture rollout, but where can i input the vray dirt map. In the manual
there is some info of having to use max script to link to the vray dirt map…is this really the only way to do it…if so how to exactly do this ?

Thanks for help

Robin

Hi Robin,
if you want to bake the vray dirt map you can use a vraylight material for your object and bake the vraycomplete map. This is my procedure to bake the ambient occlusion.

Best regards,
Ralf

Yes. We are limited by 3ds max for the Render To Texture interface, so the only way to assign VRayDirt map to VRayExtraTex bake element is by using MaxScript.

I’ve just checked and it should work just fine with V-Ray Next GPU.

Hi Ralf & Peter,

thanks for the feedback on this. So was is the exactly code for the max script to assign the vraydirt map to the vrayextratex ? I`m not a coder, so help on this would be appreciated.

Thanks

Robin

Hi Robin,

You can apply VRayMtl with VRayDirt map in its diffuse slot to some basic geometry object - sphere for example and use it to set bel.texture property as it is described here: Chaos Docs

So, In max listener window you should type:
bp=$.iNodeBakeProperties
bel=bp.GetBakeElement(1)
bel.texture=$sphere001.material.diffuse_map (or whatever the name of the object is: bel.texture= $*.material.diffuse_map)