Grass Node v0.3.x

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki
Pazystamo
Posts: 115
Joined: Sat Dec 03, 2005 5:56 pm
Location: Lithuania
Contact:

Post by Pazystamo »

looks realy nice, but as i can see grass is aligned by terrain normal. It should be aligned vertical (Y) with some random seed. But still looks realy nice.
Guest

Post by Guest »

REALLY GREAT WORK MAN!!!
Guest

Post by Guest »

OMG! This is incredible! But I can't tell the depth of field too well. Also, how about different shades of green for the grass? That would make it so they don't blend into each other. Which makes them look like fur than grass. Speaking of fur... :twisted:
Pazystamo
Posts: 115
Joined: Sat Dec 03, 2005 5:56 pm
Location: Lithuania
Contact:

Post by Pazystamo »

Nice work, maybe one day it will look like this photo http://www.pbase.com/shaun/image/45971252 :D (maybe you can use it for grass texture...)
Xaron
Posts: 310
Joined: Sun Oct 16, 2005 7:39 am
Location: Germany
Contact:

Post by Xaron »

Hi bitplane,

I want to use your node in my project. :) But I have to change the size of the grass billboards. I took a look into your code and found that it has something to do with the "dimensions" value.
How could I scale these billboards down, as I use my own camera node with a far clipping plane of 300, which seems to affect the size?

Thanks in advance and best regards - Xaron
bitplane
Admin
Posts: 3204
Joined: Mon Mar 28, 2005 3:45 am
Location: England
Contact:

Post by bitplane »

Hey Xaron
The far plane shouldn't affect the size of the blades, to change their size, just change the following line in CGrassPatchSceneNode::Create :

Code: Select all

 core::dimension2d<f32> size(rand() % 40 +50, rand() % 60 + 50);
as you can see, its currently set to make grass between 50 and 90 wide and 50 and 110 tall. Wider grass provides better coverage, but thinner grass looks better on steep hills or when it is more sparce
hope this helps :)
Submit bugs/patches to the tracker!
Need help right now? Visit the chat room
Xaron
Posts: 310
Joined: Sun Oct 16, 2005 7:39 am
Location: Germany
Contact:

Post by Xaron »

Thank you bitplane! :) This works very well.

Regards - Xaron
Xaron
Posts: 310
Joined: Sun Oct 16, 2005 7:39 am
Location: Germany
Contact:

Post by Xaron »

Hey bitplane, it's me again. ;)

I have a suggestion concerning these lines:

Code: Select all

s32 x1 = (s32)(p.X/TerrainScale.X);
s32 z1 = (s32)(p.Z/TerrainScale.Z);

video::SColor c = TerrainHeightMap->getPixel(x1,z1);
f32 height = c.getBlue() * TerrainScale.Y;
Particles[i].pos.Y = height + Particles[i].size.Height/2;
Due to the fact that you use the grey value as a height parameter you get some really ugly interpolation errors, especially if you use a 8 bit heightmap. I will try to improve this using some kind of interpolation.

How do you get around this?

Thanks and best regards - Xaron
bitplane
Admin
Posts: 3204
Joined: Mon Mar 28, 2005 3:45 am
Location: England
Contact:

Post by bitplane »

hmm this reminds me, the wind interpolation code is also wrong. currently it interpolates diagnally across the middle from top left to bottom right without worrying about the other two corners. it should go left side, right side, then across the middle (or the other way round).
the height of the grass should really use code stolen from the terrain node, but i got that code from these forums and haven't really looked into it properly. I'll squirt out a new version sometime this weekend! :)
Submit bugs/patches to the tracker!
Need help right now? Visit the chat room
Xaron
Posts: 310
Joined: Sun Oct 16, 2005 7:39 am
Location: Germany
Contact:

Post by Xaron »

Thanks bitplane, I'm looking forward for it. ;)

Regards - Xaron
Xaron
Posts: 310
Joined: Sun Oct 16, 2005 7:39 am
Location: Germany
Contact:

Post by Xaron »

Hi bitplane,

I don't want to stress you but are there any news on that? :)

Best regards - Xaron
bitplane
Admin
Posts: 3204
Joined: Mon Mar 28, 2005 3:45 am
Location: England
Contact:

Post by bitplane »

hmm sorry haven't touched it recently. I will get back into the swing of it pretty soon, :oops:
man, I really hate deadlines and committing to stuff, but I promise I'll do some more on it this week
Submit bugs/patches to the tracker!
Need help right now? Visit the chat room
XAngel
Posts: 4
Joined: Mon Feb 06, 2006 9:07 pm
Location: Mafra, SC / Brasil
Contact:

Post by XAngel »

Wow!!!
Very nice man...

Can you post a FPS counter?
\o/
bitplane
Admin
Posts: 3204
Joined: Mon Mar 28, 2005 3:45 am
Location: England
Contact:

Post by bitplane »

*points to the top of the screen*
sure, there's one up there in the title bar :)
Submit bugs/patches to the tracker!
Need help right now? Visit the chat room
Xaron
Posts: 310
Joined: Sun Oct 16, 2005 7:39 am
Location: Germany
Contact:

Post by Xaron »

bitplane wrote:hmm sorry haven't touched it recently. I will get back into the swing of it pretty soon, :oops:
man, I really hate deadlines and committing to stuff, but I promise I'll do some more on it this week
I'm sorry! I really did not want to stress you. ;)

Regards - Xaron
Post Reply