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

Possibility of using the same model for multiple pieces #269

Open
GrimPixel opened this issue Apr 9, 2023 · 1 comment
Open

Possibility of using the same model for multiple pieces #269

GrimPixel opened this issue Apr 9, 2023 · 1 comment
Labels
question Further information is requested

Comments

@GrimPixel
Copy link

Is your feature request related to a problem? Please describe.
In Janggi and Shōgi, pieces are regular octagons and tablets. I wonder if it is possible to use the same model for multiple pieces.

@drwhut
Copy link
Owner

drwhut commented Apr 9, 2023

Currently the only way to re-use the same custom 3D model for multiple pieces is if an object defines another as its parent, but that only allows the color to be changed. For example:

[3D Model.gltf]

desc = "This is the 3D model in the asset pack folder."

[New Model] ; A new object, without having to add a new file to the folder.

parent = "3D Model"
color = "#ff0000"

The only other thing I can think of is that if you export the 3D model as a separated glTF format (that is, one .bin file, one .gltf file, and potentially some textures), you can then have multiple .gltf files all pointing to the same .bin file, which can potentially save a lot of disk space depending on how big the mesh is.

In the 0.2-rewrite branch I've made the metadata for assets a little bit more "loose" when it comes to defining in-engine scenes for pieces, so there may be a way to not only change the color of a parent object like in the first example, but also to override certain textures within the model.

@drwhut drwhut added the question Further information is requested label Apr 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants