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

Idea: example to render and save as a 3d model #83

Closed
rom1504 opened this issue Dec 20, 2020 · 11 comments
Closed

Idea: example to render and save as a 3d model #83

rom1504 opened this issue Dec 20, 2020 · 11 comments

Comments

@rom1504
Copy link
Member

rom1504 commented Dec 20, 2020

eg .obj or .stl
https://www.npmjs.com/package/threejs-export-stl
https://docs.github.com/en/free-pro-team@latest/github/managing-files-in-a-repository/3d-file-viewer

interesting for visualization in github and for ml rom1504/minecraft-schematics-dataset#6

@rom1504 rom1504 added the enhancement New feature or request label Dec 20, 2020
@extremeheat
Copy link
Member

OBJ and STL don’t have texture data stored with them, so while the 3d structure of these would show up, it wouldn’t look like Minecraft, it would just a wireframe. Maybe GitHub supports other formats? Otherwise there could be an example to export the scene, should be pretty easy to do.

@rom1504
Copy link
Member Author

rom1504 commented Dec 20, 2020 via email

@rom1504
Copy link
Member Author

rom1504 commented Dec 20, 2020 via email

@extremeheat
Copy link
Member

.obj and .stl files are primarily for exporting geometries/vertices of 3D objects and don't have support for embedded texture data. So you have to include this data externally in a separate file like .mtl.

It looks like some implementations of .obj might have support for embedded colors (1), but it's not standardized AFAIK. Looks like it's the same for .stl. But even with the basic colors, it's not minecraft textures or anything. It might work if we make a color map, but the block faces would be of solid color, if this makes sense.

@rom1504
Copy link
Member Author

rom1504 commented Dec 20, 2020 via email

@Karang
Copy link
Collaborator

Karang commented Dec 20, 2020

obj and stl are mainly popular for 3d printing. The standard for game / textured assets exchange is gltf.

https://www.khronos.org/gltf/

@extremeheat
Copy link
Member

extremeheat commented Dec 21, 2020

Yeah, gltf is a good idea and three.js has a built-in exporter for it. But it would be cool to have a giant repo of schematics on github, so you can see them straight from github. Unfortunately I don't see any other supported formats other than .stl so maybe we could do stl exporting and see how that looks? So at least you have something to look at right in the repo. Otherwise this could be done on Github pages. GLTF is JSON based, so it should be easy to use for ML tasks. It might get complicated when it comes to identifying blocks though, maybe the solid face colors in STL would be better for that use case.

@rom1504
Copy link
Member Author

rom1504 commented Jan 1, 2021

@rom1504
Copy link
Member Author

rom1504 commented Jan 2, 2021

#113

@rom1504
Copy link
Member Author

rom1504 commented Jan 3, 2021

@rom1504 rom1504 closed this as completed Jan 3, 2021
@rom1504
Copy link
Member Author

rom1504 commented Jan 3, 2021

can be viewed at https://gltf.insimo.com/

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

No branches or pull requests

3 participants