Incorrect texture rendering for 3D meshes from .obj file #3581
Replies: 3 comments 5 replies
-
PyBullet (and the underlying Bullet Robotics APIs) rendering has some limitations:
You can use obj2sdf utility to get around (1), it creates additional obj files for each material/texture. Use premake to build Bullet, you get the App_obj2sdf executable (it is in the 'Extras' folder). You can try increasing the default memory allocation to get around (2), or reduce/simplify the mesh/obj file. See https://github.com/bulletphysics/bullet3/blob/master/examples/OpenGLWindow/SimpleOpenGL3App.h#L19, increase the maxShapeCapacityInBytes. Can you share the full reproduction case, including PyBullet python file and the actual obj file and textures in some github repo? By the way, the Stanford GIBSON project also uses PyBullet and its own renderer, which may be able to render those datasets better. Still, it would be good to fix PyBullet to allow to render this too. |
Beta Was this translation helpful? Give feedback.
-
Hi @erwincoumans, this seems to be an old thread but I'll revive it to ask a very similar question. I have an environment with a complicated OBJ with multiple textures (just like in the above thread), and to get it to load, I've used the obj2sdf program and then loaded each individual component separately. However, I'd like to combine these into one entity (MultiBody?) where I have these multiple visual components (from the obj2sdf results) and one collision component (which I already computed with VHACD on the full OBJ). Is this possible? I tried a VisualShapeArray, but it seems this has the same issue where it can only handle 1 texture. If this is not possible, I was thinking about just loading all of the visual elements with no collision (somehow, not totally sure how), and then loading an invisible body for my VHACD result with collision enabled. Wondering if you have any advice on approaching this? Thanks! (as a side note, it seems that the loadSDF() function doesn't load the textures even when the OBJs can each be loaded individually with their textures - if this isn't supposed to happen, let me know) |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
I've been trying to render 3D meshes from the S3DIS database which can be found at - http://buildingparser.stanford.edu/dataset.html
The render for area_3 in pybullet looks like this -
where the textures are all messed up and in the incorrect places. Moreover the roof isn't rendered at all.
On importing the same .obj file into a software like 3DS Max I got the following perfect renders -
Moreover, I've been trying to render a husky robot on the floor of this 3D environment. However, pybullet renders both area_3 and husky for a split second after which area_3 disappears and only the husky is left. Could someone look into this? The 3D environment above is rendered using the createMultiBody() function using the .obj file and the husky is rendered from it's URDF.
Beta Was this translation helpful? Give feedback.
All reactions