API newVolumeImage parameter layers
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
API newVolumeImage parameter layers
Hi, does somebody understand what the layers parameter for function newVolumeImage is? And if this can be constructed from a single image exported as slices from MagicaVoxel?
Re: API newVolumeImage parameter layers
Löve can only load from PNG or JPG, and both of these are 2D image formats. In order to have the pixels defined for all 3 dimensions, you need one 2D image per every Z coordinate. These images are the layers, and you pass them as a table of images. The docs are not clear on the mapping, but most likely Z=0 corresponds to the image at index 1 and so on (so, Z = index - 1).
Re: API newVolumeImage parameter layers
Tools: Hot Particles, LuaPreprocess, InputField, (more) Games: Momento Temporis
"If each mistake being made is a new one, then progress is being made."
"If each mistake being made is a new one, then progress is being made."
Re: API newVolumeImage parameter layers
Oh right, thanks for the correction. I don't know where I got that from. The point still stands, though, that none of the file types is 3D and the layers are the different 2D images used for different Z coordinates.
Re: API newVolumeImage parameter layers
Hmm, correct me if i am understanding this wrong. But the volume image is a voxel like 3D texture accelerated by GPU?
Re: API newVolumeImage parameter layers
A VolumeImage is a 3D texture. All that means is that the texture not only has width and height, but also depth - basically a stack of 2D images. It doesn't by itself provide 3D/voxel rendering, it's merely a data structure.
Who is online
Users browsing this forum: Google [Bot], slime and 194 guests