Skip to content

Realtime Editing #7

@WireWolf

Description

@WireWolf

Hi I was wondering if you could shed some light on how to edit single voxels in realtime similar to 7 days to die or minecraft, I have created a voxel engine in the past but could not get marching cubes working and I have no experience with compute shaders. I cannot figure out how to edit the "voxel array" and update the chunk. I believe that the pointsBuffer holds the information I need however I don't know where it is safe to edit it and also what type of "Array" it is. I have tried

float[] voxels = new float[meshGen.pointsBuffer.count]; meshGen.pointsBuffer.GetData(voxels);

however it returns system.single[] and i do not know how to fix this. I tried making a 2d array but i threw a memory exception error. Any help would be greatly appreciated thank you for your time.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions