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

How load .obj texture properly #10

Closed
m1gu opened this issue Dec 5, 2016 · 1 comment
Closed

How load .obj texture properly #10

m1gu opened this issue Dec 5, 2016 · 1 comment

Comments

@m1gu
Copy link

m1gu commented Dec 5, 2016

I try load a .obj with UV texture with this code.
awe.projections.add({
id:'marker_projection',
geometry: { path: 'carro.obj' },
position: { x:0, y:0, z:0 },
rotation: { x:0, y:0, z:0 },
scale: { x:0.3, y:0.3, z:0.3 },
material:{ path: 'carro.mtl' },
visible: false,
}, { poi_id: 'jsartoolkit_marker_64' });

But in the AR show all in black.
This is my test link
https://comunadigital.com.ec/awemiguel/

Best regards,

@awe-media
Copy link
Owner

Hi @m1gu - this is really an .mtl formatting issue not really an awe.js issue. If you upload this object to an https://awe.media account you'll find that we automatically fix these types of things up for you.

Most likely the issue is that you have a hardcoded path to your texture file in your .mtl.

See:

map_Kd C:RESPALDO MIGUEL/Comuna Digital/Proyectos/Valvoline/Realidad Aumentada/carrora OLD/resources/tex.jpg

The texture file seems available at the same level so you should just shorten that to:

map_Kd tex.jpg

You probably want to tune your Ka and Ks values too - but that depends on what you want it to look like.

Hope that helps and we'll close this issue now.

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

No branches or pull requests

2 participants