Announcement

Collapse
No announcement yet.

Render to texture with legacy render to texture ui: controlling transparency of bake elements per script

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Render to texture with legacy render to texture ui: controlling transparency of bake elements per script

    Dear all,

    I have an issue. I would like to bake out VrayBumpNormalMap to texture and I would like to save it with RGBA in 32bit OpenEXR. When doing it manually, I can adjust the alpha channel, but if I do it per script, the EXR always saves without alpha enabled.

    This is my code for setting the opacity to be transparent in areas where the uv-shells are not existing:

    fopenexr.setLayerOutputType 0 0
    fopenexr.setDefaults()
    local bm = bitmap 512 512 hdr: true
    bm.filename = pathConfig.appendPath thePath "dummy.exr"
    save bm
    close bm​
    forceReloadBitmapFile bm

    Could anybody help?
    Thanks
    Robert

    Max, VRay, Fusion:

    https://www.youtube.com/watch?v=g5fSLrVzpxg
    https://www.youtube.com/watch?v=bpmJgTb_9Ro

  • #2
    Does it happen if you remove the "fopenexr.setDefaults()" line? Could you attach the whole script?
    Also, you may check this user's script, which also automates the render to texture feature just for reference.
    Aleksandar Hadzhiev | chaos.com
    Chaos Support Representative | contact us

    Comment

    Working...
    X