Game Development Community

Corn Field Simulation

by Ed Weese · in Torque Game Engine · 10/13/2005 (4:41 pm) · 8 replies

Hello fellow developers. I am making a game using Torque. This game currently requires the use of a corn field or wheat field...anyway very tall things (and many of them) that the player can navigate around.

The trouble I am having is coming up with a good simulation of this that won't bog down the player's computer. I originally thought hey just model one stalk with as little tirangles as possible then replicate them...Trouble with that would require too much geometry for an entire field.

Then I was thinking of using billboards for each stalk. Problem with that is since billboards are always facing the player the effect could get annoying.

Another idea is to render different views (say 4 or so) of the stalk and texture 4 quads each with a different view then align the quads with each other and rotate around the middle axis so from the top they form a sort of star shape...Depending on how far the player is from the geometry, this could be scaled down to 3 then 2 then 1 billboarded quad....Maybe I shouldn't do a corn field..

Does anyone have any thoughts? Any ideas are appreciated.

-Ed

About the author

Recent Threads


#1
10/13/2005 (5:43 pm)
That last idea is how they usually do plants in games. Of course, to keep everything from looking the same, you'll want to have about 10+ types of corn stalks to randomly mix in to get away from the "cloned corn" feeling. I say give it a try and see how it looks.
#2
10/14/2005 (2:43 am)
What results do you get from the Foilage replicator?.. I would have thought that you'd get a fairly decent corn field with it... you can make the corn bend in the breeze too...
#3
10/14/2005 (6:36 am)
Do you mean like this:

http://www.garagegames.com/mg/snapshot/view.php?qid=282
#4
10/14/2005 (7:55 am)
@Ted - I'll try it out to see how it looks and 'feels'.

@Jason - I haven't tried using the foliage replicator just yet. The trick with the foliage replicator is I would need it to replicate in pretty striaght lines through the field. Because usually corn doesn't randomly grow in a planted field. I give it a go to see how it works.

@John - Something to that effect.

I'll give it a whirl and see what I can come up with. Thanks.

- Ed
#5
10/14/2005 (9:30 am)
Ed, you can add multiple replicators and alter their widths so you'll get lines.. only trouble is, it uses an elipse in the Editor, not tried this with anything like corn so I don't know if it'll look odd.. worth checking out for sure though.
#6
10/14/2005 (10:30 am)
I have a grass system in the works(I showed it off in a video slightly at IGC)
While the current setup is grass only, it could potentailly be expanded to do something like what you would want.

my .plan:
http://www.garagegames.com/blogs/37620/8964

It's still very much in development(the vid isnt it in Torque, but i have it in Torque now, and it's nearing completion faster and faster)
But depending on when you need your corn, this could pose a solution.

Just figured i'd post.
If you DO need polygonal corn stalks, i'd reccoemend Ben Garney's forest code pack. That dramatically boosts the performance when doing replication over large areas.

Just some suggestions.
#7
10/14/2005 (10:59 am)
Acually you should work from either the Grass sample or the Instancing sample in the Nvidia SDK.
#8
10/14/2005 (11:04 am)
That grass is pretty sweet. I may just want to grab that when it's done. As far as the corn is concerned, I'm going to try a couple different things to see which looks and performs better. I have a few more ideas myself on the whole controlled replication thing.

@Robert: I'll take a look at that tonight.

Thanks