-
Notifications
You must be signed in to change notification settings - Fork 68
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
Comments
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. |
I'm not sure I understand. Obj files have colors. Is it relying on a
different mechanism ? Can we use it ?
…On Sun, Dec 20, 2020, 13:37 extremeheat ***@***.***> wrote:
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.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#83 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAR437VL4ZXGYF7AWELXGQDSVXVYTANCNFSM4VCYJENA>
.
|
Same question for stl
https://github.com/Kitware/F3D/blob/master/data/suzanne.stl
…On Sun, Dec 20, 2020, 13:50 Romain Beaumont ***@***.***> wrote:
I'm not sure I understand. Obj files have colors. Is it relying on a
different mechanism ? Can we use it ?
On Sun, Dec 20, 2020, 13:37 extremeheat ***@***.***> wrote:
> 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.
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub
> <#83 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AAR437VL4ZXGYF7AWELXGQDSVXVYTANCNFSM4VCYJENA>
> .
>
|
.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. |
Ok.
My main idea in this issue was to build some exporters so minecraft part of
worlds could be reused in other tools.
It seems obj and stl are pretty common but anything else could be
interesting too.
I'll look into it to see what are useful formats for various use cases
(importing in 3d modeling tools, importing in visualization tools,
importing in ml pipelines,...)
…On Sun, Dec 20, 2020, 14:15 extremeheat ***@***.***> wrote:
.obj and .stl files are primarily for exporting geometries/vertices of 3D
objects and don't have support for embedded texture data
<https://github.com/PrismarineJS/prismarine-viewer/blob/gh-pages/standalone/textures/1.10.png>.
So you have to include this data externally in a separate file like .mtl
<https://en.wikipedia.org/wiki/Wavefront_.obj_file#Material_template_library>
.
It looks like some implementations of .obj might have support for embedded
colors (1
<https://gamedev.stackexchange.com/questions/21303/how-can-i-include-vertex-color-information-in-obj-files/66270#66270>),
but it's not standardized AFAIK. Looks like it's the same for .stl
<https://en.wikipedia.org/wiki/STL_(file_format)#Color_in_binary_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.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#83 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAR437WZEQJQIKLGAMLO3QTSVX2HHANCNFSM4VCYJENA>
.
|
obj and stl are mainly popular for 3d printing. The standard for game / textured assets exchange is gltf. |
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. |
now done, results at https://gist.github.com/rom1504/7a1eda7db13ea1f65373dc0b42e550fa |
can be viewed at https://gltf.insimo.com/ |
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
The text was updated successfully, but these errors were encountered: