- changed status to open
[Research] Load MCity in Drake
Load OBJ model of MCity intro Drake Visualizer. The model is made of some files with its materials. We should check how far we can load into Drake.
Comments (7)
-
reporter -
reporter To load MCity from obj/mtl files we need to call a python script from Director. However, we must use directorPython (you can find it under build/install/bin/directorPython once automotive is compiled) instead of python.
So you need to type something like this from the terminal:
./build/install/bin/directorPython assimp2vtk.py [/path/to/obj/file]
It will load drake_visualizer and your obj file.
On the other hand, if you just use File --> Open data option from an already opened drake_visualizer to load an obj file, you won't get the material files parsed. This is because, VTK Engine does not support material/texture files for obj but it does for vtp/vtm files. So, this script uses assimp to load the mesh files and its materials, and then it converts that to a generic structure of the mesh which VTK can understand and builds it in the visualizer. Assimp is not available for IO with the user, but it's available as a resource when you load the visualizer.
BTW, Director is the same as drake_visualizer. This is an external respository, you can find it under /externals folder where all the dependencies are allocated.
-
reporter This is a picture of what we have loaded.
-
reporter Just a minor coment, the Assimp module can be installed like this using pip:
pip install pyassimp
In Ubuntu 14.04, the pyassimp version does not allow you to load materials but you can load textures as you can see in the picture above.
-
reporter All this issues refer to the discussion on how to load textures and obj files inside Drake:
-
reporter Added the meshes to terminus repository in https://github.com/ekumenlabs/terminus/pull/197
-
- changed status to resolved
- Log in to comment