Terrain won't show up

Everything related to 3D programming
User avatar
DK_PETER
Addict
Addict
Posts: 904
Joined: Sat Feb 19, 2011 10:06 am
Location: Denmark
Contact:

Re: Terrain won't show up

Post by DK_PETER »

Hi Alexi

CreateTerrain(-1, 500, 12000, 600, 1, *Scene\Name, "Data")
~ You've set entity number to -1, why?

Best regards
Peter
Current configurations:
Ubuntu 20.04/64 bit - Window 10 64 bit
Intel 6800K, GeForce Gtx 1060, 32 gb ram.
Amd Ryzen 9 5950X, GeForce 3070, 128 gb ram.
Fred
Administrator
Administrator
Posts: 18384
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: Terrain won't show up

Post by Fred »

Does the examples works ?
User avatar
DK_PETER
Addict
Addict
Posts: 904
Joined: Sat Feb 19, 2011 10:06 am
Location: Denmark
Contact:

Re: Terrain won't show up

Post by DK_PETER »

@Fred

Works fine here.. 5.20 LTS B13
Current configurations:
Ubuntu 20.04/64 bit - Window 10 64 bit
Intel 6800K, GeForce Gtx 1060, 32 gb ram.
Amd Ryzen 9 5950X, GeForce 3070, 128 gb ram.
Fred
Administrator
Administrator
Posts: 18384
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: Terrain won't show up

Post by Fred »

I mean for Alexi, here it works as well :)
User avatar
DK_PETER
Addict
Addict
Posts: 904
Joined: Sat Feb 19, 2011 10:06 am
Location: Denmark
Contact:

Re: Terrain won't show up

Post by DK_PETER »

@Fred
Ooooh, I knoooow..I just wouldn't want to be left out ;-D

No seriously....Alexi uses an entity number of '-1'.
Current configurations:
Ubuntu 20.04/64 bit - Window 10 64 bit
Intel 6800K, GeForce Gtx 1060, 32 gb ram.
Amd Ryzen 9 5950X, GeForce 3070, 128 gb ram.
Olby
Enthusiast
Enthusiast
Posts: 461
Joined: Mon Jan 12, 2009 10:33 am
Contact:

Re: Terrain won't show up

Post by Olby »

DK_PETER wrote:@Fred
Ooooh, I knoooow..I just wouldn't want to be left out ;-D

No seriously....Alexi uses an entity number of '-1'.

Code: Select all

Debug #PB_Any
Is -1 ;)
Intel Core i7 Quad 2.3 Ghz, 8GB RAM, GeForce GT 630M 2GB, Windows 10 (x64)
User avatar
DK_PETER
Addict
Addict
Posts: 904
Joined: Sat Feb 19, 2011 10:06 am
Location: Denmark
Contact:

Re: Terrain won't show up

Post by DK_PETER »

Code: Select all

Debug #PB_Any
Hehe..I know Olby.. But putting '-1' in Createterrain() won't work.

Edit: Actually..It should work...Weird.. :shock:
Current configurations:
Ubuntu 20.04/64 bit - Window 10 64 bit
Intel 6800K, GeForce Gtx 1060, 32 gb ram.
Amd Ryzen 9 5950X, GeForce 3070, 128 gb ram.
Olby
Enthusiast
Enthusiast
Posts: 461
Joined: Mon Jan 12, 2009 10:33 am
Contact:

Re: Terrain won't show up

Post by Olby »

DK_PETER wrote:

Code: Select all

Debug #PB_Any
Hehe..I know Olby.. But putting '-1' in Createterrain() won't work.
#Terrain - The number to identify the new terrain. #PB_Any can be used to auto-generate this number.
Edit: Like you've just realised, it should work.
Intel Core i7 Quad 2.3 Ghz, 8GB RAM, GeForce GT 630M 2GB, Windows 10 (x64)
User avatar
DK_PETER
Addict
Addict
Posts: 904
Joined: Sat Feb 19, 2011 10:06 am
Location: Denmark
Contact:

Re: Terrain won't show up

Post by DK_PETER »

@Olby..
I totally agree. I've just read it too. PB 5.20 LTS 13.
Duh!!! BuildTerrain(Bob) <--- My mistake..Wong number! :oops:
Damn..That's embarassing.
Last edited by DK_PETER on Wed Aug 28, 2013 8:09 pm, edited 2 times in total.
Current configurations:
Ubuntu 20.04/64 bit - Window 10 64 bit
Intel 6800K, GeForce Gtx 1060, 32 gb ram.
Amd Ryzen 9 5950X, GeForce 3070, 128 gb ram.
Olby
Enthusiast
Enthusiast
Posts: 461
Joined: Mon Jan 12, 2009 10:33 am
Contact:

Re: Terrain won't show up

Post by Olby »

Alexi wrote:Seems like i fixed it. Don't use #PB_Terrain_Lightmap, maybe it's not freezing, but i don't want to wait 5 hours for a test run. And that's all. I simply use either #PB_Terrain_Lightmap or #PB_Terrain_NormalMap (#Null), but #PB_Terrain_NormalMap seems to work at a passable Speed.

And "Size" in CreateTerrain() must be equal the Heigthmap you are using. I simply use most common sizes like 64, 128, 512 + 1 Pixel. (65, 129, 513)
Once a terrain is generated and stored on disk it will try to reload it next time when you call createterrain using the same terrain file name. This way you will need to wait 5 hours only once. :lol:
Intel Core i7 Quad 2.3 Ghz, 8GB RAM, GeForce GT 630M 2GB, Windows 10 (x64)
User avatar
Bananenfreak
Enthusiast
Enthusiast
Posts: 519
Joined: Mon Apr 15, 2013 12:22 pm

Re: Terrain won't show up

Post by Bananenfreak »

I´ve programmed an Antifreezeloop

Try this, if you´re using WindowedScreen. If you´re using a Screen, edit it and post it for me :) :

Code: Select all

For terrainX = 0 To weltGroesse -1
        For terrainY = 0 To weltGroesse -1
          DefineTerrainTile(terrain, terrainX, terrainY, "heightmap.png", #False, #False)
          BuildTerrain(terrain)
          SaveTerrain(terrain, #True)
          SetGadgetState(#Progress_Laden_0, GetGadgetState(#Progress_Laden_0) + 1)
          Repeat
            SetActiveWindow(#Window_Laden)
          Until WindowEvent() = 0
        Next
      Next
There is only a Problem with the Windows Task-Manager. If I call it, it displays, that my program no longer works Oo
Image
Post Reply