ronh991 / glTF-Blender-IO-MSFS

My unofficial updates to ASOBO exporter for Blender 3.3, 3.6 and 4.2 alpha
Apache License 2.0
7 stars 0 forks source link

vertex color node visualizer disconnect when assign texture #13

Closed PGSimulation closed 1 month ago

PGSimulation commented 2 months ago

Current Behavior

Clean Standard material without textures blender_UfjEPLFC19

When texture assign to base color dissconnect Vertec Base Color Multiply node blender_hrYxwQP0Ki

Automatically adds Col vertex color but if select any color in Vertex Paint you can't see it in EEVEE obraz

This opion is checked obraz

And obraz if this option is changed despite forcing connect node with vertex color if texture is added will disconnect node and back to previous pic2 from pic1

Expected Behavior

as in the first picture in Current Behavior Vertex color connect to BaseColor PrinciplesBSDF to visualize blender_UfjEPLFC19

And a small request if it is possible to automatically add "Face Corner Color" instead of "Face Corner Byte Color". This change eliminates rainbow object bug if more than 1 material is assigned to an object. Tested on multiple sceneries and works fine blender_A0w4kKBRlA blender_GdoWApyIJR

Steps To Reproduce

  1. Add plane object
  2. Assign Standard MSFS Material
  3. Assign BAse Color texture
  4. Go to Vertex Paint
  5. Add any color
  6. Enable Viewport Shading. | you will not see vertex color
  7. connect the Vertex Color Mul node back up to Base color in the shading tab | Texture object changes color with vertex color

Environment

- OS: Windows 10
- Blender: 3.6.9 LTS
- glTF-Blender-IO-MSFS: 3.6-Update | 08.04.2024 | f283a95 - Synch to ASOBO 1.3.3 and add my changes

Anything else?

If the object does not have any textures again add a button to assign vertex color attribute. it was in some older versions of this add-on

ronh991 commented 2 months ago

I will look into this. As to the Face Corner Color issue. This is a core Blender Khronos setup. I have hook in the code that changes this during the export process. I'll review this

ronh991 commented 2 months ago

If you can could you test this update?

removed - new link coming

ronh991 commented 2 months ago

Newer update - Please test

added base color - button to apply vertex color bug fixes

1.6.3.2

io_scene_gltf2_msfs_for36.zip

PGSimulation commented 2 months ago

If you can could you test this update?

is slightly bugged at the moment because if i doesn't manually assign vertex color himself before select standard material in addon

Then it does not plug in vertex color multiply node at all either without texture or with texture. and it does not add col vertex color attribute in both cases

But if I go into preferences uncheck and check again this option blender_lB3Pi3XtFH node works correctly and also adds vertex color after assigning a texture then even after restarting blender and reopen saved project it works

but if even without reopen blender but open / create new Blend File. New, General project again does not work

so I think it's strongly related to the newly added button in preferences and for some reason it doesn't load it correctly until you uncheck it and select it and save the state in the blend file

EDIT: message refers to previous version deleted

PGSimulation commented 2 months ago

Newer update - Please test

added base color - button to apply vertex color bug fixes

1.6.3.2

io_scene_gltf2_msfs_for36.zip

same problem everything works if you uncheck and select the button and save the blend file. for some reason when you open a clean project it doesn't automatically take into account that the checkbox is selected

PGSimulation commented 2 months ago

If I saved the startup project file after this action the same works correctly

ronh991 commented 2 months ago

ah ok, thanks for reporting.

ronh991 commented 2 months ago

New update - please test 1.6.3.3 io_scene_gltf2_msfs_for36.zip

PGSimulation commented 2 months ago

works. thank you for the quick fix

one more small note by default metallic is on 1 instead of 0 with models without pbr it theoretically matters but you can change it manually

ronh991 commented 2 months ago

Default metallic for what material - Standard only? Not sure I understand. "without PBR" they are all PBR materials

PGSimulation commented 2 months ago

Default metallic for what material - Standard only? Not sure I understand. "without PBR" they are all PBR materials

Not very significant because if the material has textures then this slider does not affect anything and should be on 1

but if the material of any kind, such as standard under the LOD of the model without textures then 1 for metallic means metal and so it displays in msfs and blender viewport so theoretically for 99% of cases it should default to 0 and only after adding a texture set to 1

ronh991 commented 2 months ago

Ok I understand now. However, I will not be able to do that because I would like to keep the exporter as close as possible to ASOBO, I don't like it, where code changes an unrelated value, if you change a texture the metallic factor changes.

You could modify your own version to set the default metallic_factor to 0.0

ronh991 commented 1 month ago

should be fixed