Skip to main content
GameDev.net gamedev.net
🔒 Locked

XNA 4.0 10k more draw different cube(not hardware instance)

Started by jinjin54321 Oct 28, 2012 at 12:16 PM 8 replies 2.7k views
Original Post
jinjin54321
jinjin54321
I'm using XNA 4.0 and I need 10k more draw cube(i don't need lighting and texture color.only just cube color).

I found hardware instance cube. But this is not possible. Because all cube is diffent.

how can many cube very fast draw ?



ps. current performance 1k cube(not texture image,only color) 15fps...;
21st Century Moose
21st Century Moose
What's different about the cubes? Hardware instancing may still be possible.
Direct3D has need of instancing, but we do not. We have plenty of glVertexAttrib calls. 
kauna
kauna
WIth hardware instancing, drawing some thousand cubes should be almost trivial, unless drawing the cubes eat take a lot of pixel fill rate.

What is the difference between each cube? Hardware instancing doesn't exclude differences with the objects, for example all the objects have typically a different transformation, so using the same idea, they can have different color for example, or even different texture.

Cheers!
jinjin54321
jinjin54321

  • all cubes size different . is possible hardware instance ?
kauna
kauna

all cubes size different . is possible hardware instance ?


Well size is something that you can express with the transformation matrix, and since all the cubes already need one to have different position and orientation, you'll just need to scale the transformation matrix to produce smaller and bigger cubes.

Cheers!
jinjin54321
jinjin54321

[quote name='jinjin54321' timestamp='1351429646' post='4994690']
all cubes size different . is possible hardware instance ?


Well size is something that you can express with the transformation matrix, and since all the cubes already need one to have different position and orientation, you'll just need to scale the transformation matrix to produce smaller and bigger cubes.

Cheers!
[/quote]

Thank you!!!!!!!!! ... Can I found example source?
jinjin54321
jinjin54321

[quote name='jinjin54321' timestamp='1351429646' post='4994690']
all cubes size different . is possible hardware instance ?


Well size is something that you can express with the transformation matrix, and since all the cubes already need one to have different position and orientation, you'll just need to scale the transformation matrix to produce smaller and bigger cubes.

Cheers!
[/quote]

Oh.. I real Want XNA 3D Candle Chart So..I Need Cube... Do you know Candle Chart? Candles Many different(Size...Up Down Candle..) .
Is this Possible Hardware Instance ?

http://www.online-stock-trading-guide.com/image-files/candlestick-chart-large.png

I want this style 3d chart... ..;; is this possible hardware instance?
kauna
kauna
Yes,

Googling "XNA 4.0 instancing" gives pretty good results for the described problem.

Cheers!
kauna
kauna
Yes, that kind of chart is possible to do with instancing. Just use non-uniform scaling. That is, scale more at the y/z-direction.

Cheers!
jinjin54321
jinjin54321

Yes, that kind of chart is possible to do with instancing. Just use non-uniform scaling. That is, scale more at the y/z-direction.

Cheers!


Oh!~ My God!~~~ Thank you!!!!!!! Thank you!!! Thank you!!!;;; biggrin.png

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.