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.

Newcomers DBPro Corner / Terrain Code Problems

Author
Message
Black Angel
17
Years of Service
User Offline
Joined: 20th Apr 2007
Location:
Posted: 29th Apr 2007 22:32
I have attached a sample terrain demo for testing.
I have trouble with the camera and mouse movements, and also have trouble with the detail texture. It seems the terrain dosent use it to texture it ... any ideeas?

Attachments

Login to view attachments
Scorpyo
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: italy
Posted: 29th Apr 2007 22:52
you're a bit off with the scaling and distance from ground, everything is a bit too much strectched.
try this edit of your code:
Black Angel
17
Years of Service
User Offline
Joined: 20th Apr 2007
Location:
Posted: 29th Apr 2007 23:15
How did you judged the correct scaling and tiling values?
Scorpyo
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: italy
Posted: 29th Apr 2007 23:47
you have to consider this:

1 - terrain texture map
the texture map is applied 1:1 on top of the terrain and stretched according to the scaling (the scaling is given by the heightmap size x scale factor; in your case it was 256 x 100 = 25600 DBP units)
Now that is like putting your 256x texture in a 2d photo editor and resize it to 25600x. you can easily figure that out.

2 - detail texture

The detail texture number in the command ( 4 in your code) determines how many terrain splits at once it will cover ( the terrain is 16 splits in your case).
Now you have: 256(heigtmap)x100(scaling)=25600x DBP units terrain divided in 16 splits = 1200 DBP units each
you tiling calls for 4 splitsx1200=6400 units for the detail to cover
again it's like resizing your 512x detail.tga to 6400x

You can understand that things can easily get overstretched and blurred if the sizes and the scaling are not thought out carefully
Black Angel
17
Years of Service
User Offline
Joined: 20th Apr 2007
Location:
Posted: 30th Apr 2007 15:22
What is culling more exactly?
Is it something tied to the unendlessness of the terrain?
Scorpyo
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: italy
Posted: 1st May 2007 11:35
culling refers to exclude objects (or limbs/splits in case of advanvnced terrain) from the rendering pipeline in order to gain speed.

it also refer to exclude the not visible faces of an object from rendering.

for instance a DBP primitive is automatically culled i.e. internal faces are not rendered by default.
make a DBP cube big enough and go inside it with your camera and you will see it disappear.

set object cull objnum,cullflag is the command for manipulating this feature.
Black Angel
17
Years of Service
User Offline
Joined: 20th Apr 2007
Location:
Posted: 1st May 2007 21:10
And the "neverending" feel and unlimited terrain feel how can be controlled?

Login to post a reply

Server time is: 2024-11-25 19:54:54
Your offset time is: 2024-11-25 19:54:54