-
Notifications
You must be signed in to change notification settings - Fork 3
Convert native & OBJ materials #42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Verification of numpy methods in tinyobjloadertinyobjloader 2.0.0rc13 It seems that the list is not being retrieved correctly. reader = tinyobjloader.ObjReader()
reader.ParseFromFile("model.obj")
attrib = reader.GetAttrib()
vertices = attrib.numpy_vertices()In this case, |
…ssed to USD. obj materials: Added specular, specular texture, alpha texture
Description
Fixes #39
URDF materials and obj materials have been implemented.
Apply the material assigned in obj. This material will be embedded in the GeometryLibrary.Materials used in obj are treated on the same level as URDF materials.Specification for assigning materials
If both color and texture are specified in the URDF material, they are multiplied together.The multiplication is reflected using the "scale" of the UsdPreviewSurface texture.Material parameters passed from obj
For obj files, since PBR materials are not applied, no other parameters are passed here.
The materials within these obj files are placed in the [Materials] scope, which is shared as a material layer across the entire project.
If a material name conflicts with the global material name of another obj or URDF, it will be processed to ensure it becomes a unique name.
Normal texture
Some DCC tools may use “bump” or “map_Bump” as the normal map texture for materials in obj files.
Here, if no normal map (obj: norm) is specified, the bump map is used as the normal map.
Specular
If the specular color is not (0,0,0), or if a specular color texture is present, the USD
specular workflowis used.Placing texture files
When referencing textures in URDF materials or OBJ materials, those textures are stored within the
Payload/Texturesdirectory.This means that even if there are multiple obj files and each one references textures, they will all be stored together in the same Textures directory.
If there are identical file names in different paths, a unique file name will be given.
Others
TODO
Check flattening process when exporting.Checked. Updated the unit test.Checklist