MetaMask / MetaMask/logo

Creating a demo with a custom .obj file

Open
#103 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
236
Forks
92
PR merge metrics
No merged PRs in 30d

Description

I recently tried to compile this project with my own OBJ and MTL files. I want to make a Minecraft head that looks at the cursor. I made the model using Blockbench.
When I ran the "convert" function, I got a JSON file.
It looks like that:
```
{
"positions": [
[0.25, 0.5625, 0.25],
[0.25, 0.5625, -0.25],
[0.25, 0.0625, 0.25],
[0.25, 0.0625, -0.25],
[-0.25, 0.5625, -0.25],
[-0.25, 0.5625, 0.25],
[-0.25, 0.0625, -0.25],
[-0.25, 0.0625, 0.25]
],
"chunks": [
{
"color": [119, 57, 0],
"faces": [
[3, 6, 4],
[2, 3, 1],
[7, 2, 0],
[6, 7, 5],
[5, 0, 1],
[6, 3, 2]
]
}
]
}
```
It seemed kinda suspicious to me, as the built-in fox model is way bigger...
I built a "normal" demo, but no model displays on the page. What should I do? I'm not very familiar with the rendering system, but I'm sure that the fault lies with Blockbench or the conversion library (all the paths and filenames are correct, I've checked that already).

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the normal demo and the output of the "convert" function, then compare the custom OBJ/MTL conversion with the built-in fox model. Check how the rendering system consumes the generated JSON and whether the custom model is loaded by the demo. Done means the custom model appears on the page and follows the cursor as intended.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
computer-graphics
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.