Announcement

Collapse
No announcement yet.

Grouping of notes in the _notes.vrscene file

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

  • Grouping of notes in the _notes.vrscene file

    Hi,

    is there a possibility to group notes in the _notes.vrscene file together?

    What I want to do is creating a scene with many objects.
    One object consists of many other parts (everyone of the parts with its own material, position and geometry) and I don’t want to manipulate every transformation matrix to position every little part of the larger object.
    And because I’m planning to built up a v-ray scene without maya I’m manipulating the vrscene files directly

    So I’m curious to know if it’s possible to group the little parts to an object together so that I only need one transformation matrix for one object in the scene (and not for every part).
    Or is the _notes.vrscene file just a linear sequence of every part in the scene?

    Thanks for your help

    Scyla

  • #2
    Yes, it is possible. You can also include one .vrscene file in another file using an #include directive in the file.

    Best regards,
    Vlado
    I only act like I know everything, Rogers.

    Comment


    • #3
      Hi,

      what i more wanted to have is something like
      transform(0,0,0...){node1}
      transform(0,1,0,...){node1}

      to include and place a single geometry node multiple times.

      Comment


      • #4
        Sorry for posting so much but it seems that I can’t edit posts .

        To be a little bit more precisely:

        Say I have a node file (example_nodes.vrscene) that contains 2 objects that form together a larger object

        Code:
        Node pCubeShape1_node {
          transform=Transform(Matrix(Vector(0.002164816, 0, 0), Vector(0, 0.002164816, 0), Vector(0, 0, 0.002164816)), Vector(0, 2, 0));
          geometry=pCubeShape1_mesh1;
          material=phong2_material;
          nsamples=1;
          visible=1;
        }
        
        Node pPyramidShape1_node {
          transform=Transform(Matrix(Vector(3.011214, 3.011214, 0), Vector(-4.727885e-016, 9.455771e-016, 4.258501), Vector(3.011214, -3.011214, 1.418366e-015)), Vector(0, 2, 0.4150367785937287));
          geometry=pPyramidShape1_mesh2;
          material=phong1_material;
          nsamples=1;
          visible=1;
        }
        Now I want to have a scene with say 200 of those objects defined above but every one of these objects has a different position in the scene.

        Ideally I could combine these two nodes above to one new node that I can manipulate.
        So to position one lager object I don’t have to manipulate every single node of said object.

        Something like this:
        Code:
        Node newObjectShape_node=Group(
        
        Node pCubeShape1_node {
          transform=Transform(Matrix(Vector(0.002164816, 0, 0), Vector(0, 0.002164816, 0), Vector(0, 0, 0.002164816)), Vector(0, 2, 0));
          geometry=pCubeShape1_mesh1;
          material=phong2_material;
          nsamples=1;
          visible=1;
        }
        
        Node pPyramidShape1_node {
          transform=Transform(Matrix(Vector(3.011214, 3.011214, 0), Vector(-4.727885e-016, 9.455771e-016, 4.258501), Vector(3.011214, -3.011214, 1.418366e-015)), Vector(0, 2, 0.4150367785937287));
          geometry=pPyramidShape1_mesh2;
          material=phong1_material;
          nsamples=1;
          visible=1;
        } 
        
        );
        So that I can apply a new transformation (in a new node file that includes the example_nodes.vrscene file) on the whole newObjectShape1_node say:

        Code:
        #include "C:/vray_files/example_nodes.vrscene"
        
        Node newObjectShape1_node {
        	transform=Transform(Matrix(Vector(50.002164816, 0, 0), Vector(0, 0.002164816, 0), Vector(0, 0, 0.002164816)), Vector(0, 5, 0));
        }
        
        Node newObjectShape2_node {
        	transform=Transform(Matrix(Vector(50.002164816, 0, 0), Vector(0, 0.002164816, 0), Vector(0, 0, 0.002164816)), Vector(0, 10, 0));
        }
        
        ….
        Is there any way to do that?
        Including the same example_nodes.vrscene file multiple times don’t seem to work because vray only takes one of the node files for rendering.

        And if there is one, can you link me the command and/or documentation were I can find some information about this topic (the Chaos Group/V-Ray/Maya 2009 for x64/docs/vrscene_format.html file doesn’t seem to have any information about that)

        I really do appreciate your help!

        Thanks in advance

        Comment


        • #5
          Ah, no - you can't do that at the moment. You will need to describe the 200 nodes separately. You can, however, use simple expressions for their transformations so that the transformation of one node can depend on the transformation of another, like this:
          Code:
          Node nodeA {
            transform=Transform(....);
            ...
          }
          
          Node nodeB {
            transform=Transform(....)*nodeA.transform;
            ...
          }
          Best regards,
          Vlado
          I only act like I know everything, Rogers.

          Comment


          • #6
            Thanks for your help so far!

            Now I have these nodes


            Code:
             Node BasicTransformation1_node {	
               transform=Transform(Matrix(Vector(1, 0, 0 ), Vector(0, 1, 0), Vector(0, 0, 1 )), Vector(1, 1, 1));	
            …
            }
            Node pCubeShape1_node {
               transform=Transform(Matrix(Vector(0.002164816, 0, 0), Vector(0, 0.002164816, 0), Vector(0, 0, 0.002164816)), Vector(0, 0, 0))*BasicTransformation21_node.transform;
            …
            }
            Node pPyramidShape1_node {
            	transform=Transform(Matrix(Vector(3.011214, 3.011214, 0), Vector(-4.727885e-016, 9.455771e-016, 4.258501), Vector(3.011214, -3.011214, 1.418366e-015)), Vector(0, 0, 0.4150367785937287))*BasicTransformation21_node.transform;
            …
            }

            Somehow it works just fine for the pCubeShape121_node but the pPyramidShape121_node disappears whenever the *BasicTransformation21_node.transform is applied.
            This happens no matter were I place the pPyramidShape1_node so I’m rather clueless where the error appears.

            Comment


            • #7
              The node is named "BasicTransformation1_node", but later on you use "BasicTransformation21_node.transform" (the name is different).

              Best regards,
              Vlado
              I only act like I know everything, Rogers.

              Comment


              • #8
                Ah sorry, that was my fault because I forgot to edit it properly .
                The names are the same in my file and it works just fine for the cube node but not for the pyramid one.

                Comment


                • #9
                  Sorry for the spam! Here is the code without editing.

                  Node BasicTransformation21_node {
                  transform=Transform(Matrix(Vector(1, 0, 0 ), Vector(0, 1, 0), Vector(0, 0, 1 )), Vector(1, 1, 1));
                  ...
                  }
                  Node pCubeShape121_node {
                  transform=Transform(Matrix(Vector(0.002164816, 0, 0), Vector(0, 0.002164816, 0), Vector(0, 0, 0.002164816)), Vector(0, 0, 0))*BasicTransformation21_node.transform;
                  ...
                  }
                  Node pPyramidShape121_node {
                  transform=Transform(Matrix(Vector(3.011214, 3.011214, 0), Vector(-4.727885e-016, 9.455771e-016, 4.258501), Vector(3.011214, -3.011214, 1.418366e-015)), Vector(0, 0, 0.4150367785937287))*BasicTransformation21_node.tr ansform;
                  ...
                  }

                  Comment


                  • #10
                    I'm not sure; can you send the .vrscene file to vlado@chaosgroup.com so that I can check what's wrong?

                    Best regards,
                    Vlado
                    I only act like I know everything, Rogers.

                    Comment


                    • #11
                      Hi, we found the problem. You have to multiply the transformation from the left side due to the fact that matrices are not commutative.

                      So

                      Code:
                      Node BasicTransformation_11_node {	
                      	transform=Transform(Matrix(Vector(1, 0, 0 ), Vector(0, 1, 0), Vector(0, 0, 1 )), Vector(0, 0, 0));	
                      	geometry=none;	
                      	material=none;	
                      	nsamples=1;	
                      	visible=0;
                      }
                      Node pCubeShape1_11_node {
                      	transform=BasicTransformation_11_node.transform*Transform(Matrix(Vector(0.002164816, 0, 0), Vector(0, 0.002164816, 0), Vector(0, 0, 0.002164816)), Vector(0, 0, 0));
                      	geometry=pCubeShape1_mesh1;
                      	material=phong2_material;
                      	nsamples=1;
                      	visible=1;
                      }
                      Node pPyramidShape1_11_node {
                      	transform=BasicTransformation_11_node.transform*Transform(Matrix(Vector(3.011214, 3.011214, 0), Vector(-4.727885e-016, 9.455771e-016, 4.258501), Vector(3.011214, -3.011214, 1.418366e-015)), Vector(0, 0, 0.4150367785937287));
                      	geometry=pPyramidShape1_mesh2;
                      	material=phong1_material;
                      	nsamples=1;
                      	visible=1;
                      }
                      works just fine.

                      Comment


                      • #12
                        Ah yes, sorry - forgot about that

                        Glad that it's working now.

                        Best regards,
                        Vlado
                        I only act like I know everything, Rogers.

                        Comment

                        Working...
                        X