Announcement

Collapse
No announcement yet.

Alpha Passes

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

  • #16
    Originally posted by m_hinks View Post
    I use PSD manager for all masks for still images
    Hello m_hinks, I recently purchased psd manager and was trying to achieve what was done in this example:
    http://www.cebas.com/products/featur...PID=38&FID=328

    Do you know what would be the steps to recreate this using VRay? I have tried using different render elements and sort but cannot achieve anything like the example. The end product does not look like the original render. Do you know what combination of render elements should be used to achieve the layers done in the Cebas Example for PSD Manager.

    Thanks

    Comment


    • #17
      Hi Robert,

      I generally only use PSD Manager to generate masks after the render, not to get the elements out in the PSD as well. But I have managed to get them working before.

      You will need the GI, Lighting, Reflections, Refraction, Specular, Self Illumination, and maybe some others depending onthe materials/scene setup.

      Dont use the raw versions of each element. I dont think it will like those!

      If you have a test scene, Ill happily take a look, and setup PSD Manager to work?

      Comment


      • #18
        Thanks for the reply, I will be on vacation for a while, when I get back I will give it another go to hopefully see what can be done. Thanks again

        Comment


        • #19
          I've been trying to build a script that cycles through the selected objects and builds multiMatte elements from each set of three objects in the selection.

          I'm a little burnt out at the moment and would love some clues as to how to make this work. As it is now, it only cycles over the first three objects...

          I got the original bit from Bobo here:

          Code:
          rem = maxOps.GetCurRenderElementMgr()
          
          
          (
              local theObjects = selection as array --get all objects
              local groupsSoFar = 0 --init. a counter for groups so far
              local groupCount = 3 --this is the number of objects per group
              local objID = 100
              
              while groupsSoFar*groupCount <= theObjects.count do
              (
                  objs = #()
          
                  for i = 1 to groupCount while (theIndex = i+groupsSoFar*groupCount) <= theObjects.count do 
                      (
                          append objs theObjects[i]
                      )
                              print objs
                              groupsSoFar +=1
                              
          
                      
                      
                  for o = 1 to 3 while objs.count > 0 do
                      (
                          objs[o].gbufferChannel = objID + o
                          
                          theMatte = multiMatteElement
                          theMatteName = (objs[1].name + objs[2].name + objs[3].name) as string
                          print "The Matte Name =" + theMatteName
                          rem.AddRenderElement (theMatte elementname:theMatteName R_gbufID:objID  G_gbufID:(objID +1) B_gbufID:(objID +2) R_gbufIDOn:(on) B_gbufIDOn:(on)G_gbufIDOn:(on))
                      )
                              objID +=3 
                          
              )
              
          )

          Comment


          • #20
            I revised my last code to work in groups of three (RGB)...
            Code:
            rollout ro_Mattes "Matte Generator v.02" 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:[1,100,1] type:#integer
                on btn1 pressed do
                (
                    re = maxOps.GetCurRenderElementMgr()
                    objs = selection as array
                    el=multimatteelement
                    count= objs.count    
                    groupnum = 1
                    
                    For i = 1 to count by 3 do
                        (
                                objs[i].gbufferChannel=i+spn1.value-1
                                if (i+1 <= count) then  objs[i+1].gbufferChannel=i+spn1.value
                                if (i+2 <= count) then objs[i+2].gbufferChannel=i+spn1.value+1
                                re.addrenderelement (el elementname:(edt1.text + groupnum as string) R_gbufID:(i+spn1.value-1) R_gbufIDOn:(on) G_gbufID:(i+spn1.value) G_gbufIDOn:(on) B_gbufID:(i+spn1.value+1) B_gbufIDOn:(on) )
                                groupnum +=1
                        )
                )
            )
            
            Createdialog ro_Mattes 338 133 modal:false
            Not sure if it's exactly what you want. It doesn't really cycle through the elements it just treats groups of three all at once ("count by 3)" and just checks to make sure there's an object for the extra two when changing the g-buffer ("i+1 <= count"...).

            I think it works OK but let me know if there's a problem. Hope it helps.
            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


            • #21
              Sweet! Thanks. Yes this works. I'll have to pick it apart when I have more time. I still have trouble totally comprehending anything but simple loops. I'm learning but my scripting time is about 1% of my work schedule.

              Another feature I was trying to implement was to name each MultiMatte with the three objects that it represents. Something like: "Box01Sphere01Sphere02" It was sort of working in mine but again only going over the first three objects several times...

              Comment


              • #22
                It's sill pretty crude but it works...
                Code:
                rollout ro_Mattes "Matte Generator v.02" 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:[1,100,1] type:#integer
                    on btn1 pressed do
                    (
                        re = maxOps.GetCurRenderElementMgr()
                        objs = selection as array
                        el=multimatteelement
                        count= objs.count    
                        
                        
                        For i = 1 to count by 3 do
                            (
                                    objs[i].gbufferChannel=i+spn1.value-1
                                    if (i+1 <= count) then  (
                                        objs[i+1].gbufferChannel=i+spn1.value
                                        name2 = ("-" + objs[i+1].name )
                                        ) else name2=""
                                    if (i+2 <= count) then (
                                        objs[i+2].gbufferChannel=i+spn1.value+1
                                        name3 = ("-" + objs[i+2].name)
                                        ) else name3=""
                                    
                                    re.addrenderelement (el elementname:(edt1.text + "_" + objs[i].name + name2 + name3) R_gbufID:(i+spn1.value-1) R_gbufIDOn:(on) G_gbufID:(i+spn1.value) G_gbufIDOn:(on) B_gbufID:(i+spn1.value+1) B_gbufIDOn:(on) )
                                    
                            )
                    )
                )
                
                Createdialog ro_Mattes 338 133 modal:false
                Last edited by dlparisi; 12-10-2009, 07:38 AM.
                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


                • #23
                  I got a little inspired by this and starting coding something to make it a little more useful for myself so I thought I'd share (attached). I usually generate mattes based on materials (matID) rather than g-buffer so that was my first addtion. So as it stands right now here's what it's got so far:

                  • You can generate mattes based on either the g-buffer ID (unlimited) or the MatID (max 15) of the current selection. I included the checkbox for the first 15 materials as a worst case when you know the material is one of the first objects selected. Normally it'll pop up a message telling you how many materials (including multi/sub materials) you have selected and tell you to revise your selection.
                  • The Mattes are generated using all three channels (RGB) and the channel name is generated from either the object names or the material names.
                  • The "Select and group all instances" checkbox will (duh) select all instances if any in your selection and group them under a common g-buffer ID and channel. Otherwise instanced objects each get their own separate channel (this was getting a little crazy for large scenes). Keep in mind this will select all instances of any selected objects whether or not you have them as part of your selection. With this you can get similar results to the MatID output but using g-buffers.
                  • The render element prefix just adds a prefix to the render element in addition to the material or object name if you want it.

                  The code is really, really rough and hasn't been thoroughly tested so use at your own risk, etc, etc. There's probably better/faster/cleaner ways to do what I did but it gets the job done. Apologies to Neil Blevins for some of the lifted functions and you'll also need the Neil/BlurScript library functions (BSLib.ms) for it to function correctly. Run the script and it'll be under "dPict Tools"-->"MultiMatte Generator" in the customize user interface dialog.

                  Let me know if any of you have any problems or see where it could be improved.

                  EDIT: I noticed there was a necessary function for the MatID to work properly that wasn't part of the script. I updated the attached script.
                  Attached Files
                  Last edited by dlparisi; 13-10-2009, 09:01 PM.
                  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


                  • #24
                    Badass! If I'm ever in Chi town I'll buy you a beer!

                    Comment

                    Working...
                    X