[render_gl] Needs nominal support for glTF #20185
Labels
component: geometry perception
How geometry appears in color, depth, and label images (via the RenderEngine API)
priority: high
type: bug
What happened?
Problem statement
Currently, if a
Mesh
orConvex
referencing anything other than a .obj file is passed toRenderEngineGl
, it will simply do a one time warning about it only uses .obj files and then ignore the geometry.RenderEngineGl
is the last hold out for supporting glTF files (in any way). By giving it (at least nominal) support for glTF, we are free to promote glTF as the preferred visual representation in Drake.Ideal solution
RenderEngineGl
should consume the glTF and render it with a PBR-compliant render pipeline.Challenges
RenderEngineGl
doesn't currently have a PBR render pipeline (this would require extensive shader writing and delay the time before we'd be rendering anything.GeometryId
. CurrentlyRenderEngineGl
only associates a single geometry "piece" with aGeometryId
.Proposed solution
RenderEngineGl
to support a one-to-many mapping betweenGeometryId
and geometry "pieces".The plan
Fix Drake to support OBJs with multiple materials (and multiple objects) in rendering.
Have
RenderEngineGl
instantiate geometries from glTF files.RenderEngineVtk
with current settings (e.g., shadows, env maps, etc.)RenderEngineVtk
with "fastest" settings.RenderEngineGl
with 'fast" settings.RenderEngineGl
is 2-3X faster thanRenderEngineVtk
.examples/multibody/deformable/bubble_gripper.cc
uses"package://drake_models/wsg_50_description/meshes/textured_bubble.obj"
. Make sure it works with a glTF version instead. Then convert to glTF and remove the .obj file inRobotLocomotion/models
.RenderEngineGl
supports glTF files by directly parsing the glTF data into OpenGl data structures that get dumped straight to the GPU. The example above uses the .obj file as a "driven mesh". Driven mesh parses the file intogeometry::internal::RenderMesh
as an intermediate data structure. We currently have no path to go from glTF file toRenderMesh
data type. (An earlier version of theRenderEngineGl
support started going down that path, but that level of conversion was much more demanding than simply ferrying data to the GPU.) While it is reasonable to want to use a glTF file as a driven mesh, we'd have to do a fair amount of heavy lifting to map glTF toRenderMesh
to support the currentDrivenMesh
infrastructure. The needs to resolve this have been added to Deformable Visualization for Camera Sensors #18922..Version
No response
What operating system are you using?
No response
What installation option are you using?
No response
Relevant log output
No response
The text was updated successfully, but these errors were encountered: