Announcement

Collapse
No announcement yet.

Render all meshes seperately

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

  • Render all meshes seperately

    Is there a way to do this automatically ? I need to render every element in scene out seperately but in the same position as the original scene. Then I can bring those seperate elements into flash and have control over them....

    Any ideas or suggestions would be appreciated
    Regards

    Steve

    My Portfolio

  • #2
    I'd say the easiest would be using lpm wich is free nowadays, or use the new VRayobjSelect and use any of the MMRE scripts to assign unique IDs to each object.

    Regards,
    Thorsten

    Comment


    • #3
      Thanks. LPM looks interesting. Vrayobjectselect will render all objects seperately and fully even if one object is in front of another ?
      Regards

      Steve

      My Portfolio

      Comment


      • #4
        Ah, sorry nope it wont do that. In this case you have to fall back to something like lpm i'm afraid

        Comment


        • #5
          ok no worries. I'll give LMP a go...ta
          Regards

          Steve

          My Portfolio

          Comment


          • #6
            Let us know if it works out. I'm trying to do the same exact thing (except bringing it into After Effects).

            Comment


            • #7
              I can script this process if the above options don't work. Let me know if you need it.
              Colin Senner

              Comment


              • #8
                Originally posted by MoonDoggie View Post
                I can script this process if the above options don't work. Let me know if you need it.
                That would be great if you could...Im asssuming its a simple for and to script that renders every mesh out to a sequenced filename until the loop has gone through all the objects ?!

                Sorry, forgot to say thanks
                Regards

                Steve

                My Portfolio

                Comment


                • #9
                  Can I get a copy also???
                  Thanks!

                  Comment


                  • #10
                    Originally posted by instinct View Post
                    Ah, sorry nope it wont do that. In this case you have to fall back to something like lpm i'm afraid
                    Can anyone confirm that LPM works well with vray 2.0? I had issues with the beta for sure and haven't installed it in a long while.

                    B
                    Brett Simms

                    www.heavyartillery.com
                    e: brett@heavyartillery.com

                    Comment


                    • #11
                      Yeah, it's just about that easy. I have to dig up a function to return the tops of groups as well though otherwise you'll get every object in a group as well. Give me a second to find it.
                      Colin Senner

                      Comment


                      • #12
                        It is beautiful? No. Does it work? Yes.

                        Code:
                        (
                            global getObjectsAndGroups
                            
                            /* FUNCTION: getObjectsAndGroups
                            PURPOSE: Gets all of the objects in the scene and if they're a part of a group, get the highest group head */
                            fn getObjectsAndGroups = (
                                local objs = #()
                                local par = undefined
                                
                                for o in objects do (
                                    if not(isGroupMember o) then (
                                        append objs o
                                    ) else (
                                        obj = o
                                        par = o.parent
                                        
                                        while par != undefined do (
                                            pre = par
                                            par = par.parent
                                            
                                            if par == undefined then (
                                                isNotHead = false
                                                append objs pre
                                            )
                                        )
                                    )
                                )
                                
                                objs = makeUniqueArray objs
                            )
                            
                            /* Unhides the array of objects (objs) */
                            function unhideObjects objs = (
                                local nodes = #()
                        
                                nodes = objs.children
                                --format "unhideObjects nodes before children added:\n"
                                --print nodes
                                
                                -- Now check for group heads and if it is, we need to unhide the children as well
                                for n in nodes where (isGroupHead n) and (isProperty n #children) do (
                                    for c in n.children do append nodes c
                                )
                                
                                unhide nodes
                            )
                                
                            clearListener()
                            
                            -- Gets all of the objects and objects that are parts of groups
                            objsToSetup = for o in (getObjectsAndGroups()) where not(isKindOf o Light) and not(isKindOf o Camera) collect o
                            
                            if (local bitmapPath = getSavePath caption:"Select where you want to save these files to") != undefined then (
                                for o in objsToSetup do (
                                    -- For each of the objects in the scene do the following
                                    
                                    -- Hide everything
                                    hide objects
                                    
                                    -- Unhide the current object, if it's a group, unhide it's children as well, or else just the object
                                    if (classof o) == Dummy then (
                                        unhideObjects o
                                    ) else (
                                        unhide o
                                    )
                                    
                                    -- Change .jpg to whatever extension you want, it's just like outputting from the standard Save File dialogue
                                    local bitmapFilename = bitmapPath + "\\" + (o.name as string) + ".jpg"    
                                    local bmap = bitmap renderWidth renderHeight filename:bitmapFilename 
                                    
                                    render to:bmap
                                    save bmap
                                    close bmap
                                )
                            )
                        )
                        Last edited by MoonDoggie; 01-01-2011, 12:53 PM.
                        Colin Senner

                        Comment


                        • #13
                          Could this possibly work with layers instead of groups?

                          Comment


                          • #14
                            I have a script to render layers already on my site called MPManager (Matte Pass Manager). The setup is a bit tricky because you have to put the functions file on a computer that all of the render nodes can see, but it works for that.
                            Colin Senner

                            Comment


                            • #15
                              Thanks a lot for that Mr Moondoggie. I'll give it a go with a simple test scene.
                              Regards

                              Steve

                              My Portfolio

                              Comment

                              Working...
                              X