"Animations" with Static Geometry?

Everything related to 3D programming
User avatar
Bananenfreak
Enthusiast
Enthusiast
Posts: 519
Joined: Mon Apr 15, 2013 12:22 pm

"Animations" with Static Geometry?

Post 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 :)
Image
User avatar
Samuel
Enthusiast
Enthusiast
Posts: 756
Joined: Sun Jul 29, 2012 10:33 pm
Location: United States

Re: "Animations" with Static Geometry?

Post 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.
User avatar
Bananenfreak
Enthusiast
Enthusiast
Posts: 519
Joined: Mon Apr 15, 2013 12:22 pm

Re: "Animations" with Static Geometry?

Post 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...
Image
Post Reply