Do we have a way to animate geometric grass without the skeleton?

Problems building or running the engine, queries about how to use features etc.
Post Reply
phuvinh1408
Halfling
Posts: 45
Joined: Tue Aug 09, 2022 7:55 am
x 1

Do we have a way to animate geometric grass without the skeleton?

Post by phuvinh1408 »

Hi guys, I have question like the title. Do we have any way to animate geometric grasses, trees without the skeleton? Because I have a game server with client using Orge3d engines to load Scenes, terrain, sky, characters. So I want to make the grass waving to look more realistic, but I have no experiences. I did import the mesh file below in XML structure. And the video that I attached will show the exactly the Scene from the game that I want to make the grass waving like that. Can you guys help me get some way to make It through.

This is the mesh file

https://drive.google.com/file/d/15js7ck ... sp=sharing

Last edited by phuvinh1408 on Wed Aug 17, 2022 8:39 pm, edited 1 time in total.
rpgplayerrobin
Gnoll
Posts: 619
Joined: Wed Mar 18, 2009 3:03 am
x 353

Re: Do we have a way to animate geometric grass without the skeleton?

Post by rpgplayerrobin »

The video is marked as private, which means only your account can see it.

Waving of grass can be done from code using a manual object to render the grass/vegitation/trees instead of a mesh (and then making the waving per vertex).

It can also be done using a shader, but that will be harder if the grass is not at the same height in Y, then you would have to someway in the shader know which vertex it is and hardcode only those to move (which works in GLSL using gl_VertexID, example on how to use it here: https://paroj.github.io/gltut/Illuminat ... %2013.html).

In my game, I use a manual object to render and wave the grass, but this means each grass straw is dynamically created from code, and not from a mesh.
But for other vegetation (like trees and bushes) I predefines meshes that has a bound skeleton to them. Then I attach physical objects to each joint in them and move those joints like the physical objects do. That way they can also interact with physical impulses (like explosions or players walking through them).

phuvinh1408
Halfling
Posts: 45
Joined: Tue Aug 09, 2022 7:55 am
x 1

Re: Do we have a way to animate geometric grass without the skeleton?

Post by phuvinh1408 »

So for my game, the game engines that I have was closed-source, but they was built in Ogre3d, and all the grasses were load from meshes. So that means I cannot re-build the game engines even adding dynamic lib. So do we have any way to reverse the *.dll of Ogre into *.cpp that we can look at the code inside?

This is the link of my game engines, you guys can take a look:

https://drive.google.com/file/d/1irczop ... sp=sharing

phuvinh1408
Halfling
Posts: 45
Joined: Tue Aug 09, 2022 7:55 am
x 1

Re: Do we have a way to animate geometric grass without the skeleton?

Post by phuvinh1408 »

As you guys can see how the grass waving and the water look so real in the video that I attached below. And for more, I did attach the link of the game engines that they was used in the game, and some document about the code configuration that they make the grass and water look real. So can you guy help me figure out how can I import that in to my game engines that I attached in the previous post above.

This is the video:

This is the original game engines they was used:

https://drive.google.com/file/d/1oPLGkM ... sp=sharing

And this link is these 2 program file that make grass waving I think. The program loads the hlsl file and then they will use the vertex_program WaveGrass_VS into the material file:

https://drive.google.com/file/d/1DVtt_H ... sp=sharing

Code: Select all

material taohuadao_merge
{
	technique
	{
		pass
		{
			alpha_rejection greater 128

		vertex_program_ref WaveGrass_VS
		{
			param_named offset float4 -6.53133 0 6.70382 0
			param_named interactivePos float4 4.53164e+033 4.53169e+033 0 1
			param_named propertyParam float4 250 0.15 0.15 0
		}

		fragment_program_ref WaveGrass_PS
		{
		}

		texture_unit texColor
		{
			texture taohuadao/tga_taohuadao_merge.dds
			filtering linear linear none
		}
	}

}

}

So my game engines is a remake version from the new game engines above. In the new version they already updated the Ogre lib. So I want to load the program file and all the source, but I could not use the new version of Ogre source, that was not fit with my engines.

Post Reply