Announcement

Collapse
No announcement yet.

Tree memory consumption

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

  • Tree memory consumption

    I have found this to be a significant problem and was wondering if there are parameters that can be tweaked in VRay to reduce the vast amounts of ram consumed by trees.

    We are using Onyx tree converted to proxies using opacity maps in the opacity slot for the leaves - no reflection or other fancy settings like that. The Onyx models are optimised directly from the Onyx export.

    Are there any Vray Properties for the geometry/proxy that can be changed or are there render properties that can be tweaked ?

    thanks

    N
    www.morphic.tv
    www.niallcochrane.co.uk

  • #2
    i can only recomend 2 things:
    1 - make sure your tree mats have vray material and no other.
    2 - you can offset ray bias to 0.01 and that may help.
    Dmitry Vinnik
    Silhouette Images Inc.
    ShowReel:
    https://www.youtube.com/watch?v=qxSJlvSwAhA
    https://www.linkedin.com/in/dmitry-v...-identity-name

    Comment


    • #3
      You could convert the opacity mapped leaves which I believe could be causing the problem to geometry instead. Somebody had a script for doing just that on this forum I will have a look and see if i can find it. Of course this means you going to have to redo the proxies.

      Comment


      • #4
        Redoing the proxies is not a problem.
        www.morphic.tv
        www.niallcochrane.co.uk

        Comment


        • #5
          We are not using Vray proxies for 3d trees, we found out Vray proxies deliver slower render times then xref files and also allowing dynamic memory makes possible more instances. Xref files should be instanced not copied. RPC should be copied instead of instanced.

          Comment


          • #6
            It's gotta be the opacity leaves. As I pointed out in my little test thread (http://www.chaosgroup.com/forum/phpB...ic.php?t=16785) I was able to render about 1.8+ billion polys of a 200' x 200' area using only Onyx bushes, just under 25 minutes. And I was also watching a DivX movie while it was rendering so I could shave off a few minutes off of that.
            =LES=

            Comment


            • #7
              macroScript LeafConvert category:"John O'Connell Tools"

              (

              rollout LeafConvert "AEC Leaf convertor"
              (
              fn polyFilter obj = superclassof obj == GeometryClass

              Group "Source parameters"
              (
              Spinner replaceID "Replace Mat ID" type:#integer range:[-1000,1000,5]
              )

              group "Leaf Parameters"
              (
              button LeafObject "Define leaf Object(s)" width:200 align:#right filterolyfilter
              Spinner Random_scale_min "Random leaf scale min" type:#float range:[-100.0,100.0,0.5]
              Spinner Random_scale_max "Random leaf scale max" type:#float range:[-100.0,100.0,0.5]
              Spinner Random_rotate "Random leaf rotate" type:#float range:[-360.0,360.0,0.0]
              )

              button MakeLeaves "Make Leaves" width:200 align:#right enabled:false

              on LeafObject pressed do
              (
              if (selection.count == 0) then
              (
              messagebox "Please select an object to use as a leaf"
              )
              else if (selection.count == 1) then
              (
              leafobject.text = $.name
              global copy_obj = selection as array
              makeleaves.enabled = true
              LeafObject.enabled = false
              )
              else
              (
              leafobject.text = ("There are " + selection.count as string + " Leaf objects")
              global copy_obj = selection as array
              makeleaves.enabled = true
              LeafObject.enabled = false
              )
              )

              on makeleaves pressed do
              (
              the_sel = selection as array

              if (the_sel.count == 0) then
              (
              messagebox "Please select an object to replace leaves on"

              ) else (

              mat_id = replaceID.value

              for o = 1 to the_sel.count do
              (

              try(convertToPoly the_sel[o])catch()
              face_count = getnumfaces the_sel[o]
              print face_count
              face_array = #()

              -- Get faces with the specified mat id

              for i = 1 to face_count do
              (
              if (polyop.getfaceMatId the_sel[o] i == mat_id) then
              (
              append face_array i
              )
              )

              copy_obj_mesh = editable_mesh()
              copy_obj_mesh.name = (the_sel[o].name + "_leaves")
              copy_obj_mesh.pos = the_sel[o].pos

              disableSceneRedraw()

              -- Begin progress bar

              progressStart "Making leaves"
              escapeEnable = false
              itemnum = face_count
              curitem = 0

              for f = 1 to face_array.count do
              (
              curitem += 1
              the_pos = polyop.getfacecenter the_sel[o] (face_array[f])
              the_dir = polyop.getfacenormal the_sel[o] (face_array[f])
              leaf = random 1 copy_obj.count
              print (leaf)
              leaf_obj = copy_obj[(random 1 copy_obj.count)]
              the_dist_obj = copy leaf_obj
              the_dist_obj.pos = the_pos
              the_dist_obj.dir = the_dir
              the_dist_obj.scale = the_dist_obj.scale * [(random Random_scale_min.value Random_scale_max.value),(random Random_scale_min.value Random_scale_max.value),(random Random_scale_min.value Random_scale_max.value)]
              random_rot = eulerangles (random -Random_rotate.value Random_rotate.value) (random -Random_rotate.value Random_rotate.value) (random -Random_rotate.value Random_rotate.value)
              rotate the_dist_obj random_rot
              attach copy_obj_mesh the_dist_obj

              -- Update progress bar

              total_progress = ((curitem as float)/(itemnum as float))*100

              gc()
              progressUpdate total_progress
              )

              progressEnd()

              enableSceneRedraw()
              completeRedraw()
              )

              LeafObject.enabled = true
              )
              )

              )

              createdialog LeafConvert width:360

              )

              Comment


              • #8
                Thanks for the post, but I'm getting a

                -- Syntax error: at filterolyfilter, expected <rollout control>
                -- In line: Spinner Random_scale_min "

                am I missing something?
                | LinkedIn | Twitter | JCanimator.com |

                Comment


                • #9
                  Here's the original thread:

                  http://www.chaosgroup.com/forum/phpB...ic.php?t=14248

                  Try deleting filterolyfilter, save and then run the script again. You'll have to customize your UI to use it.

                  Comment


                  • #10
                    thanks sea2stars, I didn't realize there was an original thread!

                    John must have taken off his site (links in the original thread are broke) but it does seem to work if i just remove what you said. Thanks!
                    | LinkedIn | Twitter | JCanimator.com |

                    Comment


                    • #11
                      Yup - newer, quicker. more flexible version on the way. Lots of other bits in the pipeline too.

                      Comment


                      • #12
                        This is incredible stuff, I just just don't have the time to get into it this week. If you don't mind I will get back to you on this as I have a number of questions already having gone through some of the process.

                        thanks

                        N
                        www.morphic.tv
                        www.niallcochrane.co.uk

                        Comment


                        • #13
                          That was it "Leaf Convert" script that way the whole tree is just geometry with no opacity maps.

                          Great script John

                          Comment


                          • #14
                            I cannot get the script to work.

                            I copied the script above and deleted the 'filterolyfilter' but now when I run the script with the tree leaves selected - it does nothing.

                            Any ideas ?

                            Thanks

                            N

                            Ok, sorted.
                            www.morphic.tv
                            www.niallcochrane.co.uk

                            Comment


                            • #15
                              Sorry. But I just managed to track down that script on the {E}vermotion forum. I've been trying to play with it on Speertrees, but I can't convert them into a mesh so I can't even get as far as you.

                              Heh. Just noticed that John posted the original script.

                              Comment

                              Working...
                              X