Qbasicnews.com
May 27, 2018, 04:41:07 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Back to Qbasicnews.com | QB Online Help | FAQ | Chat | All Basic Code | QB Knowledge Base
 
   Home   Help Search Login Register  
Pages: [1] 2
  Print  
Author Topic: FreeBASIC Terrain Blender Engine with camera  (Read 6489 times)
relsoft
*/-\*
*****
Posts: 3927



WWW
« on: March 09, 2005, 04:11:11 AM »

Its a way to texture your terrains using an algo I learned from this:

http://www.flipcode.com/articles/article_terraintexture.shtml


Included also is the terrain_blender in SDL if you want to see how the algo works.

Source and Exes:

http://rel.betterwebber.com/junk.php?id=38

Controls:

WASD,MOUSE buttons and C.

Enjoy!!!
Logged

y smiley is 24 bit.


Genso's Junkyard:
http://rel.betterwebber.com/
Dr_Davenstein
Na_th_an
*****
Posts: 2052


« Reply #1 on: March 09, 2005, 04:35:34 AM »

Cool!!!!!
What kind of delay is in there? I was getting around 100 FPS.
:bounce:

Maybe I can learn from this... I'm still having trouble with pointers!  :oops:
Logged
relsoft
*/-\*
*****
Posts: 3927



WWW
« Reply #2 on: March 09, 2005, 04:49:22 AM »

There is no delay. :*(

It runs like 0.07 FPS on my sis' comp so I didn't put a delay.

Try to see if VA's are fastet that Display lists. Terrain static uses Display lists and terrain VA uses vertex arrays.  If didplay lists are as fast as VA's than you should use Display lists in your Engine as it's easier to convert it to DL's thans VA's.
Logged

y smiley is 24 bit.


Genso's Junkyard:
http://rel.betterwebber.com/
Dr_Davenstein
Na_th_an
*****
Posts: 2052


« Reply #3 on: March 09, 2005, 07:30:26 PM »

I'm re-writing most of it to use pointers anyway because I was wasting alot of memory in the way that the models were stored. I am planning to use display lists though. Wink

Maybe we should test the speed with a bigger model and large textures... Something with like 50,000 polys or more.
Logged
Rattrapmax6
__/--\__
*****
Posts: 2577



WWW
« Reply #4 on: March 09, 2005, 10:34:54 PM »

Smiley Okay, now your just showing off..

AKA, That was briliant!! :rotfl:
Logged

Kevin (x.t.r.GRAPHICS)

relsoft
*/-\*
*****
Posts: 3927



WWW
« Reply #5 on: March 10, 2005, 02:57:07 AM »

Don't worry, I've sent pete the 4 part first tute on OpenGL in FB. :*)
Logged

y smiley is 24 bit.


Genso's Junkyard:
http://rel.betterwebber.com/
KiZ
__/--\__
*****
Posts: 2879


WWW
« Reply #6 on: March 10, 2005, 07:13:34 AM »

nice!

the display listing version runs at 2000 fps!
vertex array at about 650 fps.

they dynamic one doesn't work.. it just switches display to 320x200, and doesnt respond, doesnt even go to a black screen.
Logged
relsoft
*/-\*
*****
Posts: 3927



WWW
« Reply #7 on: March 11, 2005, 04:12:52 AM »

Quote from: "dark_prevail"
nice!

the display listing version runs at 2000 fps!
vertex array at about 650 fps.

they dynamic one doesn't work.. it just switches display to 320x200, and doesnt respond, doesnt even go to a black screen.


Did you try to wait for a few more seconds? The heightmap in dynamic mode is calculated on load. Unlike the statics which use a BMP.  I didn't know VA's are slower than DL's. DL's are a lot easier to code as oppoed to VA's. But VA's could be directly converted to VBO's later which is by far the fastest of the 3 since it uses the GPU to store arrays.
Logged

y smiley is 24 bit.


Genso's Junkyard:
http://rel.betterwebber.com/
Rattrapmax6
__/--\__
*****
Posts: 2577



WWW
« Reply #8 on: March 11, 2005, 05:55:34 PM »

Quote from: "relsoft"
Don't worry, I've sent pete the 4 part first tute on OpenGL in FB. :*)


Cheesy Really,. can't wait, just hope my mouse works by then, heh, oh well...

Great demo, I got all of 'em to work.. 60 FPS tops tho, bottomed at 23FPS at one point. oh well, SpaceWarp runs at 60 FPS, isn't FB faster than QB? heh heh. :wink: just joking..
Logged

Kevin (x.t.r.GRAPHICS)

Dr_Davenstein
Na_th_an
*****
Posts: 2052


« Reply #9 on: March 11, 2005, 10:00:07 PM »

If you have a NVidia card, there is an option to disable vertical sync. Try disabling that and see if you get a higher frame rate.
Logged
ShadowWolf
Wandering Guru
***
Posts: 389



« Reply #10 on: March 11, 2005, 10:31:19 PM »

man rel so cool.  

i can't belive your able to do this stuff with the hardware you have to work with.

i mean .7 fps pretty much limmit what you can do in opengl just for the fact you could never easly debug a larg project.
Logged
v3cz0r
I hold this place together
*****
Posts: 924



WWW
« Reply #11 on: March 11, 2005, 10:55:04 PM »

I got over 400 fps here, with vsync off.

I used to get the same < 1 fps results on my old celeron 466 with an onboard gfx card 2 years ago, i gave up playing with opengl because of that -- Blitz was going to send me a tnt card that time, but he spent the money with beer and pizza, bastard! Rel, there is always a hope :/
Logged

relsoft
*/-\*
*****
Posts: 3927



WWW
« Reply #12 on: March 12, 2005, 08:04:13 AM »

Quote from: "v3cz0r"
I got over 400 fps here, with vsync off.

I used to get the same < 1 fps results on my old celeron 466 with an onboard gfx card 2 years ago, i gave up playing with opengl because of that -- Blitz was going to send me a tnt card that time, but he spent the money with beer and pizza, bastard! Rel, there is always a hope :/


LOL. Yes there is. Definitely. Cheesy

BTW, sent a Pete 4-part one issue tutorial for FB+SDL+OpenGL so Rattrapmax6.... Better brush up on your theories. Ie. Read this:
http://rel.betterwebber.com/junk.php?id=21

I believe the "doc" is hard at work on his Real game engine so better fasten your seatbelts :*)

Shadow: I try to do it first w/o textures. Just wireframe. That way I could get like 10 FPS and debug it all I want. Then add texturing and pray that it does not crash. :*)
Logged

y smiley is 24 bit.


Genso's Junkyard:
http://rel.betterwebber.com/
Rattrapmax6
__/--\__
*****
Posts: 2577



WWW
« Reply #13 on: March 12, 2005, 12:24:51 PM »

Quote from: "relsoft"
BTW, sent a Pete 4-part one issue tutorial for FB+SDL+OpenGL so Rattrapmax6.... Better brush up on your theories. Ie. Read this: http://rel.betterwebber.com/junk.php?id=21


Yeah, thanks, I like this setup alot better than the one on Pete's Tuts section.. I managed your First and 1/2 the second with the online 1, the math doesn't really bother me, heh, just the sorting systems, but I havn't had a much time to study it... :wink: .. Deff give these a good look over..
Logged

Kevin (x.t.r.GRAPHICS)

relsoft
*/-\*
*****
Posts: 3927



WWW
« Reply #14 on: March 12, 2005, 11:17:09 PM »

Forget the sorting system (GL has a depth-buffer for that). Also don't even bother reading the rasterizers(Tri fillers) as they are moot and academic.  What you  should tackle are just the theories, like. Rotation, translation, scaling, matrices, etc. and GL would be easier than QB.
Logged

y smiley is 24 bit.


Genso's Junkyard:
http://rel.betterwebber.com/
Pages: [1] 2
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!