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 / Terrain Scale?

Author
Message
Tylerman35
15
Years of Service
User Offline
Joined: 23rd Jul 2009
Location:
Posted: 27th Sep 2009 17:51
How can I scale my terrain? it is too small here is my code...

dbLoadImage ( "map1.jpg", 1 );
dbLoadImage ( "detail.jpg", 2 );
dbSetupTerrain ( );
dbMakeObjectTerrain ( 1 );
dbSetTerrainHeightMap ( 1, "map1_HM8.bmp" );
dbSetTerrainScale ( 1, 2.0f, 0.6f, 2.0f );
dbSetTerrainLight ( 1, 1.0f, -0.25f, 0.0f, 1.0f, 1.0f,0.78f,0.5f );
dbSetTerrainTexture ( 1, 1, 2 );
dbBuildTerrain ( 1 );
tmd13
15
Years of Service
User Offline
Joined: 16th Sep 2009
Location:
Posted: 27th Sep 2009 18:31
You just need to change this values

dbSetTerrainScale ( 1, 2.0f, 0.6f, 2.0f );

this the way everything is set up

dbSetTerrainScale ( ID #, X, Y, Z );

just icrease the X and Z coordenates to make it larger, do not increase Y since you dont want your terrain to be too thick.
Isocadia
15
Years of Service
User Offline
Joined: 24th Jul 2009
Location:
Posted: 27th Sep 2009 18:47
set dbSetTerrainScale to ( 1, 3.0f, 0.9f, 3.0f ); And if its still not big enough just increase the last 3 numbers.

Isocadia
Serial Velocity
16
Years of Service
User Offline
Joined: 24th Aug 2008
Location:
Posted: 27th Sep 2009 20:08
I would personally do it like this:

float scaleWidth = 1.0f, scaleHeight = 0.3f, scaleDepth = 1.0f;
float terrainSize = 5.0f;
dbSetTerrainScale( 1, scaleWidth * terrainSize, scaleHeight * terrainSize, scaleDepth * terrainSize );

You change terrainSize to a bigger number to scale the whole thing with the same proportions.

Mista Wilson
16
Years of Service
User Offline
Joined: 27th Aug 2008
Location: Brisbane, Australia
Posted: 28th Sep 2009 03:28
Your heightmap will also affect your terrain size. GDK Advanced Terrains base their size before scaling off the heightmap resolutions. So, without any scaling, supplying a 128x128 heightmap will net you a smaller terrain than supplying a 512x512 heightmap.

Scaling will help, but be prepared to play around with the values to find the right scale for your project, also when you increase the X and Z size of the terrain, you will usually need to increase the Y height aswell, though not by the same degree as the X and Z, to keep the terrain looking the same, otherwise it will seem to "flatten" out as you increase it's X and Z scales.

If it ain't broke.... DONT FIX IT !!!

Login to post a reply

Server time is: 2024-10-01 14:40:37
Your offset time is: 2024-10-01 14:40:37