Yet another demo :)

Hey Humus...

I've often wished for some 3D eyecandy to have on my desktop that doesn't consume tons of CPU resources...

What I'd like is some little program that draws to an off-screen buffer using as much hardware assist as possible, including vertex shaders etc, and then blows it up all over the desktop using the video overlay (smaller image = better framerates).

Not saying you should go make something like this, but it would be cool to know how CPU-independent a 3D program REALLY could be made. I DL:ed some crap called Desktop Dreamscapes; it consumed EVERY free cycle and even though it ran at idle priority it still made windows stutter. Looked pretty good, but it didn't seem to use any DX8 features.

So, can one make a 3D program that pretty much runs itself on the 3D card without a ton of CPU intervention (assuming no complex on-screen action of course, just some objects spinning around or whatever can be done via vertex shader programs), or does the driver make sure the CPU is hogged at near-100% at all times anyway?


*G*
 
Well, most of my demo apps hardly uses 5% of the available CPU power, they are almost only dependent on the graphic card. However, I still can't make them only utilize like 5% of the CPU power. The problem is a OS limitation, the task switch resolution is too low. Whenever you put your thread to sleep to avoid consuming unneccesary CPU cycles it wont wake up soon enough. If you draw a frame, call Sleep(), draw a frame, call Sleep() and so on, you'll get a framerate of just below 20, simply because task switching aint working faster than that, regardless of CPU. If you want more than 20 fps, you'll have to consume every available CPU cycle.
 
Animated "background" replacements.

If you're looking for interesting animated desktop replacements, try the few Winamp plugins that allow this. The built in Winamp Advanced Visualization Studio (AVS) not only includes desktop overlay features with customizable transparency color, but is also highly customizable in terms of what visuals it displays. There are a plethora of presets for it as well, all available on Winamp.com under plugins. There is also a fairly nice plugin for Winamp called Albedo that has a desktop overlay mode.

Frankly I'm surprised more people aren't utilizing this nifty feature. I know neither of these two I mention are 3D, so they're probably not quite what you're looking for, but they do make rather nice backdrops, and I find I can even work fairly effectively in a number of applications with them running. It's also quite fun to change your menu borders and window backgrounds to the transparent color of the overlay so that your windows essentially become "transparent" to the animated desktop. Not very functional, but cool looking none the less.

- JavaJones
 
Jones, thanks for the tips, and I already use one of them. But the problem is, it sucks too many CPU cycles. To get a decent framerate in AVS, I need to devote a third of my CPU to it, which isn't what I really want...
 
Yeah, anything you put back there is of course gonna take up fairly significant CPU cycles. I seem to recall Albedo being pretty reasonable however, though much less versatile than AVS. But both also seem to be semi-adaptable. If you're doing work on another app in focus, from watching my 2k task manager, the processor usage seems to be balanced between apps.

Anyways, I find I can still work fairly effectively in Photoshop, Cinema 4D, and other apps while this is running, if I so choose. Ultimately your best bet is to get a dual processor system and just assign the background to one processor and your apps to another though. ;-)

- JavaJones
 
Humus said:
Well, most of my demo apps hardly uses 5% of the available CPU power, they are almost only dependent on the graphic card. However, I still can't make them only utilize like 5% of the CPU power. The problem is a OS limitation, the task switch resolution is too low. Whenever you put your thread to sleep to avoid consuming unneccesary CPU cycles it wont wake up soon enough. If you draw a frame, call Sleep(), draw a frame, call Sleep() and so on, you'll get a framerate of just below 20, simply because task switching aint working faster than that, regardless of CPU. If you want more than 20 fps, you'll have to consume every available CPU cycle.
Very interresting information Humus.
Is it possible to change the OS task switch resolution?
Could we gain a lot of performance having a higher resolution?

Are the OSs like WinXP prepared for games and other realtime applications?
 
It's not possible for an application at least. Not sure if the OS can change it or if it's something hardwired into the PC archetecture that the timer in question should generate interrupts on this certain fixed frequency. I does look suspiciously close to the 18.7 or so ticks per second I learned about when dealing with time in QBasic in the early days. Haven't tried comparing with Linux, maybe I should do that some time.

Don't think we can gain a whole lot of performance by upping it though as most applications aren't especially dependent on the task switch resolution. Not sure what kind of answer you expected on the last question.
 
In one of the programs i'm writing while doing my Computer Science degree i am doing a OS (well, not completely, but something similar) and i can tell you i can change task switching resolution easily, i mean, i have a C function that programs how many clock interruptions i get per second, and task switching is done while resolving the interruption, so i can change the resolution.
Note that having a VERY low task swith resolution isn't good because you loose a lot of CPU cycles by the OS code.
 
I understand, but think about the possibility of do many things simultaneouslly include gaming. Some people have 2 GHz CPUs and in a few years 4 or 5 GHz.
Is it possible to do the same with WinXP? I mean any way available to the users?
 
Back
Top