aframevr / aframevr/aframe

Some .obj file(Wavefront) cannnot display.

Open
#4,256 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
17.6k
Forks
4.4k
PR merge metrics
No merged PRs in 30d

Description

I want to display this obj file which can display on Unity, but cannot display on A-Frame. (this object output from Structure Sensor)
However, the obj file output(monkey) from blender was able to display.

This seems strange.
sample is here.

In the console, it appears that OBJLoader has completed the task.

OBJLoader: 148.512939453125ms
OBJLoader: 5.342041015625ms

There is no error and the following warning appears, but it does not seem to be a direct problem.

core:a-entity:warn Tried to remove `Object3D` of type:  mesh which was not defined. 2 browser.js:111:32

this is my code.

<!DOCTYPE html>
<html>

<head>
    <script src="https://aframe.io/releases/0.9.2/aframe.min.js"></script>
</head>

<body>
    <a-scene>
        <a-assets>
            <!-- https://neno.dev/Beef1.0/Model.obj -->
            <a-asset-item id="beef_obj" src="../Beef1.0/Model.obj"></a-asset-item>
            <a-asset-item id="beef_mtl" src="../Beef1.0/Model.mtl"></a-asset-item>
                        
            <a-asset-item id="monkey_obj" src="../model/untitled.obj"></a-asset-item>
            <a-asset-item id="monkey_mtl" src="../model/untitled.mtl"></a-asset-item>
        </a-assets>
        <a-camera position="0 1.8 4" fov="45" near="0.5" far="10000" cursor-visible="true" cursor-scale="1" cursor-color="blue" cursor-maxdistance="1000" cursor-offset="1" look-controls-enabled="true" wasd-controls-enabled="true"></a-camera>

        <a-entity obj-model="obj: #beef_obj; mtl: #beef_mtl" position="1 0 -1" scale="10 10 10"></a-entity>
        <a-entity obj-model="obj: #monkey_obj; mtl: #monkey_mtl" position="-1 0 -1" scale="0.2 0.2 0.2" rotation="0 0 0"></a-entity>
 
        <a-sky color="#8888ff"></a-sky>
    </a-scene>
</body>

</html>

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the reproducible page at https://neno.dev/aframe_sample/ and compare the Structure Sensor OBJ/MTL files with the Blender monkey files used by the obj-model entities. Inspect the OBJLoader output and the reported Object3D warning while testing in Chrome or Firefox. Done means the linked model displays correctly in A-Frame without the reported failure.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, three.js
Domain
computer-graphics, frontend, web-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.