godotengine / godot-docs

Godot Engine official documentation
https://docs.godotengine.org
Other
3.93k stars 3.21k forks source link

Write a page about 3d convention conversion #6272

Open fire opened 2 years ago

fire commented 2 years ago

Your Godot version: https://github.com/godotengine/godot/commit/0c23a2cfe3ad897e1e49008629c135764b2c155c

Issue description:

Document the 3d conventions problem between different 3d software:

  1. Axis convention https://twitter.com/FreyaHolmer/status/1325556229410861056?s=20&t=jFYr1IodhxYSod0JnhpcbQ

Axis conventions

  1. Quaternion convention https://github.com/godotengine/godot-docs/issues/6271
  2. Normal maps https://bgolus.medium.com/generating-perfect-normal-maps-for-unity-f929e673fc57
  3. 6 unique ways to convert euler to quaternion https://en.wikipedia.org/wiki/Conversion_between_quaternions_and_Euler_angles
  4. Roughness metallic vs glossiness specular https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Khronos/KHR_materials_specular/README.md
  5. Per mesh skeleton skinning vs one skeleton armature https://github.com/KhronosGroup/glTF-Blender-IO/issues/1652
  6. Projection (Transform 4x4), Godot Transform3D (3x4), Basis (3x3 mat) vs euler (vector3) vs axis angle (vector3 and floating point) vs quaternion (vector 4)
  7. 3d rotation error in representations with a visual diagram. https://zhouyisjtu.github.io/project_rotation/rotation.html Basis vs Quaternion
  8. matrixes stored in row major or column major
  9. C++ / core code uses radians. The inspector uses degrees.
  10. GLTF2's cubic keyframe interpolation is not the standard cubic interpolation in 3d editing software
  11. Not really 3d. But 2d has a different axis convention..
  12. global pose minus rest vs Global pose animation. Change from godot 3 to godot 4.
  13. Godot uses meters, but some things use other units, like Unreal uses centimeters.

URL to the documentation page (if already existing): Not sure.

Calinou commented 2 years ago

I think the information should go on the relevant pages, rather than having a single page list all conventions. Normal map direction should already be stated on the StandardMaterial3D page if I'm not mistaken (along with the class reference). The same can be done for metallic/specular/glossiness convention. We should find a link to a web-based tool to convert specular/glossiness maps to roughness/metallic if possible – or create such a tool if none exist :slightly_smiling_face:

The coordinate systems image can be added to the Introduction to 3D page.

fire commented 2 years ago

I wrote a tool to convert specular/glossiness. It's been merged for the last 2 years.

aaronfranke commented 2 years ago

There's also scale. Godot uses meters, but some things use other units, like Unreal uses centimeters.

NathanLovato commented 2 years ago

I second @Calinou here, I would expect students to look for this information or appreciate this information to be listed on relevant pages. I'm unsure how many persons would find a page dedicated to 3D conventions (as they have to come up with the idea to search for this first). Though it's always hard to say, it's just a guess from my part.

weegeekps commented 2 years ago

This cheat sheet is aimed at Filament, but there is a great cheat sheet titled Crafting Physically Based Materials in the Filament documentation that translates well with glTF. Some features, such anisotropy have extensions that are still under development for glTF but given that PBR is physically based, those features should match this guide closely. A nice part of this is that it hints how you can you can make materials that are not based in reality in common PBR models.

Calinou commented 2 years ago

Some features, such anisotropy have extensions that are still under development for glTF but given that PBR is physically based, those features should match this guide closely. A nice part of this is that it hints how you can you can make materials that are not based in reality in common PBR models.

Godot 3 and 4 both support anisotropy in the default material shader, so that's all good :slightly_smiling_face:

On the other hand, clearcoat rendering doesn't match what other PBR engines do: https://github.com/godotengine/godot/issues/14403 Clearcoat roughness is also not available, but there is a separate rim lighting feature available with adjustable tint.

aaronfranke commented 10 months ago

Point 1 is documented here https://docs.godotengine.org/en/latest/tutorials/assets_pipeline/importing_3d_scenes/model_export_considerations.html#d-asset-direction-conventions