Announcement

Collapse
No announcement yet.

Recommended Alembic/V-Ray workflow?

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

  • Recommended Alembic/V-Ray workflow?

    Hi,

    I was hoping to be able to use an alembic .abc file to be used for both rendering and as gpu cache. This would save up some disk space in contrast to using one vrmesh file and one gpucache file.

    However, for some assets I'm getting very, very wrong results in terms of shading when I use the .abc in the VRayProxy node. Maybe what I'm trying to do is perhaps a bit of a utopia. I was hoping to be able to simply plug in an .abc instead of the .vrmesh and get the same results, visually.

    Do you think that this should be possible and that it's either up to my Alembic export settings or that there may be something else wrong with my scene -- or am I simply trying to achieve something which is bound to fail because of the nature of dealing with different file formats?
    Best Regards,
    Fredrik

  • #2
    Actually... so maybe I think what is going wrong.

    When you use a vrmesh file in the VRayProxy node, you get a list of shaders in the VRayMeshMaterial node. In my case I see 4 shaders. All good.

    Then I switch out the vrmesh file for an alembic file. Now, the VRayMeshMaterial node gets updated and instead of a list of shaders, there is now a list of shapes instead of shaders. I get a total of 9 shapes. All good.

    But this is where things get interesting. For the 9 shapes, only the 4 first ones have a shader assigned. And the order of these 4 assignments are identical to when I used the vrmesh file.

    So my conclusion is that when you update the VRayProxy node's filepath with an alembic file, the VRayMeshMaterial node is being updated, but it is not assigning shaders to shapes properly. This would also explain why I was getting super weird shading on some of my alembic-based proxies.

    Do you follow me?

    I'm doing this in Maya 2016 with V-Ray nightly build 25823.
    Last edited by Fredrik Averpil; 05-06-2015, 07:10 AM.
    Best Regards,
    Fredrik

    Comment


    • #3
      Bacially these are two different formats exported by different software. I think you are expecting too much .
      V-Ray/PhoenixFD for Maya developer

      Comment


      • #4
        Originally posted by ivaylo.ivanov View Post
        Bacially these are two different formats exported by different software. I think you are expecting too much .
        Yeah, probably. But did you see the answer to my own post?
        I think I discovered a bug...
        Best Regards,
        Fredrik

        Comment


        • #5
          The vrmesh exporter knows how to handle materials, the abc reader we've implemented doesn't.
          V-Ray developer

          Comment


          • #6
            Okay, so in a nutshell; shaders will not be properly assigned to the alembic mesh when loading it into the scene using the VRayProxy node. Correct?
            Best Regards,
            Fredrik

            Comment


            • #7
              If you change the file name from a .vrmesh to .abc, then this is correct.
              If you assign proper materials to every shape after you load the abc file, then it must work as expected.
              V-Ray developer

              Comment


              • #8
                That is what I am doing. I am creating a VRayProxy with the vrmesh. Then I also export the same object to abc, using the AbcExport MEL command. I replace the filepath to the vrmesh file with the abc file.

                However, this is when I have noticed that shaders are not properly assigned to the abc. Would you like me to send an example file?
                Best Regards,
                Fredrik

                Comment


                • #9
                  Nope, I don't need a scene, because this is expected to break.
                  The list of materials from the vrmesh files is based on the actual materials assigned during export.
                  The list of materails from the abc files is populated with every object we've found in the alembic file.

                  So we can conclude that the only case where your workflow will be 100% reliable is when you're exporting 1 object in the vrmesh and abc files.

                  Also it seems that the list of shapes shown in the mesh material can get out-of-sync with the actual list if there are instances in the abc file and the instancing attribute in the VRayMesh node is enabled.
                  V-Ray developer

                  Comment


                  • #10
                    Okay, so I guess this is a dead end then. But just to be super clear... the behavior below is expected in a scene with a bed model and four shaders?

                    VRayProxy + vrmesh, shaders tab in the VRayMeshMaterial node:
                    shader89 -> shader89
                    leatherBlack2_shc -> leatherBlack2_shd
                    velvetBlue_shd -> velvetBlue_shd
                    shader95 -> shader95

                    ...and then exporting the same bed to .abc and swithing out the .vrmesh file with the .abc:

                    VRayProxy + abc, shaders tab in the VRayMeshMaterial node:
                    woodBaseShape -> shader89
                    strapsShape -> leatherBlack2_shd
                    legs1Shape -> velvetBlue_shd
                    bedShape -> shader95
                    pillowShape -> (NO SHADER CONNECTED)
                    legs2Shape -> (NO SHADER CONNECTED)
                    pCylinderShape1 -> (NO SHADER CONNECTED)
                    pCylinderShape2 -> (NO SHADER CONNECTED)
                    pCube1Shape -> (NO SHADER CONNECTED)


                    So it seems right now those four shaders are just being assigned to the first four shapes, without checking if this assignment is really correct.
                    Is it not possible to store data which tells us which shader should be assigned to which shape (of the .abc) on any of the V-Ray nodes so that this data is available and can be used for this purpose?

                    Somehow, I feel that I would be able to store this data and fix the shader assignment myself using some supporting scripts... but wouldn't it make sense to have this functionality built in?
                    Last edited by Fredrik Averpil; 08-06-2015, 06:05 AM.
                    Best Regards,
                    Fredrik

                    Comment


                    • #11
                      I'm not sure how to force the Alembic exporter in Maya to do anything about materials. I think maybe its sources come with the Maya devkit, perhaps you can modify it to somehow include the material name in the object name to use as a guide.

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

                      Comment


                      • #12
                        I was thinking more along the lines of registering all shape names (and their corresponding shader name) when creating a VRayProxy. So when switching the vrmesh out for an .abc, it would be easy to remap the shaders onto the shapes properly. And I was thinking having this data get stored on the VRayProxy node.

                        I'll probably try do this myself, as I could just register this data in the script we use to create this kind of proxy and then remap the shaders onto the shape names.
                        Best Regards,
                        Fredrik

                        Comment


                        • #13
                          im still confused with vrmesh and how to handle materials...
                          if my source mesh and material does not live in the main scene assembly file... how do i get the material into that new scene..?

                          modeling scene (maya geo + vray material) ---> export to vrmesh
                          scene assembly scene ---> import vrmesh = no materials

                          Comment


                          • #14
                            The way people usually do it, is to create a scene with the .vrmesh file and materials applied, and then reference that in their main scene. Of course, this only works if you have one instance of the .vrmesh.

                            Other than that, we are working on a VRayScene object that can contain geometry and materials and can be treated as an object that can be instanced in the scene. However this is not yet in the builds.

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

                            Comment


                            • #15
                              Originally posted by vlado View Post
                              Other than that, we are working on a VRayScene object that can contain geometry and materials and can be treated as an object that can be instanced in the scene. However this is not yet in the builds.
                              Very interesting. Will there be any visual representation of such a vrscene in the Maya viewport?
                              Best Regards,
                              Fredrik

                              Comment

                              Working...
                              X