Announcement

Collapse
No announcement yet.

Set HDR/EXR maps to Spherical via Script

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

  • Set HDR/EXR maps to Spherical via Script

    Hello.
    Im using ChanSoo Eun script to Drag and Drop maps into SME on Max 2024, everythings works nice but I want too add a function where if the map has HDR or EXR extension it could have Spherical Mapping
    I can do to every map adding "amap.maptype = 2"
    but like I said I want to recognice only those extensions
    Carlos Rodriguez
    RTstudio
    Tutorials

  • #2
    This should do it:
    Code:
    for i in (getclassinstances VRayBitmap) where (matchPattern i.HDRIMapName pattern:"*.hdr*") == true or (matchPattern i.HDRIMapName pattern:"*.exr*") == true do (
    i.coords.mappingType = 1
    i.coords.mapping = 0
    )​
    Aleksandar Hadzhiev | chaos.com
    Chaos Support Representative | contact us

    Comment


    • #3
      Thanks Hermit, how does this work? I tried using it as a single script by selecting vraybitmaps but it does nothing, also I tried to use it inside ther other script and it has an error
      Carlos Rodriguez
      RTstudio
      Tutorials

      Comment


      • #4
        Updated the original script. Test it out.

        Note: Not sure if importing .exrs with spherical mapping is that good of an idea, since you may come across regular textures saved as .exr. You can always edit that part in the script, though.
        Attached Files
        Last edited by hermit.crab; 06-03-2024, 02:32 AM.
        Aleksandar Hadzhiev | chaos.com
        Chaos Support Representative | contact us

        Comment


        • #5
          Thank u so much Hermit, it doesnt work with the line

          amap.coords.mappingType = 1
          amap.coords.mapping = 0​

          the maps stays the same, but I tried with the code that I tested before

          amap.maptype = 2

          and it finaly works, Ill keep on testing and if EXR types are problematic Ill edit like you suggested, thank u so much!!!!
          Carlos Rodriguez
          RTstudio
          Tutorials

          Comment

          Working...
          X