Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Game Design Theory / Grass building

Author
Message
Oneka
20
Years of Service
User Offline
Joined: 24th Apr 2004
Location: Hampton,VA
Posted: 9th Sep 2004 14:08
Ok here I want to ask
ok if I made grass like the picture below would this cause alot of strain on a CPU?


or I do patches of grass (well I know its not gonna use as much)


I wanna have alot of grass like the first picture becuase It looks better but just wonder for playability....


Making better games everday!
Oh yeah and just so you know its Oh-nek-a not One-ka!
Indian Homie G
20
Years of Service
User Offline
Joined: 23rd Jan 2004
Location: San Jose, CA
Posted: 9th Sep 2004 14:30
Yeah same I made a post about this in the DBP forum, problem is I dont even know how to make the grass... o__O

I want to have a lot of grass too problem is having a field of grass adds a LOT of polys..

AMD Athlon XP 3000+, S3 Deltachrome s8, 512 PC3200 RAM, 160 GB HD
Van B
Moderator
21
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 9th Sep 2004 18:41
Homie G, you could use patches of grass, like a mesh with lots of polygons textures with grass - then you re-use a big patch of grass, rather than hundreds of plains. That's how I'm doing it, my grass patches have about 60 plains, and you can instance your grass object to make it even faster. To mould onto terrain, you can rotate the object too.

I've went a step further and am using bones to affect the mesh too, like I can move the corners of my foliage mesh to blanket terrains. Doing this means you can't instance though - so it's not ideal.


Van-B


Muhahahahaha.
Indian Homie G
20
Years of Service
User Offline
Joined: 23rd Jan 2004
Location: San Jose, CA
Posted: 10th Sep 2004 08:24 Edited at: 10th Sep 2004 08:24
Thanks Van B, but i didnt really get what you meant by "re-use". Could you post a snippet of your grass function please? Thanks

Oh and also, I never really understood why you people are using plains? Why?

AMD Athlon XP 3000+, S3 Deltachrome s8, 512 PC3200 RAM, 160 GB HD
Manticore Night
20
Years of Service
User Offline
Joined: 23rd Oct 2003
Location: Ouinnipeg
Posted: 10th Sep 2004 08:31
To lower polycount.

It's amazing how much TV has raised us. (Bart Simpson)
Indian Homie G
20
Years of Service
User Offline
Joined: 23rd Jan 2004
Location: San Jose, CA
Posted: 10th Sep 2004 08:46
Yeah but how does using planes make grass

AMD Athlon XP 3000+, S3 Deltachrome s8, 512 PC3200 RAM, 160 GB HD
Manticore Night
20
Years of Service
User Offline
Joined: 23rd Oct 2003
Location: Ouinnipeg
Posted: 10th Sep 2004 09:02
You texture on a pic of grass, and POOF! your waling through a field of them. Noone spend that much time looking at the grass anyway, so you can get away with doing stuff halfassed.

It's amazing how much TV has raised us. (Bart Simpson)
Indian Homie G
20
Years of Service
User Offline
Joined: 23rd Jan 2004
Location: San Jose, CA
Posted: 10th Sep 2004 09:50
So you have to stack it up basically? I guess it would work, but dont get how it can even look at all like grass...

AMD Athlon XP 3000+, S3 Deltachrome s8, 512 PC3200 RAM, 160 GB HD
gothboy 101
19
Years of Service
User Offline
Joined: 31st May 2004
Location: Watonga, ok, usa
Posted: 10th Sep 2004 11:02
man oneka those look awsome how the heck did you make it?

www.dragonseige.150m.com
Indian Homie G
20
Years of Service
User Offline
Joined: 23rd Jan 2004
Location: San Jose, CA
Posted: 10th Sep 2004 11:20
He didnt make it...duh...why would he be asking...

He took screenies from a game..

AMD Athlon XP 3000+, S3 Deltachrome s8, 512 PC3200 RAM, 160 GB HD
Mind Storm 101
21
Years of Service
User Offline
Joined: 1st Dec 2002
Location: Excaping the Gates of Heaven
Posted: 10th Sep 2004 11:44
I might as well ask this: Its been on my mind for a while now, Im going to have to do a forest/jungle enviroment soon for my RPG, the camera in 3rd person view and I was wondering how I would go about creating a semi-convincing area (there will be paths so the player cant stray off into trouble), Mostly on how to render a dence amount of trees and other "junk" (rocks, bushes, ext) without prerendering everything. (It would be stupid to runinto a painted wall)

"Think what you like, You'll all be mine in the end."
-Click Me!
Indian Homie G
20
Years of Service
User Offline
Joined: 23rd Jan 2004
Location: San Jose, CA
Posted: 10th Sep 2004 11:51
Yeah... it's pretty tricky...not really sure. Can't buy TreeMagik either .

AMD Athlon XP 3000+, S3 Deltachrome s8, 512 PC3200 RAM, 160 GB HD
Manticore Night
20
Years of Service
User Offline
Joined: 23rd Oct 2003
Location: Ouinnipeg
Posted: 10th Sep 2004 15:02
I'm doing that for a forest in my game, what I'm doing is just making a bunch of object, just there(like in real life), but They're all EXTEMLY low-poly.

It's amazing how much TV has raised us. (Bart Simpson)
Indian Homie G
20
Years of Service
User Offline
Joined: 23rd Jan 2004
Location: San Jose, CA
Posted: 10th Sep 2004 15:05
Has it worked? can i see some code (pleeease )?

AMD Athlon XP 3000+, S3 Deltachrome s8, 512 PC3200 RAM, 160 GB HD
Manticore Night
20
Years of Service
User Offline
Joined: 23rd Oct 2003
Location: Ouinnipeg
Posted: 10th Sep 2004 15:41
Not really any complex code, just model something that has a polycont like 100 and something you could maybe get to 250 if you have some insanly good computer. You need something good to reduce your poly count. But I'm still trying to figure out how to reduce it even more.Beacause so far I have about 600 tree's(1/4 done) and it still runs good, havn't checked the FPS tho, but one thing I could tell you is that what I'm doing to lower all the polys beling calculated is, I've got a sphere inside out with a sky pic on it(DBC sky sphere) and anything out side of the sphere I make invisible(you can't see it anyway).

It's amazing how much TV has raised us. (Bart Simpson)
Mind Storm 101
21
Years of Service
User Offline
Joined: 1st Dec 2002
Location: Excaping the Gates of Heaven
Posted: 10th Sep 2004 16:13
Could you post a screen shots of what it looks like in game? I would love to see it.

"Think what you like, You'll all be mine in the end."
-Click Me!
RougeCat
19
Years of Service
User Offline
Joined: 13th Jul 2004
Location: Xdrome
Posted: 10th Sep 2004 16:38
Well I think what he does is use the set camera range() to just wrap the area until the sky limit. So as u move on in ur game the sky sphere or box moves with u making the world appear as u move. Pretty nifty work there. This is esp very helpful when u have a huge world with lots of poly. What it helps doin is just render the polys that r within the camera range so that u dont have to render the whole world thus lowering the FPS() in ur game. This method sure gives a great boost on ur FPS().

Well as to how it looks in games just visualise in real time. U walk to drive down a lane. When u look straight ahead U only get to c part of the world probably 100 to 200 meters ahead of u and the sky ofcourse. And as u keep walking down those areas which were not visible in ur previous steps come into view now. Get what I mean? This is something like similar.
ALPHA ZERO PRODUCTIONS
20
Years of Service
User Offline
Joined: 28th Sep 2003
Location: Mom ! I forgot where we live !
Posted: 10th Sep 2004 21:51
um....i think u could use matrix for grass

Van B
Moderator
21
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 10th Sep 2004 22:27
The grass in those screenshots probably use plains, or little meshes which might just be plains with kinks in them. The idea is you use a texture of a grass clump - and put a lot of plains down on the terrain, and with enough plains you have a pretty good grass field. You could store an array with all the locations of your grass, and load 20 or so grass patches, then position these at the points closest to the camera. Then when you move, different points are taken into the camera range and you re-use the grass objects. It would be advisable to spend time on the grass re-use system as that will greatly affect your frame rate, an indexed system works best, you don't really want to calculate the distances for each grass point, that would be a little slow.

Personally I'd use a big grid and an index saying which points were in each grid space, then you simply find the grid location your standing in and can get the surrounding locations and affect the grass that way. Tricky but nice and fast. You can use instanced objects too, with an instanced object, it's like a clone of an object, you can position and rotate and texture them, but they take their other settings from the parent object - the benefit is that instanced object display much quicker than loaded objects.

If you use fogging, then try and use it sparingly if it does'nt fit the scene. Like broad daylight, you don't want a severe fog and camera range, or the game ends up looking like a DBC matrix demo - I'd suggest forgetting about anything but sky on the skybox, a nice smooth fog effect, and a colour that matches your sky. With some care, you can get things looking nice and still run at decent frame rates.


Van-B


Muhahahahaha.
gothboy 101
19
Years of Service
User Offline
Joined: 31st May 2004
Location: Watonga, ok, usa
Posted: 11th Sep 2004 00:55
i'd go with the first one

www.dragonseige.150m.com
Indian Homie G
20
Years of Service
User Offline
Joined: 23rd Jan 2004
Location: San Jose, CA
Posted: 11th Sep 2004 12:43
wtf...i dont see a screenshot o__O

AMD Athlon XP 3000+, S3 Deltachrome s8, 512 PC3200 RAM, 160 GB HD
Manticore Night
20
Years of Service
User Offline
Joined: 23rd Oct 2003
Location: Ouinnipeg
Posted: 11th Sep 2004 13:20
@Mind Storm: This game is also going for an effect that will be screwed up if you see the parts bfore their done. As I said: the forest's only 1/4 done, so be patient and you'll get a demo too.

It's amazing how much TV has raised us. (Bart Simpson)
Indian Homie G
20
Years of Service
User Offline
Joined: 23rd Jan 2004
Location: San Jose, CA
Posted: 11th Sep 2004 14:39
DUDE...i dont see a screenshot...am I missing something here?

AMD Athlon XP 3000+, S3 Deltachrome s8, 512 PC3200 RAM, 160 GB HD
Manticore Night
20
Years of Service
User Offline
Joined: 23rd Oct 2003
Location: Ouinnipeg
Posted: 11th Sep 2004 14:55
There isn't one.

It's amazing how much TV has raised us. (Bart Simpson)
Indian Homie G
20
Years of Service
User Offline
Joined: 23rd Jan 2004
Location: San Jose, CA
Posted: 11th Sep 2004 15:05
OH LOL he was talking about those screenies he posted in the original post. Man I think soccer practice really got to me...

AMD Athlon XP 3000+, S3 Deltachrome s8, 512 PC3200 RAM, 160 GB HD
Indian Homie G
20
Years of Service
User Offline
Joined: 23rd Jan 2004
Location: San Jose, CA
Posted: 11th Sep 2004 15:13
Okay guys im really sort of lost here. I still dont really get how you make grass with planes. So lets say we a plane in 3d space.



Then say you textured it with a grass image:

(lol sorry that thing in the second was supposed to be like a pic of a clump of grass)

So what i dont get is how the image is mapped onto the plane, and actly supposed to look like grass...

Sorry if im missing something incredibly obvious, Im sort of braindead at the moment .

AMD Athlon XP 3000+, S3 Deltachrome s8, 512 PC3200 RAM, 160 GB HD
Indian Homie G
20
Years of Service
User Offline
Joined: 23rd Jan 2004
Location: San Jose, CA
Posted: 11th Sep 2004 15:31 Edited at: 11th Sep 2004 15:36
Ok so I tested out this grass idea, and I got absolutely nothing. Here's a pic of what I got.

http://rushil.dbspot.com/grass.JPG
[edit] crap dbspot is down i think, just go to rushil.dbspot.com then click on grass.jpg[/edit]

All I did was make a plain, and stick this texture on it: http://www.crocus.co.uk/graphics/features2/green_grass_blades.jpg

That's what it sounds like i should do... wtf

AMD Athlon XP 3000+, S3 Deltachrome s8, 512 PC3200 RAM, 160 GB HD
Cian Rice
19
Years of Service
User Offline
Joined: 8th Jun 2004
Location:
Posted: 12th Sep 2004 03:07
Ask Game Wiz, he has grass in Kill Stuff The Epic Killing Game or whatever it's called.

Got anime?I do.
Manticore Night
20
Years of Service
User Offline
Joined: 23rd Oct 2003
Location: Ouinnipeg
Posted: 12th Sep 2004 06:09
Ok, you have to make one part black(which becomes transparent), then set the transparancy on the plain to 1.

It's amazing how much TV has raised us. (Bart Simpson)
Indigo
21
Years of Service
User Offline
Joined: 9th Mar 2003
Location: United States
Posted: 12th Sep 2004 06:15
or you can set the alpha map with something similar to photoshop. save it as a png with transparencies and stuff and it should make it so you have more control on how the grass blends in with everything else in the game

Shoot for the moon. Even if you miss, you'll land amongst the stars.
Indian Homie G
20
Years of Service
User Offline
Joined: 23rd Jan 2004
Location: San Jose, CA
Posted: 12th Sep 2004 09:47
how do i set transparency on the plain? so like above the grass i should put black stuff?

AMD Athlon XP 3000+, S3 Deltachrome s8, 512 PC3200 RAM, 160 GB HD
NathanF
20
Years of Service
User Offline
Joined: 24th Mar 2004
Location:
Posted: 12th Sep 2004 10:12
SET OBJECT TRANSPARENCY ObjectNumber,1

-Formerly DarkSephiroth-
PiratSS
21
Years of Service
User Offline
Joined: 18th Oct 2002
Location:
Posted: 12th Sep 2004 11:43
Asheronscall 2 looks nice

Indian Homie G
20
Years of Service
User Offline
Joined: 23rd Jan 2004
Location: San Jose, CA
Posted: 12th Sep 2004 15:31
how does putting it transparent help? you mean making several layers of the same thing behind it? And across? How do you make a field for it?

Also, to elimiate the black part on the texture, do I use set image colorkey, to render the black as transparent?

Thanks

AMD Athlon XP 3000+, S3 Deltachrome s8, 512 PC3200 RAM, 160 GB HD
Indian Homie G
20
Years of Service
User Offline
Joined: 23rd Jan 2004
Location: San Jose, CA
Posted: 13th Sep 2004 03:50
Ok i set the image colorkey to 0,0,0, then put the plain as transparent, but i can still see the black. Help!

Thanks

AMD Athlon XP 3000+, S3 Deltachrome s8, 512 PC3200 RAM, 160 GB HD
Manticore Night
20
Years of Service
User Offline
Joined: 23rd Oct 2003
Location: Ouinnipeg
Posted: 13th Sep 2004 05:40
In DBC, use just use the Set object command: SET OBJECT Object Number, Wireframe, Transparency, Cull

It's amazing how much TV has raised us. (Bart Simpson)
Indian Homie G
20
Years of Service
User Offline
Joined: 23rd Jan 2004
Location: San Jose, CA
Posted: 13th Sep 2004 05:56
I just set the object transparent...shouldnt matter, set object is just for doing culling, transparency, etc, in one command (saves space).

AMD Athlon XP 3000+, S3 Deltachrome s8, 512 PC3200 RAM, 160 GB HD
Indian Homie G
20
Years of Service
User Offline
Joined: 23rd Jan 2004
Location: San Jose, CA
Posted: 13th Sep 2004 13:42
Ok i got the transparency down. But now, how to make a field?

(check my post in the DBP forum)

Thanks!

AMD Athlon XP 3000+, S3 Deltachrome s8, 512 PC3200 RAM, 160 GB HD
BearCDPOLD
20
Years of Service
User Offline
Joined: 16th Oct 2003
Location: AZ,USA
Posted: 17th Sep 2004 15:39
Basically, you have a bunch of plains, or something similar to plains (being relatively flat with low polys). Then you texture grass onto them. Place them in various locations around a field (either store locations or use collision to detect the ground). As the camera moves move the plains so that they are facing the camera always. Either use the make all the stuff except the grass black (or use transparency with .png) this will make the non-black areas of the texture invisible, giving the illusion that the grass is actually shaped like grass, whereas in reality it's just a picture pasted onto a flat, square plain, with part of the picture being invisible.

Many games (I'm talking retail) games use this effect. Look in Unreal, Halo, Warcraft, and plenty of RPGs.

Crazy Donut Productions, Current Project: Project Starbuks
Sony stole our name!
Indian Homie G
20
Years of Service
User Offline
Joined: 23rd Jan 2004
Location: San Jose, CA
Posted: 18th Sep 2004 13:25
Thanks for responding. Okay, but which way are the planes supposed to face? are they flat or upright? and do I texture the top? If its in front, do I just like make copies behind it? Thanks again!

AMD Athlon XP 3000+, S3 Deltachrome s8, 512 PC3200 RAM, 160 GB HD
Manticore Night
20
Years of Service
User Offline
Joined: 23rd Oct 2003
Location: Ouinnipeg
Posted: 18th Sep 2004 15:02
You make the plains always face the caracter.

It's amazing how much TV has raised us. (Bart Simpson)
Indian Homie G
20
Years of Service
User Offline
Joined: 23rd Jan 2004
Location: San Jose, CA
Posted: 18th Sep 2004 15:06 Edited at: 18th Sep 2004 15:18
OKay. so used a for next loop to create a bunch of planes (clone object off the main one) and it looks like a think plant (just a plant for now) I could probably add like a grass texture, but heres my problem. If the camera is like facing away, the the polygons become all wierd and... yeah. I tried setting cull to one, did nothing. Ill try to post some screenies in a while.

Here ya go:
[href]
rushil.dbspot.com/grass_cloned.jpg
[/href]

If you could take a look at this and help me tha'd be great. Thanks!

AMD Athlon XP 3000+, S3 Deltachrome s8, 512 PC3200 RAM, 160 GB HD
Manticore Night
20
Years of Service
User Offline
Joined: 23rd Oct 2003
Location: Ouinnipeg
Posted: 18th Sep 2004 16:09
That's beacause they're being looked at from the sides, you should rotate some of them.

It's amazing how much TV has raised us. (Bart Simpson)
Indian Homie G
20
Years of Service
User Offline
Joined: 23rd Jan 2004
Location: San Jose, CA
Posted: 19th Sep 2004 01:19
rotate them? Meaning they all shouldn't be facing one way?

AMD Athlon XP 3000+, S3 Deltachrome s8, 512 PC3200 RAM, 160 GB HD
Manticore Night
20
Years of Service
User Offline
Joined: 23rd Oct 2003
Location: Ouinnipeg
Posted: 19th Sep 2004 02:23
yep

It's amazing how much TV has raised us. (Bart Simpson)
Indian Homie G
20
Years of Service
User Offline
Joined: 23rd Jan 2004
Location: San Jose, CA
Posted: 19th Sep 2004 02:27 Edited at: 19th Sep 2004 02:35
should I only have them at 90 degree incrememnts (90 degrees, 180, etc) like all right angles, or arbritary rotations as well?

[edit] Okay I tried yrotate object rnd(360), and it looks a bit better, still some probs tho. Will post a screenie

[href]rushil.dbspot.com/grass_cloned.jpg[/href]

AMD Athlon XP 3000+, S3 Deltachrome s8, 512 PC3200 RAM, 160 GB HD
Manticore Night
20
Years of Service
User Offline
Joined: 23rd Oct 2003
Location: Ouinnipeg
Posted: 19th Sep 2004 02:46
The screenies the same, just randomly turn the grass, to give it a more natural look.

It's amazing how much TV has raised us. (Bart Simpson)
Indian Homie G
20
Years of Service
User Offline
Joined: 23rd Jan 2004
Location: San Jose, CA
Posted: 19th Sep 2004 02:59 Edited at: 19th Sep 2004 03:00
whoops. i meant:

rushil.dbspot.com/grass_rotate.jpg

see, some of them are sticking out, it looks a little wierd.

AMD Athlon XP 3000+, S3 Deltachrome s8, 512 PC3200 RAM, 160 GB HD
Manticore Night
20
Years of Service
User Offline
Joined: 23rd Oct 2003
Location: Ouinnipeg
Posted: 19th Sep 2004 06:46
Well, disperse them.

It's amazing how much TV has raised us. (Bart Simpson)
Indian Homie G
20
Years of Service
User Offline
Joined: 23rd Jan 2004
Location: San Jose, CA
Posted: 19th Sep 2004 09:02
Meaning...

AMD Athlon XP 3000+, S3 Deltachrome s8, 512 PC3200 RAM, 160 GB HD

Login to post a reply

Server time is: 2024-04-25 04:47:57
Your offset time is: 2024-04-25 04:47:57