Re: New Tutorials ! [updt:2011/03/29: geometry shader cubes]

Anything and everything that's related to OGRE or the wider graphics field that doesn't fit into the other forums.
User avatar
madmarx
OGRE Expert User
OGRE Expert User
Posts: 1671
Joined: Mon Jan 21, 2008 10:26 pm
x 50

Re: New Tutorials ! [updt:2011/03/29: geometry shader cubes]

Post by madmarx »

Hello everyone,

The geometry shader to generate 1 cube per vertex, allowing thousands of moving cubes is ready (300000 animated cubes in the scene). More precisely, it was ready 3 or 4 months ago, and I release it now.


Next to come : what do you prefer ? a few simpler shader tutorials first, or more brutal shader examples ?


Also I made a new 3D model for my tutorial instead of the ogrehead. Don't expect it to be special, it is simply lighter to download.

Have fun!

Pierre
Tutorials + Ogre searchable API + more for Ogre1.7 : http://sourceforge.net/projects/so3dtools/
Corresponding thread : http://www.ogre3d.org/forums/viewtopic. ... 93&start=0
User avatar
PolyVox
OGRE Contributor
OGRE Contributor
Posts: 1316
Joined: Tue Nov 21, 2006 11:28 am
Location: Groningen, The Netherlands
x 18
Contact:

Re: New Tutorials ! [updt:2011/03/29: geometry shader cubes]

Post by PolyVox »

Very cool! With the 300000 cubes I get about 60FPS on my machine (GTX 280).

I wonder whether it's posible to use this with a particle system, to have cubic particles? I guess Ogre outputs quads rather than individual points so it might not be trivial. Plus rotation could be a complication.

Anyway, great work :-)
User avatar
Kojack
OGRE Moderator
OGRE Moderator
Posts: 7156
Joined: Sun Jan 25, 2004 7:35 am
Location: Brisbane, Australia
x 529

Re: New Tutorials ! [updt:2011/03/29: geometry shader cubes]

Post by Kojack »

I guess Ogre outputs quads rather than individual points so it might not be trivial.
Ogre's particle system can use point sprites instead of manual quads, so it already can output individual points.
User avatar
madmarx
OGRE Expert User
OGRE Expert User
Posts: 1671
Joined: Mon Jan 21, 2008 10:26 pm
x 50

Re: New Tutorials ! [updt:2011/03/29: geometry shader cubes]

Post by madmarx »

With the 300000 cubes I get about 60FPS on my machine (GTX 280).
Well vsync is enabled in the program, so you can't go faster than 60FPS (on most devices) until you desactivate it :mrgreen: .
Still this is not 'that' performant, comparing to voxels technique.

I don't think adding rotation would be a problem (ex: using the normal, or the secondary color).
I also made a version of it that project only 7 vertices of the cube, and create only the 3 visible faces (so there is less fillrate, less transformation etc..). But as it relies on array iteration in the shader, it is in the end slower than this simple shader, even if there are fewer float operations.
Tutorials + Ogre searchable API + more for Ogre1.7 : http://sourceforge.net/projects/so3dtools/
Corresponding thread : http://www.ogre3d.org/forums/viewtopic. ... 93&start=0
Baesky
Gnoblar
Posts: 22
Joined: Wed Jun 29, 2011 2:23 am

Re: New Tutorials ! [updt:2011/03/29: geometry shader cubes]

Post by Baesky »

Could i translate them to chinese? 8)
User avatar
madmarx
OGRE Expert User
OGRE Expert User
Posts: 1671
Joined: Mon Jan 21, 2008 10:26 pm
x 50

Re: New Tutorials ! [updt:2011/03/29: geometry shader cubes]

Post by madmarx »

Thank you for your comment!

I have a lot more, but I did not took time to upload them (notably many about shader), as they sometime require external libraries (xpressiv). As I changed job and town recently, I need some time before I go back to publishing those.
Tutorials + Ogre searchable API + more for Ogre1.7 : http://sourceforge.net/projects/so3dtools/
Corresponding thread : http://www.ogre3d.org/forums/viewtopic. ... 93&start=0
lilin
Gnoblar
Posts: 21
Joined: Wed Mar 07, 2012 4:24 pm
Location: Paris, France

Re: New Tutorials ! [updt:2011/03/29: geometry shader cubes]

Post by lilin »

Many thanks Madmax, it was very helpful !
User avatar
madmarx
OGRE Expert User
OGRE Expert User
Posts: 1671
Joined: Mon Jan 21, 2008 10:26 pm
x 50

Re: New Tutorials ! [updt:2011/03/29: geometry shader cubes]

Post by madmarx »

@Baeski
could I translate them to chinese ?
=> YES :D ! It is my wish! Currently the 10 first tutorial are written in both French and English, there is 1 txt file per language that contains all the translation for each language.
So if you translate that txt file, all the wiki page and all the cpp files with comments are then generated.
I can provide you with the tools I created (on windows) to automatically generate the comment from the txt file, which allows to make all the translation much quickier. I have not tested it with "complicated" signs like chinese so maybe a test with a single sentence in chinese could be a good beginning to check if that work. If not, I can upgrade my tools to make them support it.

@lilin
Thank you !
Tutorials + Ogre searchable API + more for Ogre1.7 : http://sourceforge.net/projects/so3dtools/
Corresponding thread : http://www.ogre3d.org/forums/viewtopic. ... 93&start=0
Post Reply