Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question about texture of inserted objects #302

Closed
dhuber23b opened this issue Oct 15, 2019 · 5 comments · Fixed by #500
Closed

Question about texture of inserted objects #302

dhuber23b opened this issue Oct 15, 2019 · 5 comments · Fixed by #500
Labels
enhancement New feature or request

Comments

@dhuber23b
Copy link

I have a model of a chair, and I am using the object insertion capability to add the model to a test scene. The texture of the synthetic object does not look very good. Basically, there is almost no texture at all. I am wondering if I am doing something wrong. Maybe I need to add a lighting setting or something? Attached is a screenshot of the glb file in an online viewer and the image generated by Habitat for the same object.

screenshot_04
scene_and_object_color_001

@dhuber23b
Copy link
Author

I also noticed that the feet on the chair are not being rendered.

@aclegg3
Copy link
Contributor

aclegg3 commented Oct 15, 2019

Hey Daniel, you are correct that there is a missing shader issue here. We have a feature in the works to address this. PR #152 shows the current state of that effort, but we intend to improve on this to support additional shaders and settings in the coming months. For now, if you need non-trivial shading via illumination you can check out some of the changes in the clutter_nav branch.

Specifically: src/esp/gfx/GenericDrawable.cpp shows lighting setup in the shader draw.

Happy to chat more about this and help you get a working solution while we get this feature locked down.

@aclegg3
Copy link
Contributor

aclegg3 commented Oct 22, 2019

Related to Issue #319

@mathfac mathfac added the enhancement New feature or request label Nov 13, 2019
@aclegg3
Copy link
Contributor

aclegg3 commented Dec 5, 2019

I have a new prototype branch to address this issue: phong_shaded_physics_objects. With this branch all scenes are flat shaded via textures (as in master), but objects you add with PhysicsManager are rendered with a Phong illumination shader. The default setup is 8 lights placed at the scene bounding box corners. You can also set the position, color, and intensity of the lights in python (see example of this functionality). As a note, adjusting light intensities [0,1] for all 8 lights is likely the best course of action to immediately use this functionality for new scenes (default is 0.2).

A more complete implementation to come, but this should do what you need presently. Let me know how it goes!

@AwokeKnowing
Copy link

AwokeKnowing commented Jan 28, 2020

I think this makes a lot of sense. It seems the general static 'environment' should be either fully flat or fully shaded, regardless of if it's loaded 'in pieces' (adding chairs). But at the physics layer, with dynamic rotation, having shading makes sense, regardless of whether the environment is flat or shaded.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants