-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update RenderEngineVtk to use RenderMaterial
RenderEngineVtk stops using vtkOBJReader and defers to RenderMesh and RenderMaterial to get OBJ mesh data and appearance. Behavior implications While the "if foo.png exists for foo.obj, apply it" behavior isn't *gone*, it *has* been supplanted in the case where foo.obj actually has a material library (mtl). So, if models out there had let the mtl file rot when they catered to Drake's former idiosyncracies, this will cause the appearance to shift back towards the actual material specification. Implementation details - The render engine is simply responsible for mapping those types to the VTK-specific representation. - internal_render_engine_vtk_base defines a new vtk polygon source based on the RenderMesh data. This is what replaces vtkOBJReader. - All non-mesh Shape types now use the RenderMaterial APIs to map from geometry properties to RenderMaterial. - The unit tests have simplified vis a vis meshes and textures. Now that it simply translates, we can rely on RenderMaterial tests to confirm the protocol logic and we just need to confirm RenderEngineVtk is exercising it and translating it correctly. - The RenderMesh -> vtkPolyData is capable of providing a more compact representation of the mesh than the vtkOBJReader (it created unique vertex data for each triangle). The gltf server code uses VTK to create gltf files. The reference gltf files used in the tests reflected the old, bloated mesh descriptions. They have been updated to the newer compact sizes. Some incidental clean up: - Default diffuse color is properly stored as Rgba now. - Optimized the normal case of not scaling the texture. - Added note for clarity about the efficacy of the scaling factor; it seems to pass in test, but it isn't clear *why*. This needs further investigation.
- Loading branch information
1 parent
310a17c
commit 6fab7a5
Showing
11 changed files
with
256 additions
and
170 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.