Announcement

Collapse
No announcement yet.

Question regarding xGen and VRay

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

  • Question regarding xGen and VRay

    My question is this: Is it possible to export all the final animated xGen hair to a cache of my whole animation so I do not have to re-generate all the hair every time I launch a render in batch mode? My understanding is that "Export Patches For Batch Renderer" only exports the mesh that the hair grows off of but not the final hair geometry. Since I have a very large furry creature, it takes a long time to build all the hair geometry, I'd like to bake all the final hair geometry into a cache that I could read back in directly into VRay without having to recompute every time.

  • #2
    You can experiment with exporting xgen to a vrscene and then importing it back using python post translate. There are 2 ways - from the standard translator options + "Render selected objects only" (in the Render View), or with the XGen VRScene exporter (from XGen -> Preview/Output options). The last one lacks features, but it's idea is exactly to inject vrscene with xgen geometry into vray. We can release it's source code if there is an interest in it, but you will need some programming skills if you want to extend it.
    V-Ray/PhoenixFD for Maya developer

    Comment


    • #3
      Also when you are about to batch render and import the vrscene with python, you can set the visibility to the xgen descriptions in the scene to off so they are not re-exported, but you don't have to remove the whole xgen description from the scene.
      V-Ray for Maya developer

      Comment


      • #4
        hi... is there a way to get the subidvision attribute into a xgen archive..?

        Comment


        • #5
          Currently no. Same goes for displacement. These will be added in the future - not sure when yet.
          V-Ray for Maya developer

          Comment


          • #6
            Thanks for info. In this case we have to use an other solution.

            Comment


            • #7
              Hi,

              we are trying to batch render a scene with V-Ray and Xgen, but we receive the warning: "V-Ray warning: Could not find xgen file for palette "Namespace:scene""
              I tried adding the following lines in Post Translate Python Script to import the .vrscene file:

              from vray.utils import *
              addSceneContent('*PATHTOVRSCENE*\SCENENAME.vrscene ')

              Is this the suggested solution? Does it work with namespaces too?

              Thanks!!!

              Comment


              • #8
                The current release of V-Ray will not work when an xgen description is in a namespace or is from a referenced scene. The next service pack will address this issue.

                However I am not sure what is the relation between namespaces and vrscene-s. What exactly is it that you want to do?
                V-Ray for Maya developer

                Comment


                • #9
                  Ok, we did a render with the vrscenes, it is good to know that will be a fix about this. So, we will use the vrscenes for now.

                  Thank you!

                  Comment


                  • #10
                    Originally posted by viktor.kirilov View Post
                    The next service pack will address this issue.
                    is there an eta..`?

                    Comment


                    • #11
                      Originally posted by FSGFX View Post
                      is there an eta..`?
                      We are not allowed on commenting on that

                      By the way - about the question of the original poster - I just finished implementing an easy streamlined version of the 'cache xgen to vrscene' approach which is in today's nightlies if you have access to them - it will be documented in docs.chaosgroup.com when the service pack rolls out.
                      V-Ray for Maya developer

                      Comment


                      • #12
                        how does the vrscene store the data coming from xgen... like root and tip color..?

                        Comment


                        • #13
                          Originally posted by FSGFX View Post
                          how does the vrscene store the data coming from xgen... like root and tip color..?
                          The vrayformaya exporter exports to vray untessellated hair strands with a few control vertices which have widths and colors.
                          The number of control vertices per strand for xgen can be controlled from the xgen window - Primitives => Primitive Attributes => Attr CV Count.
                          The colors written in the control points are interpolated between root_color and tip_color.
                          When the rendering starts - after the export - the hair gets tessellated and the colors are interpolated once more linearly between the control points for the new small segments of the strand.
                          V-Ray for Maya developer

                          Comment


                          • #14
                            sounds great to me... will do some tests... thanks...

                            Comment


                            • #15
                              My question is: I whant to turn off de primary visibility OFF on the xgen hair and I whant to keep my shadow. When I put vray property on the xgen description and I turn off the visibility I lost my shadow.

                              Click image for larger version

Name:	original (1).jpg
Views:	1
Size:	314.9 KB
ID:	859841
                              Click image for larger version

Name:	original.jpg
Views:	1
Size:	432.9 KB
ID:	859842

                              Somebody can help me ??

                              Mo

                              Comment

                              Working...
                              X