Page 1 of 1

Newbie Terrain Questions

Posted: Thu Apr 18, 2013 12:59 pm
by Skitted
Hello,

Question 1:

I am fairly new to this forum and to Purebasic 3D. Now I started to programm my own Terrain to walk around in, i use a Skybox and 2x2 Terrain Tiles. The Skybox shows a placeholder of a grid currently on all 6 sides...

Once I move the camera higher and higher over the Terrain, I realise that actually not the camera is moved, but rather the whole Terrain moves underneath the camera. I realize that because the Terrain edges move relative to the Skybox Side Grid...

This seems to be a mistake to me. I have the same result in using Relative Camera movement and the same thing happens once I move sideways with the camera.

Since this is not realistic, how can I really move the camera instead of having the whole world move within the Skybox ?

Question 2:

I used a Terrain Texture and a high map before the Update of PB to use DDS Files...is there a easy way to continue using only Texture and Heigth-Map or a easy way to convert them to DDS files with empty alpha channel ?

I hope this makes sense to someone :)

Kind regards,
Skitted and hello to everyone as this is my first post :)

Re: Newbie Terrain Questions

Posted: Thu Apr 18, 2013 1:13 pm
by Danilo
Hello and welcome Skitted!
Skitted wrote:Question 1:
[...]
Since this is not realistic, how can I really move the camera instead of having the whole world move within the Skybox ?
Create and use your own Skybox replacement? I think what you describe is because a skybox and skydome
are fixed to the camera.

Skydome and Skybox are fake:
http://en.wikipedia.org/wiki/Skybox_(video_games)
As a viewer moves through a 3D scene, it is common for the skybox to remain stationary with respect to the viewer.
This technique gives the skybox the illusion of being very far away since other objects in the scene appear to move, while the skybox does not.
This imitates real life, where distant objects such as clouds, stars and even mountains appear to be stationary when the viewpoint is displaced by relatively small distances.

Re: Newbie Terrain Questions

Posted: Fri Apr 19, 2013 10:04 am
by Skitted
Danilo wrote: Create and use your own Skybox replacement? I think what you describe is because a skybox and skydome
are fixed to the camera.
Thank you for your answer. Does that mean I would need to produce 6 individual surfaces with textures and assemble them to a box (my own skybox) or is there the possibility to use a Cube/Box Mesh and move the camera into it looking at the walls from inside ?

Regardind the DDS file I am still struggling, maybe its an option for me to just go back to an earlier purebasic version, where the surface just consisted of texture and highmap...:(

Kind regards,
Skitted

Re: Newbie Terrain Questions

Posted: Fri Apr 19, 2013 3:35 pm
by Comtois
You can create terrain without DDS file.

see this example :
http://www.purebasic.fr/english/viewtop ... 36&t=51883

And you can use your texture like this :

Code: Select all

AddTerrainTexture(0,  0, 257, "terrain_texture.jpg",  "")