owl-project / NVISII

Apache License 2.0
327 stars 28 forks source link

Import scene not rendering material for object files #95

Closed abhihjoshi closed 3 years ago

abhihjoshi commented 3 years ago

I am currently trying to use the import_scene() method to include .obj files. However, I run into an issue where the textures for some .obj files are not being including and others are. Here is an example of the image that is being rendered. image As shown in the image, objects such as the can and the box have their textures rendering, but the robots do not. Also, another thing is that when I use the method import_obj from the old release of ViSII, the textures render on the robot. It is only when I make the switch to import_scene do the textures not render. Does anyone know why I might be running into this issue and how I might go about fixing it?

natevm commented 3 years ago

I have a hunch this might be related to issue #94 . Do these textures appear when rendering in interactive mode if you put a time.sleep before any nvisii.render calls?

Another source of the issue could be that we recently switched from the TinyOBJ importer to ASSIMP, which supports more formats. There are some differences between the two, and it's possible that some obj .mtl files aren't importing correctly.

natevm commented 3 years ago

What OS are you on? Do you know what your driver version / python version is?

abhihjoshi commented 3 years ago

The textures are not appearing in interactive mode either. Also, I am currently running on Windows, and I am using Python v3.7.5.

natevm commented 3 years ago

Do you think you might be able to send me the OBJ / MTL / textures / Python script in a zip folder so that I can repro locally? From there I bet I can solve the issue, and then we can get it fixed in the next release

natevm commented 3 years ago

image

In the latest version of development, these material colors are now picked up. We're seeing some differences now in shading, which will need further exploration in a separate issue.