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.

Dark GDK / Reallistic Terrain

Author
Message
Jna99
19
Years of Service
User Offline
Joined: 3rd Nov 2005
Location: Portugal
Posted: 8th Oct 2006 01:05
Hi I'm doing a game suposelly in a forest, problem is a need to add lots of grass and lots of trees...so you all can see the problem, this elements in this quantities are frame killers!!

What I want is strategies to combat this issues!!!

For instances one idea was to make an area around me where the trees and grass would appear intensilly, problem was with more distant places!!
PAGAN_old
18
Years of Service
User Offline
Joined: 28th Jan 2006
Location: Capital of the Evil Empire
Posted: 8th Oct 2006 08:14
lod distance or lod images i think they re called. much less detailed images/models. thats how a lot of games like yours do things.

dont hate people who rip you off,cheat and get away with it, learn from them
jinzai
18
Years of Service
User Offline
Joined: 19th Aug 2006
Location: USA
Posted: 8th Oct 2006 15:21
Also billboarding is used alot. Billboards are 2D images that always face the camera.
Jna99
19
Years of Service
User Offline
Joined: 3rd Nov 2005
Location: Portugal
Posted: 9th Oct 2006 01:33
problem was that I really wanna feel like I'm in a forest so I was looking foward to use 3d models, like the vegetation pack from freeworld...
Jna99
19
Years of Service
User Offline
Joined: 3rd Nov 2005
Location: Portugal
Posted: 9th Oct 2006 03:21
Jna99
19
Years of Service
User Offline
Joined: 3rd Nov 2005
Location: Portugal
Posted: 9th Oct 2006 23:20
hi again I have an ideia ..what about make the area arround me allways good quality (using meshes etc..)and for the distant views place textured planes of grass allways facing me..question is will this resolve the memory problem, will it have more or less impact in the frame rate? any other sugestions?
Cliff Mellangard 3DEGS
Developer
18
Years of Service
User Offline
Joined: 20th Feb 2006
Location: Sweden
Posted: 10th Oct 2006 00:30
iam using an master object of my grass that i then hide and have unchanged.
and then forward on so do i use the instancing command to clone the master one as the instanced copies can i scale in wich scale i want to get the illusion of various sizes of the grass instead of using multiple modells.
the instanced clones use alot less resources then ordinary modells.

here is the help text from dark basic pro that iam using as iam not as god programmer as you guys using c++.
but should work as well for c++ dark sdk.
-----------------------------------

This command will create an instance copy of the object. Unlike CLONE OBJECT, this instance will share
most of the original objects data and be dependent on the original object remaining in existence to hold
such data. Instanced objects do have the ability to hide/show both their limbs and hide/show the object,
independent of the original object. This command is ideally suited to copying large numbers of primarily
static objects such as trees and rocks where the original model data is to remaing largely unchanged.

-----------------------------------------------

and i hide the modells as fast as possible when they aint on screen.

i have only bin programming on and off with dark basic for aproximatly 2 years so my suggestion is probably stupid.
cheers
Jna99
19
Years of Service
User Offline
Joined: 3rd Nov 2005
Location: Portugal
Posted: 10th Oct 2006 03:08
Cliff Mellangard 3DEGS there are not stupid sugestions in life only good ones with no applyance loool...About your sugestion, is what I am using at the moment...problem is that my terrain is a bit large so having 60000 (I'm kidding) instance of an object may seem a bit memory consuming!
Cliff Mellangard 3DEGS
Developer
18
Years of Service
User Offline
Joined: 20th Feb 2006
Location: Sweden
Posted: 10th Oct 2006 18:55
you could probably include an distance calculation with vectors to get an distance to wich modells to hide and show as its fast.
as you then get the distance with the lenght of the vector?

dbp code
--------------------
Function Distance_XZ(Obj,targx#,targz#)
Set Vector3 5,object Position X(obj)-targx#,0,object Position Z(obj)-targz#
d#=Length Vector3(5)
Endfunction d#
---------------------


and i havent tested this yet but couldt you simply add some of the grass as limbs to an so called master mesh to decreace the length of the cycle to calculate wich modells to show or hide?
as with simply math would it decreace the cycle with 50% if you add every second object as an limb to another and so on?
iam also working alot with speed as iam working on an rts game with dbp.
but i can do simplier tricks as the player never see that much of the distance of the terrain.
i use alot of timed stuff for functions that aint neaded to be run in every cycle and it saved me alot of fps.
as the object culling on if objects where on screen or not did i run in an timed cycle after the fps.
i made an separate function like this for the trees and an separate for the grass that never was runed at the same time.
simply with an certain amount of cycles betwen them as the function to check if objects are on screen or not or in certain distance is hard on the cpu.
cheers
Jna99
19
Years of Service
User Offline
Joined: 3rd Nov 2005
Location: Portugal
Posted: 21st Oct 2006 20:16
Here is!! my solution was to make a area around me full with grass, then when I move, all the grass behind would be place in front or on my side! see the results...

Attachments

Login to view attachments
Miguel Melo
19
Years of Service
User Offline
Joined: 8th Aug 2005
Location:
Posted: 21st Oct 2006 20:23
<portuguese_interlude>
Está porreiro... agora so tens que melhorar aquele outline preto e talvez desenhar mais plantas até um bocadinho mais longe.

BTW, Jna99 é diminuitivo de... ?
</portuguese_interlude>

I have vague plans for World Domination
Jna99
19
Years of Service
User Offline
Joined: 3rd Nov 2005
Location: Portugal
Posted: 21st Oct 2006 20:32
<portuguese_interlude>
É de Joao, em relacao a relva tou a usar a do freeworld probl é que akilo ta em .tga e kndo converto pra .png fika com esse ouline a preto , em rel a desenhar longe em principio nao,tou a usar 16 objectos pra fazer a relva e axo k ja é demais ate pq isto é pra correr num pc que e nao é no meu Dual Core loool!!
<portuguese_interlude>

People probl2 about the trees should I make a "map" and when I got close the tree would simple show or use the GRASS strategy? Oh I forgot I'm only using 16 objects to do the grass...

Login to post a reply

Server time is: 2024-11-19 08:49:25
Your offset time is: 2024-11-19 08:49:25