NOVA-Team / NOVA-Monorepo

The core API of the NOVA voxel game modding system
https://nova-team.github.io
GNU Lesser General Public License v3.0
66 stars 23 forks source link

Ability to render a non-nova object #104

Open Ecu opened 9 years ago

Ecu commented 9 years ago

NOVA needs the ability to get the renderer for an existing object (item, block, entity, etc.).

This would be used in order to do things like Buildcraft pipes, or translocator's crafting grid. I think beyond being able to get item/block renderers, we need to be able to get entities as well. It would allow us to do things like render a creature in a jar, or any number of creative things.

In addition, I think there may be some issues with making this work well the way Nova handles things. Specifically, since Nova doesn't use meta-data itself, we need a way to pass data to the renderer that we acquire so that it will render the object using said object correctly. As an example, you may want to render a container full of liquid.

ghost commented 9 years ago

This can't really be done with Models as they are implemented right now. What is needed is for Models not to be sets of faces & children, but to be a interface which covers: Compound models, which are just the "children" element(with the ability to translate and rotate each element), Mesh models, which are like the Models we have now, And "black-box" models, which are given when trying to get the model of a non-NOVA object(or even NOVA objects if you want to enforce those kind of restrictions) Compound, Mesh, and black-box model types are abstract in Core, and must all be created by making calls to the wrapper(Compound and Mesh in some rendering class somewhere, and black-box in the wrapped non-NOVA object the user wants the model of). The wrapper then returns an implementation of the model type, which also implements an interface for the wrapper's preferred form of rendering.