Announcement

Collapse
No announcement yet.

Support for baking models containing multiple objects

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

  • Support for baking models containing multiple objects

    As it is, you have to combine the model you're baking into a single mesh shape for baking to work properly. But it seems like it should be possible for vray to treat the objects in a vrayBakeOptions set as one mesh, and bake them together, with coherent file names. Maybe as an option?
    __
    https://surfaceimperfections.com/

  • #2
    You can use vrayBakeOptions to bake multiple objects in one go, doesn't this work for you?
    Alex Yolov
    Product Manager
    V-Ray for Maya, Chaos Player
    www.chaos.com

    Comment


    • #3
      If I assign two objects that share a UV tile to one vrayBakeOptions set, I get two different baked texture files, one for each object (with their respective names included in the file name). I want both objects to be baked into the same texture file with the same name. Only way I can figure this is possible is to use Maya's combine function to merge the two objects before I bake them.
      The vrayBakeOptions set needs an option to treat all the geometry inside it as one object with respect to baking.
      Last edited by dgruwier; 21-02-2020, 03:10 AM.
      __
      https://surfaceimperfections.com/

      Comment


      • #4
        How do the objects share a UV tile? I'm not sure I know how to set this up for testing. But I think I get the point.
        If you can give me an example or some screenshots/images, it would help a lot.
        Alex Yolov
        Product Manager
        V-Ray for Maya, Chaos Player
        www.chaos.com

        Comment


        • #5
          Can't upload screenshots on this network, so I drew it . Behold my masterpiece:
          Click image for larger version

Name:	c5d9270a-1233-429c-9de8-6c305538831d.jpeg
Views:	489
Size:	40.3 KB
ID:	1062323

          These two objects are unwrapped on the same UDIM tile. If I try to bake an AO pass from them, vray will create one 1001 tile for objA without objB, then another 1001 tile for objB without objA, and it'll name them "objA.1001.exr" and "objB.1001.exr" respectively.
          But I really just want them both to be on the same tile in one texture called "AO.1001.exr". Only way to do that is to merge them into one object called "AO" and bake that, or rename the files afterwards.

          Imagine a spaceship with a thousand objects everywhere that have been unwrapped and randomly packed together across multiple UDIMS, and I want to bake out AO for the whole spaceship. Vray will bake a whole set of udims for every single one of those objects one by one.
          __
          https://surfaceimperfections.com/

          Comment


          • #6
            Yeah it would be great to have this, but I think its actually hard to do. I always combine the geometry and make a separate bake scene. I wrote a tool that does udim baking, which can also be run with DR or on a farm, helps to bake hundreds of udims.
            Dmitry Vinnik
            Silhouette Images Inc.
            ShowReel:
            https://www.youtube.com/watch?v=qxSJlvSwAhA
            https://www.linkedin.com/in/dmitry-v...-identity-name

            Comment


            • #7
              Thanks for the visual explanation, it makes it a lot clearer now
              This might be tricky to get working. It will require some time looking into it and I can't say when we'll have time to do it.
              We've not have similar requests in the past (or at least none I can remember), so just out of curiosity - how does it help to have both objects' UVs in the same space? Doesn't that mean that each object will actually carry both UVs?
              Alex Yolov
              Product Manager
              V-Ray for Maya, Chaos Player
              www.chaos.com

              Comment


              • #8
                The objects have just been individually unwrapped so they don’t happen to overlap if you put them together. You can think of it as one single object that has been unwrapped and UV packed normally and split up afterwards, there’s nothing more to it.

                This is how most VFX assets are structured. Whether it’s a character or spaceship, you’ll have any arbitrary number of objects unwrapped efficiently in the same UV space (usually across multiple UDIMs). That way objects can be split and merged in rigging/FX and it doesn’t affect texturing or shading, you just use the same texture set for the whole asset.
                There will be just one diffuse, gloss, displacement, etc map for the entire thing, regardless of the actual number of objects.

                Often we’ll even have a single blend/switch for an entire asset and use texture masks to “assign” materials to each part.

                I can only imagine that the reason nobody has requested this is that everyone comes up with their own little workarounds, or aren’t bothered enough by it to make a fuss. I know we have several modelers and texture painters at our studio who have requested our pipeline devs to create a tool like the one Dimitry mentioned. I figured why not see if the problem can be solved at the root. If we didn’t have to modify the geometry hierarchy to bake stuff, it’d be much easier to make it a routine part of our pipeline.
                Last edited by dgruwier; 26-02-2020, 02:32 AM.
                __
                https://surfaceimperfections.com/

                Comment


                • #9
                  OK, that helped.
                  Would it be enough if we 'combined' the meshes at baking time (without changing the actual scene, of course)? We'd need to figure a way to know what objects these are, but if it turns out to be hard, it could be a user option.
                  Alex Yolov
                  Product Manager
                  V-Ray for Maya, Chaos Player
                  www.chaos.com

                  Comment


                  • #10
                    I think that would work, I imagined something like a “bake as one object” checkbox that would merge all geometry found in the bake set during translation.
                    __
                    https://surfaceimperfections.com/

                    Comment


                    • #11
                      OK, I've added a request in our system, you can refer to VMAYA-9314 in the future to get updates on any progress. It won't be a priority for the moment, as we have other tasks right now, I thought it would be good to mention this.
                      Alex Yolov
                      Product Manager
                      V-Ray for Maya, Chaos Player
                      www.chaos.com

                      Comment


                      • #12
                        Thanks Alex. That's fine, I think I even have a couple of my own requests that I'd sooner prefer to have implemented than this, but it's good to know it's in there
                        __
                        https://surfaceimperfections.com/

                        Comment


                        • #13
                          Are there any updates to this by any chance? I keep running into this issue. Our assets have a lot of per-object attributes and shaders that depend on the object hierarchy (like the Consider Same Object Only option in VrayDirt, which makes texture baking needlessly finicky and complicated.
                          __
                          https://surfaceimperfections.com/

                          Comment

                          Working...
                          X