# Voxel rendering optimizations

This topic is 2891 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

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.

##### Share on other sites
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

##### Share on other sites
Are the cubes axis aligned, like Minecraft?

##### Share on other sites

Are the cubes axis aligned, like Minecraft?

They're voxels, buddy.

##### Share on other sites

[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.

##### Share on other sites
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.

• ### Game Developer Survey

We are looking for qualified game developers to participate in a 10-minute online survey. Qualified participants will be offered a \$15 incentive for your time and insights. Click here to start!

• 15
• 9
• 11
• 15
• 21