New free script from us – V-ray maps baking script. v0.05
Bakes texture maps: Diffuse, Reflection, Refraction, Reflection Glossiness, Refraction Glossiness, Normal Bump, Fresnel IOR, Opacity, Illumination.
Creates VRayMtl with all textures correctly assigned.
Can convert exr to jpg using djv_converter.exe (part of the http://djv.sourceforge.net/ )
Ability to load custom render settings preset for baking. It reverts back to old preset.
– Renders faster. When all this mess is baked into maps, you get simplified result that in general render faster.
– Easier to share. This also opens up options to convert your shader to VRMat and use it in Maya / Modo etc.
– More flexibility. Baked maps could be used for other things like exporting model to real time engine or other renderers.
Select model you want to bake textures from. Choose only maps that you need (right click to deselect all). Make sure you have correct mapping channel selected.
If you want to use different rendering settings for baking, create preset and assign it in the script. It will use it at render time and reload previous settings at the end.
djv_converter and Convert to JPG are there in case you have issues with JPG gamma after rendering. It will convert default baking format (exr) to JPG after baking is finished and use them to create VRayMtl
- Use the same BRDF model on all the shaders you’re working on. Recommended: WARD
- Camera based maps like falloff won’t work.
- This script will bake complex VRayBlend shaders down to Single VRayMtl, but reflections, glossiness etc will be averaged and result may be different than original.
- Proper UVW mapping is required. No overlapping, No inverted faces. By default it looks for mapping at channel 10 (as usually lower channels are used for shading, and it can get messy)
- Doesn’t work with SSS.
- You don’t need lights / shadows / GI in your scene.
This Script is free of charge. I just hope it will help your pipleline in the way it helps us. You can modify it, but please let me know and share your code. So we can improve it further. Just remember: this Script cannot be resold in anyway.
You can find the script in Category: Dabarti in Customize/Customize User Interface
VRaymtl Baking script v0.05:
Fixed: Custom path now is correctly assigned. Before it rendered to wrong directory.
Fixed: Cancelling fixed. Now you can execute script 2 times in a row.
VRaymtl Baking script v0.04:
Added: After each segment of baking Cancel popup appears and user has 3 seconds to cancel execution.
Fixed: Checking for existing channel.
VRaymtl Baking script v0.03:
Added: Option to convert exr to jpg after rendering.
Added: Option to select baking preset. After rendering is finished, script reloads previous settings.
VRaymtl Baking script v0.02:
Added: “Select object for baking” popup if nothing is selected.
Added: “Mapping channel doesn’t exist” popup if UV doesn’t exist.
Changed: Better looking UI
Added: option to changed UV channel
Added: option to change padding size
Added: Script now saves current settings and loads preset from G:\GFX\VRay_preset\backing_basic_preset.rps after render is finished it loads back the previous settings.
Bug: Bump normal now correctly set to 100
Bug: Script now doesn’t assign maps that weren’t baked
Added: Ability to switch off all buttons with right click
Added: Opacity Map baking
Added: Button for switching off creating VRayMtl
Join the discussion 18 Comments
Hey! thank you for the super script, just 1 question: when I bake the texture with vray, do I need to have some specific workflow? like BF with BF or LC with BF etc. bucket mode or progresive or just don’t mater. Thank you!
Hey. I have a question. what other cards doesn’t this script bake? (besides falloff).Because I don’t make bake dirt maps
sorry for my bad english.
and thanks for the reply.
Any chance of this ever being rewritten for corona? looks awesome!
Hi, thank you for the GREAT script. I just can’t find a way to bake the completemap (with lights, shadows, etc). During the baking process i can see it but when it finishes the windows closes and i lose it :/
Can you help me?
This script is not meant for that. You can bake complete map with usual 3ds Max bake tools.
This one is meant more for creating PBR / VRayMtl shaders without lighting information baked in.
I have a problem: I try to run the script on a object but it says “Mapping channel does not exist”… Actually I don’t have a mapping channel 10 on my object, but I can’t change it on the script window… It accepts only 10… Also, I’ve used mapping with Vray triplanar mapping: does it works?
Create mapping channel 10 with you non-overlapping nice UV and it will bake it down using that mapping.
You can move it later on to channel 1 or any other, but I used 10 as most often lower channels are used for shading.
Triplanar should work well.
Thanks Tomasz. But my problem is that the script doesn’t work. When I click on “bake” it says “Mapping channel does not exist”… Where I’m going wrong?
Maybe I must add an unwrap modifier on channel 10 on the object?
yes you need mapping on channel 10, just move your existing mapping there.
Great Tomasz, got it now. Thanks.
One last question: this is not a “render to texture script”, isn’t it? I mean, it bakes maps with GI and shadows applied. It’s not possible with your script to get only diffuse filter or reflection filter, just like the classic 3ds max “render to texture” uh?
Thanks again, great script and great work, keep going! Cheers
No it’s not classing render to texture script. I mean it does use that functionality, but it does not store shadows, GI etc. Under the hood I basically convert the shader tree in the way that makes it possible to some passes there were not possible to with typical render to texture. Like reflection or IOR .
Idea behind it was the ability to bake the complex shading down to simple set of textures that could be used to create one V-Ray shader that could be easily exported to Unreal or other engines that supports PBR.
Keep in mind that this is very old tool, though it should still work just fine.
I was thinking about creating commercial version with extended functionality, but I’m just not sure if there is enough interest.
dont work in 3ds max 2014(
Hi Tomasz i ve tried running your script in MAX 2017 but no pop up window apperars…any idea whats wrong?
Hi Martin, It should work fine in 2017. I’ve just checked on my and and it’s starting up fine. Try to reinstall it.
Hi Martin, do you just drag an drop the script in the viewport or select, run script?
This will not work.
You have to load it in the customize UI Rollout
Great script ,Thanks 🙂