Jump to content
  • Advertisement
Sign in to follow this  
khyperia

Voxel rendering optimizations

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

If you intended to correct an error in the post then please contact us.

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 this post


Link to post
Share on other sites
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

Share this post


Link to post
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 this post


Link to post
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. :)

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!