Announcement

Collapse
No announcement yet.

model scale vs material/map scale

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

  • model scale vs material/map scale

    ive got a confusing issue, something ive probably never understood properly.


    im importing models and applying a fairly complex material ive made for a previous project.. it has many triplanar, dirt, edgestex and bercon noise maps, all with scales etc dialed in.

    models are brought in as fbx and textured.

    the majority of these models are then saved, xreffed into a master scene, bound to a dummy, then positioned and scaled 150% (client request) by manipulating the dummy... according to my testing, scaling the models, the material scales as expected, with the model.. although maybe the edgestex doesnt? hard to be sure, most effects in material are designed to be very subtle..


    yesterday i merged a few of the xreffed models in to the master file, obviously they remain linked to the dummy and keep the scale i applied... in this case i appled the material after i merged them..


    the textures are all massive!


    i went back and checked, and the models imported via fbx are rescaled on import, all objects having a scale of -4% ..

    i checked the ones i merged, and actually one of them has an original scale of 100% since i did some work on the meshes... i thought this might be the issue,, but then i saw that one of the others exhibiting the texture issue has the same -4% original scale as the correctly textured models.


    so im lost... what are the rules regarding scaling of textures? does it matter if the material is assigned before/after the model has been scaled? given two of the models report the same -4% scale on the meshes, are both then scaled up 150% by linking to a dummy that is scaled up, how can one exhibit massive triplanar textures and the other not? the only difference i can see is wether i applied the material before linking and scaling or after..

    On a related note, a material node similar to the vraybumpMTL called vrayMTLscale or similar, which allows global resizing of all maps and procedurals within a base material would be very useful in my case...







  • #2
    One tried and tested workflow is this:
    - import the model from fbx
    - apply Xform modifier
    - apply UVW mapping - for instance a box mapping 50x50x50 (this should be the same for all models)|
    - apply materials from a material library that is designed to work with the mapping mentioned above
    - link to a dummy and save the scene
    In the master scene you can add the model as x-ref object and manipulate it using the dummy.
    If you scale it the bitmap textures will scale along but for instance the VRayEdgesTex will appear thinner with 150% scale in the master scene if you are using the world width option instead of pixel width.
    Vladimir Krastev | chaos.com
    Chaos Support Representative | contact us

    Comment


    • #3
      thanks for the tips.. actually the models dont use any uvw mapping, its all done with triplanars, since there are 10's of thousands of objects in each model, all at different angles.. editing them is a nightmare..

      ill probably (from next model set) get in the habit of applying a reset xform to the imported model before doing anything else. i wonder how long that will take to process!, some of the models i have to wait 5-10 minutes after each operation.

      . At least that way they all start with the same scale. hopefully i wont find myself in this mess again.


      still doesnt explain why two models with the same scale can have different texture sizes from the same triplanar texture (well a copy) as mentioned, seems the only difference is one had material assigned before xreffing in and dummy-linked rescaling, the other was xreffed in, rescaled, then merged and finally had material assigned..

      ah , also, yeah all the edgestex are in world units.. so, those will be multiplied by the model scale? i.e the rounded edges will get fatter as the model is scaled up?



      For now ive just manually tweaked about 15 procedural maps using IPR to try and get a copy of the material with the same look... quite annoying.
      Last edited by super gnu; 09-06-2022, 07:52 AM.

      Comment


      • #4
        Originally posted by super gnu View Post
        t
        ill probably (from next model set) get in the habit of applying a reset xform to the imported model before doing anything else. i wonder how long that will take to process!, some of the models i have to wait 5-10 minutes after each operation.
        Mind you that using the Xform on imported geometry derived from CAD is a really bad idea in general. Chances are high that normals will be irreversibly corrupted. See attached images of before and after.

        Click image for larger version

Name:	norm_01.JPG
Views:	425
Size:	26.8 KB
ID:	1150657
        Click image for larger version

Name:	norm_02.JPG
Views:	419
Size:	25.9 KB
ID:	1150658



        Attached Files
        https://www.behance.net/Oliver_Kossatz

        Comment


        • #5
          Yeah i was concerned about that.. the fact the models have a negative scale on import (for some reason) i have a feeling that at a minimum ill get all the normals flipped. and with 60k objects in the scene that would not be fun to fix.


          So, again, it seems a "vrayscaleMTL" would be very helpful... i could have one base material, then for models where scale is an issue, tweak scale of all procedurals in the material globally.. no idea if its possible..





















          Comment


          • #6
            Well, in general that sounds like a workflow issue with provided data of unknown sources. Not a V-Ray related problem.
            https://www.behance.net/Oliver_Kossatz

            Comment


            • #7
              Originally posted by super gnu View Post
              Yeah i was concerned about that.. the fact the models have a negative scale on import (for some reason) i have a feeling that at a minimum ill get all the normals flipped. and with 60k objects in the scene that would not be fun to fix.
              So, again, it seems a "vrayscaleMTL" would be very helpful... i could have one base material, then for models where scale is an issue, tweak scale of all procedurals in the material globally.. no idea if its possible..
              It's difficult to be sure of anything without seeing the shaders' setups and such.
              It could be a bug in one of the maps (not respecting explicit scaling), or a limitation.
              Maps working in world units (like the vrayEdgesTex) are insensitive to model scaling, working instead with an explicit world size (f.e.1cm) which is invariant.

              You could conceivably script your way out of the issue, even for large numbers of models, but it'd be best if you found out what the actual issue was in the first place, before committing to inverse-scaling Triplanars.
              Lele
              Trouble Stirrer in RnD @ Chaos
              ----------------------
              emanuele.lecchi@chaos.com

              Disclaimer:
              The views and opinions expressed here are my own and do not represent those of Chaos Group, unless otherwise stated.

              Comment


              • #8
                the fbx files i get are mostly from revit. in revit, the unit of measure is 1 foot. so 1 unit = 1 ft. a long time ago i switched my max units to the same and usually don't have any problems. but there still are some little things that are weird with plugins and such. but the plugin will say "20ft x 20ft" and i just change it to 1ft x 1ft. or whatever can't remember where that happens to me all the time but you get the point.

                Comment


                • #9
                  Originally posted by s_gru View Post
                  unit of measure is 1 foot. so 1 unit = 1 ft.
                  I see no unit of measure there.

                  To me, that is the culprit. Most of the stuff you get supplied as CAD is not modeled to imperial units, but internally converted to display as such. When stuff gets exchanged between softwares, sometimes that transform is baked into the data. So you need to revert that change. We often had that with stuff coming in as inches, when in fact is was modeled to MM or CM scale. The transforms were totally messed up.
                  https://www.behance.net/Oliver_Kossatz

                  Comment

                  Working...
                  X