grass test

Community Forums/Showcase/grass test

SabataRH(Posted 2007) [#1]
Having completed most of the core routines for this grass system, just kinda want to get a feel on the direction its going and any input from the community, below is a link for a small stress test, keep in mind this is an early adoption of the system so nothing is 'set in stone' as of yet.



http://gothasoft.com/temp/grasstest2.rar

Edit:
This will most likely be the last test i posted until I release this thing, if i do actually release it.

Most of the modes are in and only a few things to add/change.

The new demo has a flaw in the terrain, if you move to the center of the map most of the grass vanishes, this is do to the alpha blending on the exported terrain, i'll do something about this later.

Anyways, this demo shows multiple objects passing in the grass and handles an extremely large, stupid, crazy amount of grass entites. 10 times more than the first test post. Speed has been increased!


AJirenius(Posted 2007) [#2]
Let me be the first one to say that this is an awesome thing you have there. Had 1028*768 with 15000 grassunits and it ran perfectly smooth.
Only fun thing was that small cube (I guess it has something to do with the grass) that when looking at the cube from one directino the grass almost dissapeared, but when shooting the ball at it the grass reappeared INSIDE the ball.

:P


puki(Posted 2007) [#3]
Heh, I love the fact that the grass can be pushed by an object.


Fuller(Posted 2007) [#4]
looks great but i noticed you limited the amount of active balls to 1? I'm hoping this isn't a limitation?


SabataRH(Posted 2007) [#5]
AJ : Working on that problem near the center cube, appears to be an alpha issue.

Fuller: Nah, no limitation, 100 collision lookups is only as costly as a single lookup ( got to love the power of griding! )

I'm about 75% done with this lib, few more commands to add in etc. But should be completed by the start of next week.

I'm also adding in a new mode for when collision is detected, 'Flatten' mode, instead of waving the grass around the mesh is actually flattened to the ground. It'll slowly rise back up after sometime. You can also combine the two modes and flatten the immediate mesh and wave the meshes surrounding the flatten mesh. Makes a nice effect!

Also, I've loaded treeparty in on top of it, for testing, its intertchanging perfectly! will even be able to shadow tint grass mesh thats near/under treeparty trees.


SabataRH(Posted 2007) [#6]
<edited>


Naughty Alien(Posted 2007) [#7]
nice..is it possible to control sensitivity of grass waving when colliding?? Let say if I have some parts of my level with very tall grass it should be smooth and waving should be longer after collision...on another side, shorter grass should be much more less smooth and waving donr very fast...is there such control??


SabataRH(Posted 2007) [#8]
Every aspect of the engine is customizable down to giving each individual grass entity its own color, speed, force, size etc... What your asking is possible yes.

I've even went a few steps further, for those that dont wish to customize as much, all the default configruations work with a standard blitz sized unit. This means the system works right 'out of the box', you can customize the options to get a more personal fit for each game project.

I got a small game demo im working which uses this grass system, i'll post it sometime tommorow. Let's just say i got the engine running 2-million grass entites before i started taking a noticeable hit. ( tested on amd 3200 7600Gts )


Naughty Alien(Posted 2007) [#9]
ohh...2 million units?? Show me that man..thats what I WANTTT


xlsior(Posted 2007) [#10]
Looks pretty nice overall!

In 16 bit mode the gras sitself looks really weird on my computer through, it has an a very rough dotted gridd overlaying it. The background itself doesn't seemt o be affected, just the grass.

(Radeon X1650XT)


degac(Posted 2007) [#11]
Great!


SabataRH(Posted 2007) [#12]
New grasstest.exe posted: http://gothasoft.com/temp/grasstest2.rar

This will most likely be the last test i posted until I release this thing, if i do actually release it.

Most of the modes are in and only a few things to add/change.

The new demo has a flaw in the terrain, if you move to the center of the map most of the grass vanishes, this is do to the alpha blending on the exported terrain, i'll do something about this later.

Anyways, this demo shows multiple objects passing in the grass and handles an extremely large, stupid, crazy amount of grass entites. 10 times more than the first test post. Speed has been increased!




Enjoy


Naughty Alien(Posted 2007) [#13]
..really nice...just let us know when you going to release this lib..I hope its possible to buy grass engine separate from Tree engine..


Dock(Posted 2007) [#14]
It runs really slowly on my laptop with intel 'extreme' graphics built in, but at least it runs! :) Nice work.


AJirenius(Posted 2007) [#15]
oh I like the way the ball just flattens the grass to the ground. Suddenly a lot of gameideas just pops up. Great work so far!


boomboom(Posted 2007) [#16]
works fine on my lappy with a 'real' graphics card :) (Nvidia 7600SE)


khayn(Posted 2007) [#17]
i like it, but too slow :(


SabataRH(Posted 2007) [#18]
Ahhh you know what, i've made a terrible mistake. The grass texture in that demo is 1200x800 tga file. I forgot to shrink it. It should be slow at that resolution. Reducing the grass texture to 256x256 will speed it up greatly.

I have to leave for a bit, but I'll recompile the demo with the correct tga sizes when I return. I've removed the demo for the time being.


IKG(Posted 2007) [#19]
I would love to try this, please release the fixed demo soon :D


SabataRH(Posted 2007) [#20]
I've decided to finsih up this project and release a finalized demo. Shouldn't take to much longer. I plan to release this tommorow.

Added some new stuff:

Sounds! grass squashy sounds is now implemented in the core, can be toggled on/off.

Better grass management, no longer is 300,000 grass entites required to fill the map, can get it done with 30k entites now. ( fast fast ! )

SaveGpMap() LoadGpMap() - once you get a grass map just how you like it, use this command to save your results an load them back in to greatly reduce loading times.

Grass memory, the core now tracks each grass entites state, if a grass entity is flattned and later becomes 'out of view' then 'back in view' again - the core recalls its state and restores it identically. This can be used for things like custom path carving etc.. Many many uses with this feature.

Completely reorangized the core routine to allow for even greater preformance on stressed out maps.

I've done everything possible to keep this system very very simple to use, which is my company slogan btw "Simple is Better!" :) . Ive trimmed down the function list to the following:

;---------------------------------------------------
;gp_InitGrassEngine(x1#, z1#, x2#, z2#, grids, emitter) ;-- this must be called to start the engine, given values are: x1 - lower left 3d posiiton of your map, z1 - lower left 3d positin of your map, x2 - upper right 3d posiiton of your map, z2 - upper right 3d position of your map, grids - tells the engine how may grid points you wish to use, must be an EVEN number( 20,26,32 etc) (lower amt means less points and more pressure on the engine, but faster, large maps should consider a starting point of about 100 grid points, play with value to see how it works with your map) ( emitter is optionla, send your 3dsound emitter ID to hear grass sounds in the engine )
;gp_LoadGrass(x#, y#, z#, meshname$, skinname$) ;-- loads a grass entity and returns a blitzID for it
;gp_GrassUpdate(Entity) ;-- this is called once per loop, pass it the entity you wish the grass system to interact with ( can be a camera or blitz mesh )
;gp_GrassYaw(gpGrass) ;-- this will angle a grass entity on the specified Yaw amount, yaw is saved to the grid ( use this to turn a grass entity for random look )
;gp_GrassScale(gpGrassID, scale#) ;-- set scale for a grass ID
;gp_GrassColor(gpGrassID, r ,g , b) ;-- set color for a grass ID
;gp_GrassAlpha(gpGrassID, alpha#) ;-- override the global alpha setting and set the entities customized alpha with this function
;gp_GrassAddWindGust(GrassID, amt#) ;-- increases the grass entites speed and force to wind influence, slowly degrades ovetime (use this from objects moving through grass)
;gp_GrassCollisionCheck(ent, dist#, type, amt#=0) ;-- Ent is the entity to check against the grass, returns number of grass entites collided ; returns all grass ID's in a list ( gp_Collided ) ; dist# is the distance from the entity to grass a collision occurs. Type = the type of collision reaction (1=wave, 2=flatten, 3=wave+flat). AMT# - Optionally you may send additional wind gust to the entity if collision was found.
;gp_SaveGpMap(filename$) ;-- saves the current state of a map to a filename ( can include a path if you wish )
;gp_LoadGpMap(filename$) ;-- loads a saved map state from the filename ( can include a path if you like )
;---------------------------------------------------

No 'clear-all' function in that list yet, but it'll be in the final.

Going to be testing this tonight and tweaking a few of the functions, but if all goes as planned expect a release tommorow and a new finalized demo.


IKG(Posted 2007) [#21]
Darn, well looking forward to testing it :)


boomboom(Posted 2007) [#22]
excited :) will you be releasing a nice demo with grass party and treeparty working together?


boomboom(Posted 2007) [#23]
Hey, I like how you have put up all the functions. Would it be possible to put up all the functions and a description onto your website?

Kinda like http://www.x-pressive.com/SpriteCandy/

:)


SabataRH(Posted 2007) [#24]
Sure, i'll write a module for my website to catalog the functions of all the libs. Nice idea !

Boom, just finished the first grass demo. I havent combned them yet only because im waiting to complete the others than i will make a master demo showing all the libs in one compile.
But for now they are seperate demos.


z4g0(Posted 2007) [#25]
links seems broken?!


IPete2(Posted 2007) [#26]
Hey there, looks good so far...

I'd like to see the view with a camera from higher up so I could see how my game would look with this system in place, any chance of putting a couple of extra key controls in to move the camera up and down please?

My worry is it looks fab whilst next to the ground, but in my game, I have lots of fields and I want to see how it looks from my players pov.

I would also need a lot small grass - my characters are farmland creatures.


IPete2.


Naughty Alien(Posted 2007) [#27]
..yup...as Ipete2 said..


Dreamora(Posted 2007) [#28]
Runs quite good here but I really dislike the demo.
Sorry but advertising a "cool grass system" with a view range of 200 units or the like so that at best 200-500 entities are in view?
Does not really make me believe in the system or see any potential above a good marketing coder.

As well there are some massive alpha and fog based errors. If you move forward directly from the start on the little hill to front-right and look forward you will see the outline of a far away part of the terrain but far from beeing visible.


If you could polish up the demo or at least make it a real demo (real view distance -> 1000 or more and some real sized grass instead of actively oversized grass to reduce the "I don't see anywhere" effect. The reduced grass size will also reduce the performance breakins on higher resolution as they might be caused by the massive overdraw you currently have due to large alpha surfaces) for what you advertise on the page ...
I would really like to see a more real demo than this "early beta tech test" demo like situation currently available, as I don't think that the system is really bad and needs this kind of demo.


SabataRH(Posted 2007) [#29]
Alien/Ipete - I posted a fov demo on the site at your request. this demo uses over 700k entities with nearly 5k viewable on screen ( or as Dreamora would say "200-250 entities )

Anyways, the alpha/fog error is due to the exported ALE terrain using a blending mode. Its not a gp coding error.

It's quite unrealistic to expect this much grass view out of any AAA 3dengine let alone pushing blitz3d to do it, but I feel this demo represents the best blitz3d can push, and its quite a good push at that.

labeled: Grassparty Stress Demo
http://www.gothasoft.com/Default.aspx?tabid=105


Dreamora(Posted 2007) [#30]
I don't expect any "push to the border scenario" from a Demo.
Most here already know to which borders B3D can be pushed if you sacrifice anything, which is what I see as main point of critism in the ant demo.

But the ant demo does not show any real / regular behavior of the system under normal usage, like fade in/out, wind with changing wind speeds and other things (like the per entity attributes, at least if I did not miss them).

At that view range you could potentially just forget about using a system and do a simple multi - linepick based grass placement around the camera, it would still be that fast if not even faster due to the massive overhead of handling the not used meshes which surely is a fair amount at setting 3.
Thats my main point of critism.
Sorry if I didn't highlight that enough.

Thus thank you for the "stress test demo", it shows the systems behavior far better than the original demo due to the fade in for example.

I get 20 - 30 FPS @ 1680x1050 on my 2x 3Ghz Core2Duo with 8800GTS on GTX frequency and 2GB RAM, which is quite good for that resolution and masses of grass (thats similar performance to the regular demo on setting 3)


IPete2(Posted 2007) [#31]
Swampdonkey,

2nd demo is a nice demo -

but I want camera control please - up and down is all - not too much to ask I hope...?

I'm not after fields and fields of large grass - I want small clumps here and there, with some larger areas too, but I want to see what they look like from a proper height and distance, which is quite hard to imagine from either demo (demos are nice though ;) )

The grass in the demos is too much 'in my face', if that makes any sense?

IPete2.


WedgeBob(Posted 2007) [#32]
This really meant to be an engine license for future games?


Beaker(Posted 2007) [#33]
It might be a false positive, but Spyware Doctor complains about both your demos being high-risk malicious virus code. Just thought you should know. Anyone else have this?


SabataRH(Posted 2007) [#34]
Hi,
Thanks for the comments.
The demo does not show spacious grass due to the fact that that's obvious. If a system can handle bulk it can obvisoly handle spacious. In the stress demo you can push right-shift to move the camera up for a birds eye view. I'll continue to improve the system none the less, as I do all my projects. All code is developed on a computer thats not connected to the internet, near impossible for it to have a virus. I wonder if spy dr complains due to the molebox compile? Interesting.

Dreamora, I see your point, well made. I'll compile a 3rd demo for a technical standpoint. Distance comparison, interaction comparison etc.. Should have it finished late night as I have a wedding to attend today.

For now the system is stable, runs high amounts of grass and fulfills my game-map needs for land covering. In the mean time i appreciate all comments on this system, good or bad as it helps me decide what direction to take the project for the future.


Dreamora(Posted 2007) [#35]
yeah spy dr and the german "antivirus" (free av / avira) have some serious problems with false reports on molebox and molebox pro applications and need a core engine fix to get this done.


Thank you for the answers and comments Swampdonkey.
Don't stress yourself to much, nothing creates worse software output than sleep shortage ... :)


IPete2(Posted 2007) [#36]
Swampdonkty,

There you go... that's what I wanted to see! Thanks for that info about the camera.

This looks very very good, nice work.

IPete2.


SabataRH(Posted 2007) [#37]
Try this one out, its probably more of the view your looking for.

version 1.1
http://www.gothasoft.com/Default.aspx?tabid=105


puki(Posted 2007) [#38]
Some people may have found the demos run slowly as the FPS in the code is set to 25 FPS.

I bought the full version and wacked it up to 60FPS and it is moving niceley (as are the ants - Larging about all over the place).


puki(Posted 2007) [#39]
Mixed with TreeParty, it is very lush - I'm getting much denser wooded areas than in Oblivion:



I've slightly lightened the image as it was a evening shot near a cottage in the woods and seems darker on some monitors.


Mr. Sandman(Posted 2007) [#40]
Itīs very nice effect, but i think itīs a little slowly, because it runs a little slow on my 7600GT at 1024x768

"Some people may have found the demos run slowly as the FPS in the code is set to 25 FPS."

In that case, why the demo itīs limited in FPS?, if you want the people buy your product, itīs better that run fast, i think, itīs my little opinion ;)


puki(Posted 2007) [#41]
I'm totally loving playing with GrassParty - it is straightforward to load in your own custom grass into the system (ie doesn't have to have the same mesh structure as the included grass) - you load the mesh and the texture separatley:




Naughty Alien(Posted 2007) [#42]
..Puki,is it possible to use billboards for grass units (No X planes)?


puki(Posted 2007) [#43]
Yeh, you can use whatever mesh you like. The one I pictured above has 40 faces (I double sided it for testing). You can use a flat billboard mesh. However, as far as I know, there is no built-in auto-rotation to face a flat mesh to the camera.


Naughty Alien(Posted 2007) [#44]
oh..i thought that billboards is not supported on that way...library is full B3D (no external DLL's) so maybe that feature for billboards can be easy added??