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
Re: New Tutorials ! [updt:2011/03/29: geometry shader cubes]
- madmarx
- 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]
Tutorials + Ogre searchable API + more for Ogre1.7 : http://sourceforge.net/projects/so3dtools/
Corresponding thread : http://www.ogre3d.org/forums/viewtopic. ... 93&start=0
Corresponding thread : http://www.ogre3d.org/forums/viewtopic. ... 93&start=0
- PolyVox
- 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]
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
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

- Kojack
- OGRE Moderator
- Posts: 7156
- Joined: Sun Jan 25, 2004 7:35 am
- Location: Brisbane, Australia
- x 532
Re: New Tutorials ! [updt:2011/03/29: geometry shader cubes]
Ogre's particle system can use point sprites instead of manual quads, so it already can output individual points.I guess Ogre outputs quads rather than individual points so it might not be trivial.
- madmarx
- 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]
Well vsync is enabled in the program, so you can't go faster than 60FPS (on most devices) until you desactivate itWith the 300000 cubes I get about 60FPS on my machine (GTX 280).

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
Corresponding thread : http://www.ogre3d.org/forums/viewtopic. ... 93&start=0
-
- Gnoblar
- Posts: 22
- Joined: Wed Jun 29, 2011 2:23 am
Re: New Tutorials ! [updt:2011/03/29: geometry shader cubes]
Could i translate them to chinese? 

- madmarx
- 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]
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.
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
Corresponding thread : http://www.ogre3d.org/forums/viewtopic. ... 93&start=0
-
- Gnoblar
- Posts: 21
- Joined: Wed Mar 07, 2012 4:24 pm
- Location: Paris, France
Re: New Tutorials ! [updt:2011/03/29: geometry shader cubes]
Many thanks Madmax, it was very helpful !
- madmarx
- 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]
@Baeski
! 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 !
=> YEScould I translate them to chinese ?

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
Corresponding thread : http://www.ogre3d.org/forums/viewtopic. ... 93&start=0