Announcement

Collapse
No announcement yet.

.vrscene import command

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

  • #61
    For tomorrow's nightly build ( 2016.06.03 ) I've made some speed improvements to the import command.
    Previously I was using MODO's item.channel command to set imported values, which seems to make unnecessary checks for whether the channel is enabled or not, before setting the value.

    Times when importing the Evermotion Archinteriors 37 scene 8:
    - old without preview materials - 4m 42s
    - new without preview materials - 3m 15s
    - old with preview materials - 13m 3s
    - new with preview materials - 4m 56s

    Greetings,
    Vladimir Nedev
    Vantage developer, e-mail: vladimir.nedev@chaos.com , for licensing problems please contact : chaos.com/help

    Comment


    • #62
      By any chance is, will it be possible to import non-triangle polys or SubD in the future?
      Not sure, but if it would be superbe, as FBX import is such a pain and the subdivision of mesh can really hurt scene performance.

      Comment


      • #63
        Originally posted by Robert View Post
        By any chance is, will it be possible to import non-triangle polys or SubD in the future?
        Not sure, but if it would be superbe, as FBX import is such a pain and the subdivision of mesh can really hurt scene performance.
        What do you mean by SubD, the VrayDisplacementMod in 3ds Max ?

        Yes, I will try to import the meshes as quads and polygons at some point.
        The .vrscene format doesn't contain polygon data directly, it has triangles with edge visibility information, which can be used to reconstruct the polygons.
        I am not sure the reconstruction will work in all cases, as it depends on how the .vrscene was exported.
        For .vrscene exported from V-Ray for 3ds Max, I think it should work, unless it is possible to hide edges between neighboring polygons in 3ds Max.

        Note that triangles can be imported as MODO's Static Mesh which has a huge impact on the performance, when the scene is later exported from MODO to V-Ray for rendering.
        I did a quick test on an imported .vrscene with 18 million triangles:

        Rendering with static meshes:
        - translating stage - 3.7s (this is when the shader tree gets translated to V-Ray materials, I can optimize this in the future)
        - exporting keyframe - 0.3s (this is when the MODO geometry is translated to V-Ray plug-ins)

        Rendering with all geometry converted to normal MODO meshes:
        - translating stage - 10.3s
        - exporting keyframe - 22.5s

        Static meshes also take less RAM in MODO. In my case (I have 16GBs), converting to editable meshes resulted in not enough memory, which slowed down the Embree building as well.

        The same scene in V-Ray for 3ds Max takes around 5-6 s. to translate, so slower than the static meshes in MODO, but much faster than the editable meshes.
        I guess this is because 3ds Max stores the polygons as triangles with edge visibility, so there is no triangulation to be done, when V-Ray asks for them.
        I will probably do some profiling on this at some point, but my guess is that most of the 22.5s are spent on waiting for MODO to give us the data.

        And, by the way, what troubles are you having with FBX ?

        Greetings,
        Vladimir Nedev
        Last edited by vladimir.nedev; 03-06-2016, 06:55 AM. Reason: Edited the "exporting keyframe" time from 35.7s. to 22.5s. as my machine probably ran out of RAM on the initial try.
        Vantage developer, e-mail: vladimir.nedev@chaos.com , for licensing problems please contact : chaos.com/help

        Comment


        • #64
          Hi Vladimir

          First I need to thank you for the .vrscene import tool. It is great as I have been working in max for many years I have a huge library that converts to modo really easy with this function.
          I noticed some differences in scenes imported from max. It would be great if they can be a little closer in settings.

          1. Fog multiplier seems to be out by 3 decimals
          Click image for larger version

Name:	Fog.PNG
Views:	1
Size:	135.3 KB
ID:	862402

          2. a Fairly simple blend material becomes fairly complicated in modo. It have blends in blends with constants etc. Is this intentional? It does not render the same as in max.
          Click image for larger version

Name:	max.PNG
Views:	1
Size:	303.2 KB
ID:	862403
          Click image for larger version

Name:	Modo.PNG
Views:	1
Size:	335.4 KB
ID:	862404

          I will send you the scene in case you need it

          Comment


          • #65
            1. Fog multiplier seems to be out by 3 decimals
            The conversion of the fog multiplier is not as simple as copying the value from the .vrscene file.
            In your case, the correct value in MODO should be 7.5 , so 10 times larger than the value in 3ds Max.
            This is because 3ds Max and MODO use different distance units.

            My current code doesn't take into account the fog bias right now, that's why it imports an incorrect value in your case.
            Thanks for reminding me about that, I think it can be easily fixed.

            2. a Fairly simple blend material becomes fairly complicated in modo. It have blends in blends with constants etc. Is this intentional? It does not render the same as in max.
            This is because in 3ds Max each texturable attribute (diffuse color, reflection color, front color of fresnel texture, etc) is made up from 3 parameters
            - a color value (that's the imported constant texture in MODO)
            - a texture slot (that's the imported texture in MODO)
            - a multiplier for the texture (that's the opacity in MODO's color blend node)
            The texture is sampled and then blended with the color using the multiplier and the texture's alpha.

            Note that the Color Blend is not present, when the texture gets imported in the Shader Tree, as the Shader Tree has the functionality built-in.

            I can optimize the import to not create Color Blend nodes, when they are not needed, i.e
            1. texture always has 1 for alpha (for example .jpg)
            2. multiplier is 1 (100% percent in 3ds Max UI)

            It does not render the same as in max.
            The scene has a VRayFastSSS material, which is not supported by the .vrscene exporter in 3ds Max and by V-Ray for MODO as well.
            Also some simple output curves, that are on the TODO list.

            The scenes from that collection are very old and probably have a lot of VRayFastSSS materials, not sure if we will be able to support these in the future.
            I didn't even know this material existed, as it is completely hidden from the UI in 3ds Max at this point.

            Greetings,
            Vladimir Nedev
            Vantage developer, e-mail: vladimir.nedev@chaos.com , for licensing problems please contact : chaos.com/help

            Comment


            • #66
              My current code doesn't take into account the fog bias right now, that's why it imports an incorrect value in your case.
              Thanks for reminding me about that, I think it can be easily fixed.
              Thanks

              This is because in 3ds Max each texturable attribute (diffuse color, reflection color, front color of fresnel texture, etc) is made up from 3 parameters
              - a color value (that's the imported constant texture in MODO)
              - a texture slot (that's the imported texture in MODO)
              - a multiplier for the texture (that's the opacity in MODO's color blend node)
              The texture is sampled and then blended with the color using the multiplier and the texture's alpha.

              Note that the Color Blend is not present, when the texture gets imported in the Shader Tree, as the Shader Tree has the functionality built-in.

              I can optimize the import to not create Color Blend nodes, when they are not needed, i.e
              1. texture always has 1 for alpha (for example .jpg)
              2. multiplier is 1 (100% percent in 3ds Max UI)
              I don't know about other people but for me this is to technical/ confusing. Personally I like keeping my scenes and materials as plain and simple as possible. If this is an easy fix it would be great. Otherwise I will just manually redo the materials that render wrong upon import. (Most cases import correct in the current setup)



              The scene has a VRayFastSSS material, which is not supported by the .vrscene exporter in 3ds Max and by V-Ray for MODO as well.
              Also some simple output curves, that are on the TODO list.

              The scenes from that collection are very old and probably have a lot of VRayFastSSS materials, not sure if we will be able to support these in the future.
              I didn't even know this material existed, as it is completely hidden from the UI in 3ds Max at this point.
              Don't worry about this IMO. I don't see the use to carry old techniques over. I can manually convert these, they will probably render better and quicker too.



              Would it be possible to add support for normal maps at a point?

              Comment


              • #67
                I don't know about other people but for me this is to technical/ confusing. Personally I like keeping my scenes and materials as plain and simple as possible. If this is an easy fix it would be great. Otherwise I will just manually redo the materials that render wrong upon import. (Most cases import correct in the current setup)
                I don't quite understand. The color blend and constant nodes don't make the materials render wrong, quite the opposite.
                You are right that the imported materials are complicated because of these additional nodes, they will also render somewhat slower.
                I will try not to create them when they are not doing anything, but there will be cases when they are needed, or the materials won't render as in V-Ray for 3ds Max.

                Would it be possible to add support for normal maps at a point?
                Can you send me a 3ds Max scene for this ? There are a few ways to specify normal/bump mapping in 3ds Max, and I want to test with the one you are using.

                Greetings,
                Vladimir Nedev
                Vantage developer, e-mail: vladimir.nedev@chaos.com , for licensing problems please contact : chaos.com/help

                Comment


                • #68
                  I don't quite understand. The color blend and constant nodes don't make the materials render wrong, quite the opposite.
                  Sorry, my bad English. They do render right. What I meant was I will rather create another material if I need a different finish than to try and manipulate the blends.


                  Can you send me a 3ds Max scene for this ? There are a few ways to specify normal/bump mapping in 3ds Max, and I want to test with the one you are using.
                  I will send you a scene, yes. Thanks!

                  Comment


                  • #69
                    My current code doesn't take into account the fog bias right now, that's why it imports an incorrect value in your case.
                    Thanks for reminding me about that, I think it can be easily fixed.
                    This will be fixed in tomorrow's nightly build ( 2016.06.17 ).
                    Note that depending on the fog bias, the fog multiplier will get some very strange values, but that's unavoidable.
                    It should render correctly.

                    Greetings,
                    Vladimir Nedev
                    Vantage developer, e-mail: vladimir.nedev@chaos.com , for licensing problems please contact : chaos.com/help

                    Comment


                    • #70
                      2. a Fairly simple blend material becomes fairly complicated in modo. It have blends in blends with constants etc. Is this intentional?
                      For the 2016.06.19 nightly build, I've modified the code so the unnecessary color blend nodes won't be created.
                      There are of course still situations when they are needed, for example when the texture has an alpha channel (.png files) or the texture's multiplier in 3ds Max is not 100%.

                      Greetings,
                      Vladimir Nedev
                      Vantage developer, e-mail: vladimir.nedev@chaos.com , for licensing problems please contact : chaos.com/help

                      Comment


                      • #71
                        Thanks for taking care of this so quickly!

                        Comment


                        • #72
                          Would it be possible to add support for normal maps at a point?
                          I've added support for importing normal maps for tomorrow's nightly build ( 2016.06.21 ), with the following restrictions:
                          - the normal map must be in tangent space in 3ds Max
                          - if the VRayNormalMap is used in 3ds Max, the Y axis is flipped on import, this is a bug in the V-Ray for 3ds Max .vrscene exporter, you just need to toggle the "Invert Green" option in MODO's image map
                          - there might be problems, if the normal map is not using texture channel 1 in 3ds Max

                          Greetings,
                          Vladimir Nedev
                          Vantage developer, e-mail: vladimir.nedev@chaos.com , for licensing problems please contact : chaos.com/help

                          Comment

                          Working...
                          X