Page 1 of 1

"Animations" with Static Geometry?

Posted: Mon Feb 03, 2014 1:06 pm
by Bananenfreak
Heyho,

I searched for "waving grass" and found this:
Grass Demo

Specialisation of OGRE's framework application to show the use of the StaticGeometry class to create 'baked' instances of many meshes, to create effects like grass efficiently.

This demo draws a series of static billboards (in the configuration of an asterisk (*)) representing grass. These billboards sway gently back and forth in a sinusoidal pattern to simulate a gentle breeze.

A non-static billboarded light source moves through the scene to show off dynamic lighting.
http://www.ogre3d.org/tikiwiki/tiki-ind ... Ogre+Demos

So, is there a possibility to "animate" Entities in a Static Geometry?

EDIT: I downloaded the Demos, but grass isn“t waving ?!

EDIT2: Here is some code: http://ogre3d.org/forums/viewtopic.php?f=2&t=29987. I hope some OGRE cracks can find a solution :)

Re: "Animations" with Static Geometry?

Posted: Mon Feb 03, 2014 6:30 pm
by Samuel
I believe what you want is PagedGeometry which is not yet available in Purebasic.
Alexi's suggestion about a vertex shader would work, but it will be slow if you have too many entities.
I've experimented with a grass vertex shader before and after a couple thousand grass entities my FPS went way down.
So, unless you only want a couple animated blades of grass here and there I would avoid regular entities.

Re: "Animations" with Static Geometry?

Posted: Tue Feb 04, 2014 9:47 am
by Bananenfreak
Hey,
thanks for your answers.
Bad, animated "Static geometries" would be perfect.
Hmm, "a couple of thousands" would be enough.
I will search and test for a while...