Announcement

Collapse
No announcement yet.

Renderelements manager - adding multiple ExtraTex maps at once

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

  • Renderelements manager - adding multiple ExtraTex maps at once

    For a lot of jobs I need to plug in quite a lot of textures into ExtaTex renderelements. Loading these into the material editor, naming them and then adding them one by one into the render elements is very time consuming.
    Is there a way (through scripting or so) to be able to add a desired number of extratex elements at once and then preferably at the same time connect those with textures that I choose from a folder - or something similar?
    Does anybody know of any script I couldnt find or any way to write this on my own (I totally dont know how to write scripts).

    Any advice is much appreciated.
    Add Your Light LogoCheck out my tutorials, assets, free samples and weekly newsletter:
    www.AddYourLight.com
    Always looking to learn, become better and serve better.

  • #2
    You could always setup a "library" scene with whatever RE you want and, then just merge those RE into your new projects.
    Neal Biggs

    3D Generalist | Freelance | Founder | Big5 Studio
    http://big5studio.com/

    3ds Max 2022 - V-Ray5 Update 2.2

    Comment


    • #3
      Originally posted by Nearl View Post
      You could always setup a "library" scene with whatever RE you want and, then just merge those RE into your new projects.
      Yeah, that would help bringing in a lot of extratex and not adding them one by one - although one would have to be careful to do that first instead of overwriting whatever already was in the renderlements.
      But it doesnt help adding the maps into all these extratex slots. Ideally I would like to just choose a folder and the extratex elements will be added, linked already to the bitmaps...
      Add Your Light LogoCheck out my tutorials, assets, free samples and weekly newsletter:
      www.AddYourLight.com
      Always looking to learn, become better and serve better.

      Comment


      • #4
        Prepare your Elements, then save as a Preset for Render Setup. You get the option to save based on the tabs...so you can choose to just save the Elements and not the rest of the render settings.

        Comment


        • #5
          Originally posted by azapata View Post
          Prepare your Elements, then save as a Preset for Render Setup. You get the option to save based on the tabs...so you can choose to just save the Elements and not the rest of the render settings.
          I know, but that doesn't make it faster to link all the files, which is one reason I asked about a different workflow
          Add Your Light LogoCheck out my tutorials, assets, free samples and weekly newsletter:
          www.AddYourLight.com
          Always looking to learn, become better and serve better.

          Comment


          • #6
            So do you simply need a bunch of VRayExtraTex elements that each has a different Bitmap Texturemap ( "some.png") in it or something else?
            I'm not sure I understood the part "connect those with textures that I choose from a folder" part.

            Best Regards,
            Daniel
            Daniel Schmidt - Developer of psd-manager

            Comment


            • #7
              First problem was to add lots of extratex-elements without having to go into the add menu one by one. Lets say that is solved by preparing a long list and saving as render elements and then importing.

              Lets say I have 20 textures I need to output as extratex. I would need to input each texture into a separate extratex, one by one. Instead of doing this I would like to tell 3dsmax to add a whole folder of textures as extratex elements.
              Add Your Light LogoCheck out my tutorials, assets, free samples and weekly newsletter:
              www.AddYourLight.com
              Always looking to learn, become better and serve better.

              Comment


              • #8
                Ok, then the script I wrote yesterday should help. You pick one or more image files and then it creates the Bitmap Texturemaps + VRayExtraTex elements.
                http://www.daniel-schmidt.biz/downlo...VRayExraTex.ms

                PHP Code:
                /*******************************************************************************
                * Creates VRayEtxraTex render elements en masse
                *
                * License: LEGOware. Send the author LEGO if you use it for commercial purposes.
                * Author: Daniel Schmidt (mail@daniel-schmidt.biz)
                * Version: 0.1
                *******************************************************************************/

                function createExtraTex f =
                (
                    
                local el VRayExtraTex() 
                    
                local name =  getFilenameFile(f)
                    --
                el.auto_update_name false
                    
                --el.elementName "ET_" name
                    el
                .texture Bitmaptexture fileName:f name:name
                    el
                )

                function 
                chooseFiles 
                (
                    
                local filenames #()
                    
                local dlg dotNetObject "System.Windows.Forms.OpenFileDialog"
                    
                dlg.title "Please choose one or more image files"
                    
                dlg.Multiselect true
                    dlg
                .Filter "All Files (*.*)|*.*"
                    
                -- dlg.FilterIndex 1
                    local result 
                dlg.showDialog()
                    if (
                result.Equals result.OK) do
                        
                filenames dlg.fileNames 
                    filenames
                )

                function 
                massCreateExraTexElements 
                (
                    
                local rem maxOps.GetCurRenderElementMgr() 
                    for 
                f in chooseFiles() do
                    (
                        
                local tex createExtraTex f
                        rem
                .AddRenderElement tex 
                    
                )
                )

                massCreateExraTexElements() 
                Bittesch?n,
                Daniel

                Daniel Schmidt - Developer of psd-manager

                Comment


                • #9
                  Wow, beautiful! Almost perfect! Danke, Daniel!
                  Is there a way to change the elements name to say "ExtraTex" or just "Tex" and also uncheck the auto update name option? I had some trouble with it in the past when I changed the bitmaps. Cant really remember, but I always uncheck it.
                  Anyway, thank you so much!
                  Add Your Light LogoCheck out my tutorials, assets, free samples and weekly newsletter:
                  www.AddYourLight.com
                  Always looking to learn, become better and serve better.

                  Comment


                  • #10
                    Originally posted by MANUEL_MOUSIOL View Post
                    Wow, beautiful! Almost perfect! Danke, Daniel!
                    Is there a way to change the elements name to say "ExtraTex" or just "Tex" and also uncheck the auto update name option? I had some trouble with it in the past when I changed the bitmaps. Cant really remember, but I always uncheck it.
                    Anyway, thank you so much!
                    I kind of anticipated that, but kept the default behaviour. Open the file (Scripting > Open Script...) then in the function createExtraTex remove "--" in front of 2 of the lines. Oh and make sure you read the License restrictions for commercial use at the top

                    Daniel
                    Daniel Schmidt - Developer of psd-manager

                    Comment


                    • #11
                      Haha, beautiful! Thank you again!
                      Nice restriction But I couldnt find an adress...
                      Add Your Light LogoCheck out my tutorials, assets, free samples and weekly newsletter:
                      www.AddYourLight.com
                      Always looking to learn, become better and serve better.

                      Comment


                      • #12
                        Officially licensed to Manuel .
                        I always admired the LEGO building instructions as a kid and wondered how they are done - guess that got me into 3D.

                        Click image for larger version

Name:	Lego-Thanks.jpg
Views:	87
Size:	280.9 KB
ID:	973323

                        Daniel
                        Daniel Schmidt - Developer of psd-manager

                        Comment


                        • #13
                          Haha! nice. thank you!
                          Love the hard shadows in the render! What HDRi did you use?
                          Add Your Light LogoCheck out my tutorials, assets, free samples and weekly newsletter:
                          www.AddYourLight.com
                          Always looking to learn, become better and serve better.

                          Comment


                          • #14
                            Originally posted by MANUEL_MOUSIOL View Post
                            Haha! nice. thank you!
                            Love the hard shadows in the render! What HDRi did you use?
                            That was just a custom IES profile: cateyebikelightheldbymyson.ies

                            Daniel
                            Daniel Schmidt - Developer of psd-manager

                            Comment


                            • #15
                              Sooooo, I`ve been using your awesome script until now but just had some trouble with the normal 3ds max bitmaps and decided to use only VrayHdri maps from now. Would also like to set the color space settings to srgb in that. And maybe take out the blur...
                              how could I change your script towards?
                              I looked at it but dont have a clue where to start
                              If you have any free time, would be great if you could help me!
                              Manuel
                              Add Your Light LogoCheck out my tutorials, assets, free samples and weekly newsletter:
                              www.AddYourLight.com
                              Always looking to learn, become better and serve better.

                              Comment

                              Working...
                              X