Main Menu

Texture Mapped Terrain

Started by kevin, August 19, 2006, 09:02:43 AM

Previous topic - Next topic

kevin

  Textured Face Terrain (old school 3D in PlayBasic)

 This demo creates a Textured 3D polygon landscape using mesh & rotation commands found in PlayBasic.
 

 Controls:

   Space Bar= Create a new terrain

   Up Arrow = Move Camera Forward
   Down Arrow = Move Camera Back
   
   Mouse = Mouse Look


  Download

  Download Demo (Exe) (login required)

  Get Source Code from the PlayBasic Code Tank (login required)
 

hatonastick

Hmm I get a couple of errors when I try to compile this with PlayBASIC 1.46.
Line 639, error number 415.  Expecting user defined function.
ProjectionX#,ProjectionY#   =GetVertexObjectProjection(CameraObject)
Matthew 5:14-16

kevin

#2
 The code required requires PlayBASICv1.47  (look in the maintainence forum it was released today/yesterday )

The update/patch thread can be found here. Get  Retail Patches (login required)

Note: - It Might be an idea to install  update PlayBASIC V147 and PlayBASIC V147b   As the former has some doc updates.




hatonastick

#3
Whoops I had installed 1.47b first.  Easy fixed though.  Will try it again - looks very interesting!

Yup it works fine now.  Nice job!  So when can I start working on a remake of Magic Carpet?  ;D J/k.
Matthew 5:14-16

kevin

  Textured Terrain Update in  PB1.65

You may or may not be aware that PB1.64 and above now have hardware 3d acceleration.   This piccy shows the original Texture Terrain example (from the PB demo) running in the new version with a couple of small changes.   

1) The texture is loaded and cut up as 3D images rather than FX images
2) The mesh builder routine assigns alpha 50 draw mode to all polygons.  So all tri's are alpha'd to the display   

  Unlike a normal hardware 3d engine, this demo is rendering every triangle to the screen + off screen as separate draw calls (not one draw call!).   This combined with the separation of the terrain texture into many small separate textures,  is a real no no 3D acceleration terms.

But anyway, it still runs nice enough to the get the idea :)
 

Draco9898

that's really neat...got an executable of it? I want to see the frames per second.

cant wait to play with this stuff :)
DualCore Intel Core 2 processor @ 2.3 ghz, Geforce 8600 GT (latest forceware drivers), 2 gigs of ram, WIN XP home edition sp2, FireFox 2.

"You'll no doubt be horrified to discover that PlayBasic is a Programming Language." -Kevin