aframevr / aframe

:a: Web framework for building virtual reality experiences.
https://aframe.io/
MIT License
16.61k stars 3.94k forks source link

GLB Texture problem on AFRAME #4135

Open juansho01 opened 5 years ago

juansho01 commented 5 years ago

@donmccurdy When i load an GLB model, created on MIXAMO, on Aframe, the Model is showed and the animation, but this doesn't show the textures

juansho01 commented 5 years ago

This is the HTML Sample `

`

And this show the model (The person) image

why doesn't show the textures? i see the model over https://gltf-viewer.donmccurdy.com/ to test this and all it's ok but on A-Frame doesn't works

dmarcos commented 5 years ago

Can you share a link to a full runnable example? https://glitch.com/~aframe is a good option

juansho01 commented 5 years ago

thanks @dmarcos Look, this is the project on Glitch https://glitch.com/~best-cough you must a little zoom out to see the objects in the scene. Thanks for your help

dsinni commented 5 years ago

FWIW, I think I remember seeing something like this before but don't know if it was ever resolved.

The model looks fine in the https://gltf-viewer.donmccurdy.com/ viewer. It also looks fine if you enter fullscreen mode in the OP's A-Frame demo on desktop:

image

But shows as the OP demonstrated when not in fullscreen.

juansho01 commented 5 years ago

FWIW, I think I remember seeing something like this before but don't know if it was ever resolved.

The model looks fine in the https://gltf-viewer.donmccurdy.com/ viewer. It also looks fine if you enter fullscreen mode in the OP's A-Frame demo on desktop:

image

But shows as the OP demonstrated when not in fullscreen.

Thanks @dsinni When you says : OP's it's the A-Frame inspector? indeed but the problem it's on normal view. Thanks

dsinni commented 5 years ago

I was just stating, to provide more information for the issue, that the model appears as it should in the glTF model viewer, and when in A-Frame fullscreen, but not when in standard (non-fullscreen) A-Frame view on desktop.

dsinni commented 5 years ago

I believe this may be a duplicate of #3997 .

arpu commented 5 years ago

i think the problem could be the assets system timeouts on the fixed 3 sec

try to set the timeout for assets system or use inline url

arpu commented 5 years ago

hm no tested this on glitch and get the same problem

juansho01 commented 5 years ago

Hi every one, i find some things:

  1. The process for the model was: -Animated on MIXAMO -Exported to FBX -On https://modelconverter.com exported to GLB -The GLB was loaded on A-Frame with A-Frame Extras

After the Issue i inspect the model on https://threejs.org/editor/ to understand the materials and some error. I find that complex textures that use UV textures doesn't works fine, so i need search for a better export FLB-GLB solution:

-In MIXAMO Export separately Model (T-POSE) and animations -Import this to BENDER (First Model, after Animations) -Export of BENDER to GLB with animations -Load to A-Frame the new GLB and the model works with textures. The quality of the textures isn't the better but works

Look the Glitch Update: https://glitch.com/~best-cough

Searching a lot i see that Three.JS it's better to render textures, the GLB viewer it's based on this, i don't know if this is an issue of A-Frame or maybe need more development.

Thanks

dmarcos commented 5 years ago

Thanks for the investigation. What do you mean that the quality of the textures is not the best? A-Frame uses THREE underneath. Quality should be the same when using the same lighting and gamma.

juansho01 commented 5 years ago

yes, this Should be the same, but if you see the problem: the GLB Viewer online https://gltf-viewer.donmccurdy.com/ Runs over Three.JS and the textures runs perfectly but when you load the same model on A-Frame this doesn't show the textures at the same, you must download the Material quality for show the render. I Try other options and this was the better for this moment. Maybe the Problem it's with A-Frame, it's an export pipeline and steps to achieve this.

juansho01 commented 5 years ago

@dmarcos Another point it's the @dsinni when i look the model FullScreen, AFrame Render nice the textures, so this can be a Browser problem? In this you have all the reason about Three.js and A-Frame

pfortes commented 4 years ago

I think maybe you have to play with the renderer settings of your a-scene, especialy activating logarithmicDepthBuffer helped me with my texture problems.

For mobile web apps i use: renderer="precision: mediump; antialias: false; alpha: true; logarithmicDepthBuffer: true; colorManagement: true;"