Announcement

Collapse
No announcement yet.

.vrmat export and brdf_useRoughness property

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

  • .vrmat export and brdf_useRoughness property

    When exporting VRayMtl to .vrmat, the brdf_useRoughness property is ignored. Is this a bug or is it supposed to be like this?

  • #2
    Seems to work as expected. You can open the .vrmat in Notepad and check for yourself. Look for the "roughness_model" and "option_use_roughness" parameters, both values of which should either be 0 for Use Glossiness or 1 for Use Roughness.
    Aleksandar Hadzhiev | chaos.com
    Chaos Support Representative | contact us

    Comment


    • #3
      Originally posted by hermit.crab View Post
      Seems to work as expected. You can open the .vrmat in Notepad and check for yourself. Look for the "roughness_model" and "option_use_roughness" parameters, both values of which should either be 0 for Use Glossiness or 1 for Use Roughness.
      It's weird, but mine is actually different from what you described.
      I'll describe the order of my actions.
      1. I created a material with "Use roughness" enabled, set the "reflect_glossiness" value to 0.0, named it "Gold_Roughness" and saved it to the file vrmat_gold-roughness.vrmat

      Click image for larger version  Name:	material_gold-roughness.png Views:	0 Size:	85.6 KB ID:	1216118

      2. Then opened the file vrmat_gold-roughness.vrmat in a text editor. Below is a screenshot of the parameters and values:

      Click image for larger version  Name:	vrmat_gold-roughness.jpg Views:	0 Size:	160.6 KB ID:	1216119

      3. Now I created another material, but this time I enabled "Use glossiness", set the "reflect_glossiness" value to 1.0, named the material "Gold_Glossiness" and saved it to the file vrmat_gold-glossiness.vrmat

      Click image for larger version  Name:	material_gold-glossiness.png Views:	0 Size:	85.3 KB ID:	1216120

      4. Then opened the file vrmat_gold-glossiness.vrmat in a text editor. Below is a screenshot of the parameters and values:

      Click image for larger version  Name:	vrmat_gold-glossiness.jpg Views:	0 Size:	161.2 KB ID:	1216121

      As you can see from the screenshots, all the values ​​of the second material saved in the vrmat file remain the same as those of the first material. Also, in both .vrmat files, the "roughness_model" property is always equal to 1, regardless of whether "Use roughness" or "Use glossiness" is enabled.​

      PS: Before exporting to .vrmat, I assigned materials to an object, selected this object and exported as "Materials from selected objects -> to a single .vrmat file".
      Last edited by phill_moris; 17-09-2024, 03:54 PM.

      Comment


      • #4
        I tested this with the latest official and it is exporting "Use Glossiness" as option_use_roughness = 0 and "Use Roughness" as option_use_roughness = 1. Which V-Ray and 3ds Max versions do you have installed?

        Regarding the "roughness_model" parameter, you are right it does export 1 in both cases. I thought it had to follow the other option, but I guess it has a different purpose. I'll talk to the devs about it.
        Aleksandar Hadzhiev | chaos.com
        Chaos Support Representative | contact us

        Comment


        • #5
          Originally posted by hermit.crab View Post
          Which V-Ray and 3ds Max versions do you have installed?
          I use V-Ray 6, update 2.1 (6.20.07 build 32557) + 3dsMax 2024.
          Strange situation.. Sometimes materials are saved correctly, but sometimes not. I can't understand what the reason is and in what cases this happens.
          Also, I wanted to clarify one more question about vrmat - when I save materials with bitmap textures rotated by 90 degrees in "W" (without changing the offset, tiling and mirror), then in vrmat in the "uvw_transform" parameter of this texture I see the following values:
          Code:
          <vector>
          <x>0</x>
          <y>1</y>
          <z>0</z>
          </vector>
          <vector>
          <x>-1</x>
          <y>-2.980232e-08</y>
          <z>0</z>
          </vector>
          <vector>
          <x>0</x>
          <y>0</y>
          <z>1</z>
          </vector>
          <vector>
          <x>1</x>
          <y>2.980232e-08</y>
          <z>0</z>
          </vector>
          How can I understand which of these vector values ​​correspond to the texmap coord properties "offset", "tiling", "rotate" and "mirror"? Why are some strange numbers displayed instead of 90 degrees? What numbers should I enter to get 45 or 60 degrees (for example)?
          I'm probably asking strange questions, but sometimes it becomes necessary to make changes to the material if there is only a vrmat file and the original from which it was saved is missing. In general, it's a pity that there is no tool for editing materials from vrmat files, so sometimes you have to do it manually in a text editor. But in any case, I will be very grateful for any help with this.​

          Comment


          • #6
            Originally posted by phill_moris View Post
            How can I understand which of these vector values ​​correspond to the texmap coord properties "offset", "tiling", "rotate" and "mirror"?
            Trial and error.

            Originally posted by phill_moris View Post
            Why are some strange numbers displayed instead of 90 degrees? What numbers should I enter to get 45 or 60 degrees (for example)?
            Vector data.

            Originally posted by phill_moris View Post
            it's a pity that there is no tool for editing materials from vrmat files, so sometimes you have to do it manually in a text editor.​
            There used to be, but it got depricated. I think V-Ray for Sketchup or Revit still has it.

            Otherwise, I suggest taking a look at other options for transferring scenes and shaders such as USD.
            Aleksandar Hadzhiev | chaos.com
            Chaos Support Representative | contact us

            Comment

            Working...
            X