2
votes

I have a .OBJ model that I imported into Blender (2.79) and trying to export to .gtlf using the following exporter - https://github.com/KhronosGroup/glTF-Blender-Exporter.

Here is the model - Model

Here are my export settings in Blender

enter image description here

The model looks bright and has texture when I view it in the texture mode in Blender but the exported gltf model looks really dark in a-frame.

Here is how it looks in blender enter image description here

and this is how it looks like in gltf after export in aframe

enter image description here

I have tried so many combinations of export settings and played around with lighting within a-frame but unable to get the model in aframe to look like the one in Blender.

I will be grateful if someone could please help.

1
What version of A-Frame are you using? In the latest (0.8.2) try adding renderer="gammaOutput: true" to your scene entity.Don McCurdy
@DonMcCurdy Thank you. It did improve the scene but the texture is still not as good as I see on Blender.Niraj
Could you clarify "as good"? Appearance in a realtime engine may not be as good as an offline render... Are the remaining issues lighting, or does color still appear wrong?Don McCurdy
You are right, the difference in quality is only due to the offline v/s the realtime engine view. Thanks Don, as always, for your helpNiraj
I don't think the issue is with your export/import - the difference would be in the lighting used. blenders viewport lighting setup can be viewed in preferencessambler

1 Answers

2
votes

To get correct color output, you'll often want to set gammaOutput on the renderer:

three.js

renderer.gammaOutput = true;

A-Frame 0.8.2+

<a-scene renderer="gammaOutput: true"> ...

Beyond that, color is also a factor of lighting and various differences related to realtime engines vs offline rendering. The three.js forum is a good place to discuss particular visual effects if you have questions.