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.

DarkBASIC Professional Discussion / AVI's - frame rate ridiculous - please help with another way of moving a water texture

Author
Message
Stevie
User Banned
Posted: 4th Aug 2004 23:13
Just been playing around with .AVI's to create the impression of moving water when it is texture to a plain object. Crazy.... The frame rate went down to as little as 15fps!!!! which is terrible.

I found though that it gave a very nice effect - cos i used texture maker to render a small avi of its movement. Is there any other way of doing this. For example where a player object can cycle through its animation frames - could a similar thing be done with the texture.

I have noticed that in texture maker rather than export as an avi - u can export as a BMP and produce all of the frames as individual bmps - is there a way of cycling through these - but saying that u can only load so many images?

Someone please guide me....

Steve
Kentaree
22
Years of Service
User Offline
Joined: 5th Oct 2002
Location: Clonmel, Ireland
Posted: 4th Aug 2004 23:19
Well, the animation will most likely repeat itself every so many frames, so you could load all the images individually. Then, using texture object objectNo, imageNo, and changing the image say every loop of every particular amount of time, you could animate it manually. I'm not sure how fast it would be though, only one way to find out

AMD Athlon XP2800+
GeForce FX5200 128MB
1024MB DDR 333MHz RAM
OSX Using Happy Dude
21
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 4th Aug 2004 23:19
Quote: "is there a way of cycling through these - but saying that u can only load so many images"

There isn't a routine to cycle through images as such - the easiest way would be to increment the image number by the computer speed and then texture the object.
Once the image number exceeded the maximimum for the animation you would then reset it.

That way you would get a constant speed for all computers.


Come to the UK Convention on the 23rd & 24th of October
David T
Retired Moderator
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: England
Posted: 4th Aug 2004 23:22
VamnB's operation invasion evasion includes a big set of water images - maybe you could use those?

Get 15 new commands, all the date / time commands left out of DBPro for free!
DOWNLOAD PLUGINS HERE: http://www.davidtattersall.me.uk/ and select "DarkBasic"
OSX Using Happy Dude
21
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 4th Aug 2004 23:23
In addition, the Caustic Generator program will also generate what you want.


Come to the UK Convention on the 23rd & 24th of October
Stevie
User Banned
Posted: 4th Aug 2004 23:27
Just looking at the bump map feature in texture maker - would i simply make a water bump map and then use the

SET BUMP MAPPING ON.... to put this bump map over my original water texture?/
Fallout
22
Years of Service
User Offline
Joined: 1st Sep 2002
Location: Basingstoke, England
Posted: 5th Aug 2004 03:10
Using bump mapping will give you another monsterous FPS drop on something as large as a water surface.

Stevie
User Banned
Posted: 5th Aug 2004 03:30
can someone please indicate how i use it to try it out - the water isnt that big anyway
Hamish McHaggis
22
Years of Service
User Offline
Joined: 13th Dec 2002
Location: Modgnik Detinu
Posted: 5th Aug 2004 03:33
Fallout - I used bumpmapping on a plane with texture frequency set to 100x100 (10000 repetitions), and the frame rate didn't drop at all.

Isn't it? Wasn't it? Marvellous!
Stevie
User Banned
Posted: 5th Aug 2004 03:40
Hamish - can u tell me how to use bumo mapping please?
Mentor
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: United Kingdom
Posted: 5th Aug 2004 04:08 Edited at: 5th Aug 2004 04:12
I made a simple shoot em up a while ago with loads of terrain objects textured with video clips and the framerate didn`t suffer at all, I don`t know how you managed to get down to 15fps but I suspect either code error or a bad video file (or an incredibly slow computer), this is a clip I just ran with three feature films used to texture 300 plains of random sizes that where revolving all the time, framerate was 56fps, ok! so thats over the top, but my PC spec is high, try this code (with some MPG video clips for example) and see what framerate you get.



Cheers.

Mentor.

PC1: P4 hyperthreading 3ghz, 1gig mem, 2x160gig hd`s, Nvidia FX5900 gfx, 6 way surround sound, PC2: AMD 1.2ghz, 512mb ram, FX5200 ultra gfx, stereo 16 bit soundblaster.
robert day
20
Years of Service
User Offline
Joined: 4th Aug 2004
Location:
Posted: 5th Aug 2004 04:28
check you texture the avi to image at the start or your code

dont do this:-

load animation "my anim.avi",1
play animation to image 1,1,0,0,128,128
do
texture object 1,1
sync
loop

texture the object once only at the start of your code or
you will get loads of slowdown.

hummmmm!
Stevie
User Banned
Posted: 5th Aug 2004 04:35
I now get 55 fps - is this adequate?????

Please can someone explain bump mapping as i have another idea for doing the water
robert day
20
Years of Service
User Offline
Joined: 4th Aug 2004
Location:
Posted: 5th Aug 2004 04:40
if you getting 55fps without bump mapping then bump mapping
will kill your gpu!!!

what sync rate are you using???

hummmmm!
Stevie
User Banned
Posted: 5th Aug 2004 04:47
0

I am using relection shading though - and get 250 fps when using this
so i think bump shading will be okay

Will someone please tell me how to use bunp mapping - when i use a bump map image and then put this onto my object - i see nothing on screen
that dude
21
Years of Service
User Offline
Joined: 1st Jan 2004
Location: USA
Posted: 5th Aug 2004 04:52
i know that we are past this, however, you could make two water objects, put them right over eachother, and slowly rotate them in opposite directions. it will look like the water is sparkling.

http://www.nuclearglory.com/?u=fearik = sweet as hell collision system. easy on that leather thing in your back pocket too.
the left side of my head isn't bigger, the right side is just smaller
robert day
20
Years of Service
User Offline
Joined: 4th Aug 2004
Location:
Posted: 5th Aug 2004 04:55
here`s a trick to boost your fsp into the 1000s

fskip=3
fs=0
do
rem -------- put your program code here

rem -----------------------------------
if fs>fskip : fs=0 : fastsync : endif
fs=fs+1
loop

add more to the fskip label till you get a good speed!!!

this works because the monitor refesh is taking over your cpu.

hummmmm!
Stevie
User Banned
Posted: 5th Aug 2004 04:59
To get the water to show it has depth - i believe u do it with bump mapping - please tell how to do>??? no one is answering any of my quetions on bump mapping
Mentor
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: United Kingdom
Posted: 5th Aug 2004 05:16
set bump mapping on object number,image number

see the example in the help files, basicaly the image number points to a greyscale image that indicates the height of the surface, the whiter the grey the higher the "bump" , I don`t know if you can use an animated file for the image though, but you could make the textured image very large and then move it in a direction to make it seem like the waves are moveing, but bumpmapping is supposed to eat CPU/GPU power, so it may make things even slower.

Mentor.

PC1: P4 hyperthreading 3ghz, 1gig mem, 2x160gig hd`s, Nvidia FX5900 gfx, 6 way surround sound, PC2: AMD 1.2ghz, 512mb ram, FX5200 ultra gfx, stereo 16 bit soundblaster.
Stevie
User Banned
Posted: 5th Aug 2004 05:20
which help files - i have searched here mate and i cant find

Thanks for your help
Lost in Thought
21
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 5th Aug 2004 05:32
Quote: "here`s a trick to boost your fsp into the 1000s

fskip=3
fs=0
do
rem -------- put your program code here

rem -----------------------------------
if fs>fskip : fs=0 : fastsync : endif
fs=fs+1
loop

add more to the fskip label till you get a good speed!!!

this works because the monitor refesh is taking over your cpu."

Keep in mind this will increase your loops per second and not your actual Screen frames per second. It will not draw to your screen until it hits a fastsync or sync command when you use sync on and sync rate.

Mentor
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: United Kingdom
Posted: 5th Aug 2004 06:00
type

set bump mapping on

into the ide and then press F1, you will get a description of the command, the examples are not that clever because they have the DB habit of trying to include a hundred or so commands in each example, but all you have to do is to load a texture for the bumpmapping and then set it on with the command, you can texture an object and then bumpmap it, despite your reflection shading getting high framrates I think you will find that like shadow shading, bumpmapping will kill your framerate heavily.

Mentor.

PC1: P4 hyperthreading 3ghz, 1gig mem, 2x160gig hd`s, Nvidia FX5900 gfx, 6 way surround sound, PC2: AMD 1.2ghz, 512mb ram, FX5200 ultra gfx, stereo 16 bit soundblaster.
Stevie
User Banned
Posted: 5th Aug 2004 06:03
So why are they included???????
Mentor
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: United Kingdom
Posted: 5th Aug 2004 06:15
cos they can, and one day 300ghz cpu`s with realtime raytracing GFX cards will be normal, and bumpmapping will be old hat and not affect the framerate at all, plus you can use them in less processor intensive games like puzzles etc to make the scenery look nice or your interface look like it realy is carved into weathered rock.

Mentor.

PC1: P4 hyperthreading 3ghz, 1gig mem, 2x160gig hd`s, Nvidia FX5900 gfx, 6 way surround sound, PC2: AMD 1.2ghz, 512mb ram, FX5200 ultra gfx, stereo 16 bit soundblaster.

Login to post a reply

Server time is: 2025-06-12 10:51:35
Your offset time is: 2025-06-12 10:51:35