Voxel rendering optimizations

Started by
4 comments, last by Ben Bowen 12 years, 5 months ago
Ok, so. I head about a thing called "hardware instancing" and have a few questions. (I am using XNA)
First: Is it possible to store a transformation matrix, texture coordinate, and color in the "many times" part of hardware instancing? I was thinking I could simply start with a single square, and transform that everywhere there was a visible face.
Second: Would it be faster to transform the entire cube around, acknowledging that most faces will not be visible, or just transform a face?
Third: Is it possible to combine a transformation AND rotation matrix into the same matrix, then apply the final matrix to whatever you want to transform? (I just want to store a single matrix in the hardware instancing thing, transformation and rotation)
Answer any question(s) that you want, any help is appreciated.
Advertisement
Hello

Third: Is it possible to combine a transformation AND rotation matrix into the same matrix, then apply the final matrix to whatever you want to transform? (I just want to store a single matrix in the hardware instancing thing, transformation and rotation)


Yes of course that's possible : you can set each step of the complete transform with a matrix and multiply them together to get a single matrix that contains the whole transform
(see matrices multiplication as transform composition)
Hope that helps wink.gif

Are the cubes axis aligned, like Minecraft?

Are the cubes axis aligned, like Minecraft?


They're voxels, buddy.

[quote name='hupsilardee' timestamp='1321736791' post='4885706']
Are the cubes axis aligned, like Minecraft?


They're voxels, buddy.
[/quote]

If you read the original post, you might notice the mention of rotation matrices, "buddy".

OP: If they are axis aligned, it would be faster to transform the entire cube around several times, because then you need only apply a translation which is much faster than a matrix multiply. If you are, as I suspect, thinking of rotating a single 2-tri face with combinations of 90 degree rotations to create a cube, this probably will be much slower.


If you read the original post, you might notice the mention of rotation matrices, "buddy".[/quote]

So there's no point to your question? And, I did read it. Thanks for the -1

EDIT:
Oh, sorry if I sounded like a jerk. I'll keep my head down now. :)

This topic is closed to new replies.

Advertisement