Announcement

Collapse
No announcement yet.

Best Way to Isolate Objects/Materials After Render

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

  • Best Way to Isolate Objects/Materials After Render

    Let's say I want to change a color after I'm done rendering. What's the best way to separate that object out? Elements?

    I've tried vrayobj and mtlid - but they always comes out rastered... Any suggestions?
    LunarStudio Architectural Renderings
    HDRSource HDR & sIBL Libraries
    Lunarlog - LunarStudio and HDRSource Blog

  • #2
    Cebas PSD Manager!
    http://design-construction-technolog...ge-1#comment-2
    Bobby Parker
    www.bobby-parker.com
    e-mail: info@bobby-parker.com
    phone: 2188206812

    My current hardware setup:
    • Ryzen 9 5900x CPU
    • 128gb Vengeance RGB Pro RAM
    • NVIDIA GeForce RTX 4090
    • ​Windows 11 Pro

    Comment


    • #3
      The multimatte render element in combination with mat/obj id's is the way to go. It's anti-aliased & works with opacity maps. Our starting point here is to always add 5 multimatte's with every project (each multimatte will hold 3 masks in RGB channel) set to mat id's so we get anti-aliased masks for material id's 1-15. Then we'll add another couple multimatte's for things like trees, cars or something that didn't get included in the mat id's.
      Christopher Grant
      Director of Visualization, HMC Architects
      Portfolio, ChristopherGrant.com

      Comment


      • #4
        Render the scene with Scanline & Max standard materials (no lights) render with everything black except what you want in the selection which you need to apply a white material with self illumination set at 100%.

        This will create a prefed black and white mask which you can copy into your channel panel within photoshop....and create a selection from...

        Same as PSD manager but free!
        Last edited by markfouronefour; 19-02-2010, 02:36 AM.

        Comment


        • #5
          http://www.scriptspot.com/3ds-max/scripts/rendermask

          ;o)
          3LP Team

          Comment


          • #6
            I used to do the mask render, but I am telling you that PSD manager is worth it. PSD manager creates a PSD with all your elements perfectly separated and it all happens at render time.
            Bobby Parker
            www.bobby-parker.com
            e-mail: info@bobby-parker.com
            phone: 2188206812

            My current hardware setup:
            • Ryzen 9 5900x CPU
            • 128gb Vengeance RGB Pro RAM
            • NVIDIA GeForce RTX 4090
            • ​Windows 11 Pro

            Comment


            • #7
              Originally posted by cgrant3d View Post
              The multimatte render element in combination with mat/obj id's is the way to go. It's anti-aliased & works with opacity maps. Our starting point here is to always add 5 multimatte's with every project (each multimatte will hold 3 masks in RGB channel) set to mat id's so we get anti-aliased masks for material id's 1-15. Then we'll add another couple multimatte's for things like trees, cars or something that didn't get included in the mat id's.
              I'll have to experiment with multimatte later. All I know is the default matid and objid comes out with rastered edges.

              @Mark - yeah, but probably doesn't respect opacity maps on things like trees.

              @3lp - I'm thinking that the same issue would occur with opacity maps plus there might be a multimaterial object that needs certain colors/textures isolate.

              @glory - I'll have to check that one out some time.

              Thanks guys for all of your replies.
              LunarStudio Architectural Renderings
              HDRSource HDR & sIBL Libraries
              Lunarlog - LunarStudio and HDRSource Blog

              Comment


              • #8
                I posted a quick script to automate the multimatte element a while back. Basically it changes the g-buffer ID for the selected objects and adds a corresponding multimatte element. I've got a newer script that works with g-buffer ID or Mat ID and is a little more automatic. I'll see if I can find it and post that as well if your interseted. BTW - keep in mind that this script doesn't watch out for existing ID's and will overwrite anything you already have set. It's rough but it gets the job done quickly for creating a lot of matte elements...

                Code:
                [COLOR=Red]rollout ro_Mattes "Matte Generator v.01" width:338 height:133
                (
                    edittext edt1 "Render Element Prefix" pos:[12,13] width:315 height:22 enabled:true
                    button btn1 "Go!" pos:[130,88] width:77 height:30
                    spinner spn1 "Starting G-Buffer ID     " pos:[53,48] width:160 height:16 enabled:true range:[0,100,20] type:#integer
                    on btn1 pressed do
                    (
                        re = maxOps.GetCurRenderElementMgr()
                        objs = selection as array
                        el=multimatteelement
                        count= objs.count    
                        
                        For i = 1 to count do
                            (
                            objs[i].gbufferChannel=i+spn1.value
                            re.addrenderelement (el elementname:(edt1.text + (objs[i].name as string)) R_gbufID:(i+spn1.value) R_gbufIDOn:(on) B_gbufIDOn:(off)G_gbufIDOn:(off))
                            
                            )
                    )
                )
                
                Createdialog ro_Mattes 338 133 modal:false[/COLOR]
                www.dpict3d.com - "That's a very nice rendering, Dave. I think you've improved a great deal." - HAL9000... At least I have one fan.

                Comment


                • #9
                  I just downloaded one on maxscipt.com moments before reading your post. I was having issues selecting a group of objects and applying an ID. The script made it possible.
                  Bobby Parker
                  www.bobby-parker.com
                  e-mail: info@bobby-parker.com
                  phone: 2188206812

                  My current hardware setup:
                  • Ryzen 9 5900x CPU
                  • 128gb Vengeance RGB Pro RAM
                  • NVIDIA GeForce RTX 4090
                  • ​Windows 11 Pro

                  Comment


                  • #10
                    Which script made it possible?
                    LunarStudio Architectural Renderings
                    HDRSource HDR & sIBL Libraries
                    Lunarlog - LunarStudio and HDRSource Blog

                    Comment


                    • #11
                      Has anyone had any luck with the VrayWireColor too?
                      LunarStudio Architectural Renderings
                      HDRSource HDR & sIBL Libraries
                      Lunarlog - LunarStudio and HDRSource Blog

                      Comment


                      • #12
                        I really wish there was a much simpler way to avoid the aliasing issue of the elements. There's so many threads on this topic.

                        There's a useful thread on multimatte render element here:
                        http://www.chaosgroup.com/forums/vbu...ender+elements

                        I shouldnt have to use PSD manager. I have ProEXR from a while back - and my understanding is that it will comp the layers together better. I'm going to run some tests tonight.
                        LunarStudio Architectural Renderings
                        HDRSource HDR & sIBL Libraries
                        Lunarlog - LunarStudio and HDRSource Blog

                        Comment


                        • #13
                          Originally posted by dlparisi View Post
                          I posted a quick script to automate the multimatte element a while back. Basically it changes the g-buffer ID for the selected objects and adds a corresponding multimatte element. I've got a newer script that works with g-buffer ID or Mat ID and is a little more automatic. I'll see if I can find it and post that as well if your interseted. BTW - keep in mind that this script doesn't watch out for existing ID's and will overwrite anything you already have set. It's rough but it gets the job done quickly for creating a lot of matte elements...

                          Code:
                          [COLOR=Red]rollout ro_Mattes "Matte Generator v.01" width:338 height:133
                          (
                              edittext edt1 "Render Element Prefix" pos:[12,13] width:315 height:22 enabled:true
                              button btn1 "Go!" pos:[130,88] width:77 height:30
                              spinner spn1 "Starting G-Buffer ID     " pos:[53,48] width:160 height:16 enabled:true range:[0,100,20] type:#integer
                              on btn1 pressed do
                              (
                                  re = maxOps.GetCurRenderElementMgr()
                                  objs = selection as array
                                  el=multimatteelement
                                  count= objs.count    
                                  
                                  For i = 1 to count do
                                      (
                                      objs[i].gbufferChannel=i+spn1.value
                                      re.addrenderelement (el elementname:(edt1.text + (objs[i].name as string)) R_gbufID:(i+spn1.value) R_gbufIDOn:(on) B_gbufIDOn:(off)G_gbufIDOn:(off))
                                      
                                      )
                              )
                          )
                          
                          Createdialog ro_Mattes 338 133 modal:false[/COLOR]
                          thats a really useful script, but can it be configured so that it uses the full RGB range of the multimatte renderelement. so that it uses three objects per element?

                          thanks.

                          jujubee - since every image consists of three primary pure colors - the only way to get correct AA for the matte elements is using those channels. that is exactly what the multimatte element does. if you use wire color its more convenient as you get all the elements in one pass. but the problem is that they are integer values. so for nice looking edges on your masks multimatte is definetly the way to go. its not perfect though as joconnel already pointed out in the thread you copied, that although you get antialiaised mattes - the problem of unpremultipling against a bunch of none black stuff won't give you the perfect edge either. so just rendering the needed element against black is the best option, but the most timeconsuming. so depending on your needs you may satisfy with the wirecolor, multimatte or isolated elements.

                          sorry for the typos im really bad at spelling english.
                          Last edited by frostfx; 22-02-2010, 02:13 AM.

                          Comment


                          • #14
                            I tried multimatte. What I'm understanding is that it will output 3 colors in total and black. So if there are more than 3 items you want to isolate, you would have to do more than one pass?

                            As for that script dlparisi kindly posted, am I correct in assuming that as you create your scene, it automatically generates a different objID # for each new object you create right?

                            But still, with multimatte, you only have 3 solid colors to choose from each time you render one pass?

                            By the way, I upgraded to the latest beta of ProEXR and while writing from the VFB .vrimg window to .exr does incorporate all the layers into one file, it does not layer the render elements correctly in PSD with their appropriate blending types.

                            I've also started to use a script called EffectsChannelSet which can randomly generate both mtlIDs and ObjIDs for every object in a scene to help in the render pass separation:
                            http://3d-kstudio.com/scripts/trackscripts/
                            LunarStudio Architectural Renderings
                            HDRSource HDR & sIBL Libraries
                            Lunarlog - LunarStudio and HDRSource Blog

                            Comment


                            • #15
                              Originally posted by frostfx View Post
                              thats a really useful script, but can it be configured so that it uses the full RGB range of the multimatte renderelement. so that it uses three objects per element?

                              Yeah, my more current version of the script does exactly that as well as works with Material ID's, handles instances better (all instances are the same ID), can autonumber new G-Buffer ID's (so it doesn't overwrite old numbers and allows you to treat all selected objects as a group so they get the same ID (useful with the autonumber). It's a more complicated script so I'm just going to proof it a little more before I post (hpefully later today). It's still not perfect but works in most cases for me.
                              www.dpict3d.com - "That's a very nice rendering, Dave. I think you've improved a great deal." - HAL9000... At least I have one fan.

                              Comment

                              Working...
                              X