Voxels get lost when you place them scripted in matrix. (


#1

Ok, working with scripting. and if you create a matrix. in the example 50x50 voxels. some voxels dont get placed. if you place. ‘VoxelLose’ are otehrs seeing problems like this to. tried it in the sandbox and on my own server. it happens on both. my other script its a bit worse and i see more misisng voxels.

var pos  = { x: 290, y: 200, z: 200};
var x,y = 0;

function CreateVoxelMatrix()
{            
        do
        {
            x = 0;            
            do
            {
                    Voxels.setVoxel(pos.x+x, pos.y+y, pos.z, 1.0, 0, 255, 255);
                    x++;
            }
            while (x <= 50);
            y++;
        }
        while (y <= 50);

print(’-- End --’);
}

CreateVoxelMatrix();

Script.stop();


#2

Yeah, disappearing voxels/voxels not placing are a know issue.


#3

Yep can confirm. Perhaps a bigger issue is the same in reverse - a script that deletes voxels also misses some locations, leaving random voxels dotted around, as seem on my domain. I will confess to pushing out a 2048 by 2048 by 4 matrix though - have got to push those limits :laughing:


#4

Yeah, the thing is though 2048 x 2048 only represents 1/8th the surface area of a domain, and a decent terrain is going to have fairly small, hence, high number of voxels. I’ve been sort of interested in voxels for the last couple of years after running into the Eulcideon “unlimited data” videos. From what I can glean from it, they describe it as an indexing system that allows for unlimited data, unlimited detail because instead of modeling all the voxels, they simply do an 3d look up after indexing the data. That way, they do a simple, quick look up for each pixel on the screen.

I also just ran into this thing called voxel farm… it’s by far the most impressive engine I’ve seen to date. The YouTube channel has a rolling history of the work the guy has done, and now apparently has a larger team working on it now as well. I think it best demonstrates the sort of position we want to be in regarding rendering, shaders, ,physics, model import, etc. It’s pretty amazing stuff.


#5

With the big update coming out in the next 24 hours it will be interesting to retry your issue. https://github.com/highfidelity/hifi/pull/3335


#6

https://www.youtube.com/channel/UCnAnbwdbzRvFhQGCAVdh4Pw/ “Voxel Farm”


#7

Wow, some serious under the hood rewiring going on there. Great to see gravity, damping and velocity come to models !! Really exciting to see a big update rolling out !! @ZappoMan Thanks for all your hard work, I’ll be sure put stuff through it’s paces and report back anything that breaks :slight_smile: Also sounds like we’re a step closer to a proper inventory system too.


#8

:slight_smile: looking forward to that!


#9

Nice video, and the nature and surrounding. :smile: Cant wait to walk there.