Closed ctzurcanu closed 9 years ago
Interesting question -- The game engine is not really suited for this, if you are just looking for rendering voxels there is more freedom. This isn't exactly straightforward but take a look at this: https://github.com/mikolalysenko/voxel-mipmap-demo/blob/master/lib/createMesh.js
Thank you. Rendering is the main intent. But it would not hurt to have the whole engine able to render cuboids..
it would be a significant change as the block shape is assumed in a range of systems like physics, position/distance calculation, etc
@mikolalysenko do we have a generic voxel renderer for stackgl?
@kumavis I am surprised that such variable has not been abstracted out into some kind of general settings :( yet..
@kumavis not anything usable out of the box, but you can probably patch up ao-mesher/ao-shader for this purpose. Going forward it would probably be better to move the shader bits into separate modules and make them directly requirable in stackgl. If anyone is interested in taking on this project I can offer some help.
how about if I do not need a texture map for those cuboids? (at least for a first version) I would love to have it with just a plain color with high transparency and no shade. (maybe transparency on voxels also has issues.. I will check on voxel-glass proj)
Another option is you can check out the surface-nets module, which extracts isosurfaces from volumes in any dimension:
@ctzurcanu ah, this is the old mesher -- built for use with Three.js https://github.com/maxogden/voxel-mesh
@ctzurcanu the status of the voxel.js project is that we were rewriting the scene-graph/rendering system and then got stuck b/c interest/free-time fizzled.
yes.. I can understand that the scene graph is more of a general concern. Let leave this issue open and we get to solve it when there is time for it. I may return to look into it myself if it becomes a nuisance. For the moment, I have more important blockers on my plate too.
Sorry I think I'll label this as wontfix
, I think it is a fringe concern for a project with an unclear survival status.
Though I encourage you to open up this issue on a general voxel mesh generator such as https://github.com/mikolalysenko/ao-mesher
Ups. I was not aware that is the only place that needs a change for this to work. Thank you for clarification.
Any chance to display and collision-mesh voxels with one longer axis? I have here a sampled object (by slices), but the distance between the slices is about 1.5 "length of pixel". To have this voxel space displayed at the right ratio I would have to stretch the cubes of all voxels.
Is this possible with the engine at this time? if not: is it hard to change?