Skip to content

Incorrect texture rendering for 3D meshes from .obj file #1813

Closed

Description

@anoopsonar30

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 -
pybulletrender1

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 -

3dsmaxrender
3dsmaxrender2

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.

Activity

  1. erwincoumans commented on Aug 2, 2018

    @erwincoumans
    Member

    PyBullet (and the underlying Bullet Robotics APIs) rendering has some limitations:

    1. wavefront obj files can have at most 1 texture
    2. there is a limited pre-allocated memory for visual meshes

    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.

  2. locked and limited conversation to collaborators on Apr 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions