3

I've read the A-Frame documentation and copied the code directly from it, but I'm having trouble displaying a 3D object in .obj and .mtl formats. This is what I have:

<a-assets>
<a-asset-item id="chair-obj" src="obj/chair1.obj"></a-asset-item>
<a-asset-item id="chair-mtl" src="obj/chair1.mtl"></a-asset-item>
</a-assets>

<a-entity obj-model="obj: #chair-obj; mtl: #chair-mtl" position="0 1 -1" scale="0.000001 0.000001 0.000001"></a-entity>

The documentation suggests this might be a problem with mis-matched scales between A-Frame's scale and the object's native scale. It suggests scaling it down so I did so in steps from 0.1 to 0.000001 but still cannot see the object displayed (the object, and other test objects, were downloaded from TurboSquid but none display).

Nathan Diesel
  • 91
  • 2
  • 4

1 Answers1

2

I've used slightly different syntax which worked for me: <a-obj-model src="#chair-obj" mtl="#chair-mtl" scale="0.001 0.001 0.001"></a-obj-model>

Kieran F.
  • 567
  • 4
  • 16
  • 1
    Thank you, that seemed to work although I'm not sure if it was your code or the fact that I updated the A-Frame version from 0.2 to 0.3. But now I see the object! – Nathan Diesel Sep 02 '16 at 20:07