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 :slight_smile:

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

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

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

ok no worries. I’ll give LMP a go…ta :slight_smile:

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

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 :slight_smile:

Can I get a copy also???
Thanks!

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

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.

It is beautiful? No. Does it work? Yes.


(
    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
        )
    )
)

Could this possibly work with layers instead of groups?

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.

Thanks a lot for that Mr Moondoggie. I’ll give it a go with a simple test scene.

Awesome! Thanks!

You will let me know if it works for you yes? I spent the hour leading up to New Years making that. :smile:

Jeff, can I also say, I envision your avatar as you. If I met you tomorrow, I would expect you to look like that.

I will do..Really appreciate you doing that. I thought that was Jeff !

It better be. But it looks like it’s from the late 70s.