Show us yer programming projects!

Coders forum. Discuss techniques, swap code snippets, ask for help etc. relating to all forms of software development.
Post Reply
User avatar
Dvorak
Baaaaaa!
Baaaaaa!
Posts: 4560
Joined: Wed May 08, 2002 7:37 am 0
Yahoo Messenger: d3dxquaternion
Location: Germany

Post by Dvorak »

GoatFoam wrote:Are you requesting samples asynchronously or calling the ray tracer from the controller and waiting for results?
Synchronously.
Since my sampler (including controller and raytracer) is running on a single CPU there wouldn't be any benefit of an asynchrous data flow. Or would there be?
Are you thinking of a distributed system? :)
>take off sunglasses
Seamen and fishermen alike swear to have heard voices in the rising tide. Inhuman screams, some of them say.
User avatar
Orangy Tang
Baaaaa!
Baaaaa!
Posts: 1794
Joined: Sun Apr 25, 2004 5:25 pm 0
Location: My secret lab
Contact:

Post by Orangy Tang »

The Caffeine Kid wrote:Anyone remember Super Obliteration on the Amiga? It was a PD game that appeared on a coverdisk.

I'm giving it a PC update and engine is pretty much completed. :)

Vid: http://www.youtube.com/watch?v=aqaDyqE4ZrM

Gotta go all the levels, then proper player death, menus, etc - all the boring stuff now. ;)
Look neat. :D How are you capturing the video btw? Last time I tried using Fraps I ended up running at about a frame a second, not sure if thats because of my hardware (AGP) or whether theres some trick to it...
[ Triangular Pixels.net - play Snowman Village, Rescue Squad, NiGHTS 4k and more ] [ Development Journal ]
User avatar
GoatFoam
Baaaaa!
Baaaaa!
Posts: 1255
Joined: Tue Dec 12, 2006 11:05 am 0
Location: Brizzle
Contact:

Post by GoatFoam »

Dvorak wrote:
GoatFoam wrote:Are you requesting samples asynchronously or calling the ray tracer from the controller and waiting for results?
Are you thinking of a distributed system? :)
Might be....

There is also the issue of interactivity, which may help even on a single CPU.

My thinking is that you could structure the system thusly:

reconstructor + UI <-> sample_farmer <-> ray tracer(s).

So the reconstructor runs in 1 thread, the sample_farmer runs in another.

The interface between the sample_farmer and the reconstructor could be as simple as 2 thread safe queues and a query function.

So the reconstructor queries the farmer and asks it how much work it can take on. It then prepares some jobs (presumably a number of rays per job) and pushes them to the sample farmer. Samples come back on the other queue when they are finished.

I'm thinking that a job would have to consist of a set of ray definitions and a time stamp so the reconstructor can put them in the right place in the deep buffer.

That way you keep things running smoothly even on slow processors, because the ray tracer doesn't request any more work than it can actually do, and you can scale it to any number of cpus or a distributed system by rewriting the back end of the sample farmer.

It might even be better to have the sample farmer object explicitly demand work from the reconstructor. If I remember correctly it is a matter of randomly sampling your kd tree or quadtree, so there is no problem with asking for a number of samples at once.
User avatar
Dvorak
Baaaaaa!
Baaaaaa!
Posts: 4560
Joined: Wed May 08, 2002 7:37 am 0
Yahoo Messenger: d3dxquaternion
Location: Germany

Post by Dvorak »

GoatFoam wrote:Might be....

There is also the issue of interactivity, which may help even on a single CPU.

My thinking is that you could structure the system thusly:

reconstructor + UI <-> sample_farmer <-> ray tracer(s).

So the reconstructor runs in 1 thread, the sample_farmer runs in another.

The interface between the sample_farmer and the reconstructor could be as simple as 2 thread safe queues and a query function.

So the reconstructor queries the farmer and asks it how much work it can take on. It then prepares some jobs (presumably a number of rays per job) and pushes them to the sample farmer. Samples come back on the other queue when they are finished.

I'm thinking that a job would have to consist of a set of ray definitions and a time stamp so the reconstructor can put them in the right place in the deep buffer.

That way you keep things running smoothly even on slow processors, because the ray tracer doesn't request any more work than it can actually do, and you can scale it to any number of cpus or a distributed system by rewriting the back end of the sample farmer.
Ah! Now I understand! Of course!
Right now I split the workload pretty arbitrarily (and fixed) between sampler and reconstructor - in the hope that both workloads will be of approximately equal size. But that was just an ad hoc assumption and will vary on different CPU/graphic cards combinations and in different scene situations. So a way of synchronising them would result in avoiding unnecessary idle time.
GoatFoam wrote:It might even be better to have the sample farmer object explicitly demand work from the reconstructor. If I remember correctly it is a matter of randomly sampling your kd tree or quadtree, so there is no problem with asking for a number of samples at once.
Indeed. Framless rendering is full of possibilities for controlling individual components dynamically as it seems. Wasn't clear to me until I started coding this machine - and I'm far from having understood all the implications.
>take off sunglasses
Seamen and fishermen alike swear to have heard voices in the rising tide. Inhuman screams, some of them say.
User avatar
moosedude
Baaaaaaa!
Baaaaaaa!
Posts: 6209
Joined: Fri Nov 19, 2004 1:19 pm 0
Location: Craggy Island
Contact:

Post by moosedude »

Dvorak wrote:
GoatFoam wrote:Are you requesting samples asynchronously or calling the ray tracer from the controller and waiting for results?
Synchronously.
Since my sampler (including controller and raytracer) is running on a single CPU there wouldn't be any benefit of an asynchrous data flow. Or would there be?
Are you thinking of a distributed system? :)
Lots of modern graphics hardware divide the screen up into equal portions of rendering, there are lots of things you can do to speed the parallel side of things up (do it!) Multi-Threaded on a quad core perhaps, or moving some code into pixel shader territory ;-)

Sounds like you have the correct sort of architecture to build a render farm, divide the render area into portions, assign each computer a portion to render, and reconstruct at the master control.

Your work is an interesting read, please do keeping posting, I was wondering what had happened to your 3d rendering work. I've never heard of the technique you are using now, clever stuff.

01000101 01000100 01000111 01000101

http://www.redbubble.com/people/fotofill/ buy my photos!
User avatar
The Caffeine Kid
Baaaaaaa!
Baaaaaaa!
Posts: 5691
Joined: Mon Mar 01, 2004 9:24 pm 0
XBL Gamertag: TheCaffeineKid
PSN: caffeinekid
Yahoo Messenger: caffeinekid
Location: Wakefield
Contact:

Post by The Caffeine Kid »

Orangy Tang wrote:
The Caffeine Kid wrote:Anyone remember Super Obliteration on the Amiga? It was a PD game that appeared on a coverdisk.

I'm giving it a PC update and engine is pretty much completed. :)

Vid: http://www.youtube.com/watch?v=aqaDyqE4ZrM

Gotta go all the levels, then proper player death, menus, etc - all the boring stuff now. ;)
Look neat. :D How are you capturing the video btw? Last time I tried using Fraps I ended up running at about a frame a second, not sure if thats because of my hardware (AGP) or whether theres some trick to it...
I'm using FRAPS yeah and not had that problem...? Ummm...

I just pressed the key to grab and played normally.
Life... Don't talk to me about life...

http://www.tcksoft.co.uk
http://www.retroremakes.com
User avatar
Orangy Tang
Baaaaa!
Baaaaa!
Posts: 1794
Joined: Sun Apr 25, 2004 5:25 pm 0
Location: My secret lab
Contact:

Post by Orangy Tang »

I'm guessing it's my hardware then, are you on PCI-Express or AGP?
[ Triangular Pixels.net - play Snowman Village, Rescue Squad, NiGHTS 4k and more ] [ Development Journal ]
User avatar
evilpaul
Baaaa!
Baaaa!
Posts: 811
Joined: Wed Sep 29, 2004 2:01 pm 0
Location: #ukscene, helsinki branch
Contact:

Post by evilpaul »

has anyone tried .kkapture from those k-razy farbrausch guys for taking videos of games?

http://www.farbrausch.de/~fg/kkapture/

as the site itself says:
.kkapture is a small tool that produces video+audio captures of fullscreen apps (usually demos). unlike fraps, it does not run in realtime; instead, it makes the demos run at a given, fixed framerate you can specify beforehand. in other words, .kkapture can make 60fps video captures of any demo your computer can run, even if each frame takes several seconds to render.
it's intended for demos so it may not be great for interactive programs but you could, you know, always record a demo of the gameplay :)
User avatar
GoatFoam
Baaaaa!
Baaaaa!
Posts: 1255
Joined: Tue Dec 12, 2006 11:05 am 0
Location: Brizzle
Contact:

Post by GoatFoam »

Ther problem I haver is that nothing can capture at a decent speed from my laptop, so I can't show off any videos of work in progress unless I buy a new machine.

Now theres a thought :)
User avatar
Orangy Tang
Baaaaa!
Baaaaa!
Posts: 1794
Joined: Sun Apr 25, 2004 5:25 pm 0
Location: My secret lab
Contact:

Post by Orangy Tang »

evilpaul wrote:has anyone tried .kkapture from those k-razy farbrausch guys for taking videos of games?

http://www.farbrausch.de/~fg/kkapture/

as the site itself says:
.kkapture is a small tool that produces video+audio captures of fullscreen apps (usually demos). unlike fraps, it does not run in realtime; instead, it makes the demos run at a given, fixed framerate you can specify beforehand. in other words, .kkapture can make 60fps video captures of any demo your computer can run, even if each frame takes several seconds to render.
it's intended for demos so it may not be great for interactive programs but you could, you know, always record a demo of the gameplay :)
Oooo, now that looks more like it. I'm going to have to give that a try...
[ Triangular Pixels.net - play Snowman Village, Rescue Squad, NiGHTS 4k and more ] [ Development Journal ]
User avatar
fog
Baaaaaaa!
Baaaaaaa!
Posts: 6022
Joined: Sun Jan 30, 2005 1:08 pm 0
XBL Gamertag: Dense Fog
PSN: DenseFog
Location: Newcastle, England
Contact:

Post by fog »

Orangy Tang wrote:
evilpaul wrote:has anyone tried .kkapture from those k-razy farbrausch guys for taking videos of games?

http://www.farbrausch.de/~fg/kkapture/

as the site itself says:
.kkapture is a small tool that produces video+audio captures of fullscreen apps (usually demos). unlike fraps, it does not run in realtime; instead, it makes the demos run at a given, fixed framerate you can specify beforehand. in other words, .kkapture can make 60fps video captures of any demo your computer can run, even if each frame takes several seconds to render.
it's intended for demos so it may not be great for interactive programs but you could, you know, always record a demo of the gameplay :)
Oooo, now that looks more like it. I'm going to have to give that a try...
I'm going to try that now too. Cheers evilpaul.
User avatar
fog
Baaaaaaa!
Baaaaaaa!
Posts: 6022
Joined: Sun Jan 30, 2005 1:08 pm 0
XBL Gamertag: Dense Fog
PSN: DenseFog
Location: Newcastle, England
Contact:

Post by fog »

fog wrote:
Orangy Tang wrote:
evilpaul wrote:has anyone tried .kkapture from those k-razy farbrausch guys for taking videos of games?

http://www.farbrausch.de/~fg/kkapture/

as the site itself says:
.kkapture is a small tool that produces video+audio captures of fullscreen apps (usually demos). unlike fraps, it does not run in realtime; instead, it makes the demos run at a given, fixed framerate you can specify beforehand. in other words, .kkapture can make 60fps video captures of any demo your computer can run, even if each frame takes several seconds to render.
it's intended for demos so it may not be great for interactive programs but you could, you know, always record a demo of the gameplay :)
Oooo, now that looks more like it. I'm going to have to give that a try...
I'm going to try that now too. Cheers evilpaul.
Hmm. Tried to use it on a few different games and just get a black screen. Back to Fraps.
User avatar
Kenshi
Baa!
Baa!
Posts: 29
Joined: Sun Jun 30, 2002 4:29 pm 0

Post by Kenshi »

Well, its no where near as cool as some of the stuff on this thread, but I just finished up a Ruby on Rails project at: http://eyeitup.net

Its like reddit but for images - check it out.

I'm also working on some sort of weight/fitness tracking app, which is in a really early stage of development. If you fancy checking that out and maybe guiding its development you can see what little has been done at: http://alive/labx0r.net

Of course, the problem with web apps is they can never be as cool as rich client stuff. At some point I really will get round to writing a nice Cocoa app.
User avatar
moosedude
Baaaaaaa!
Baaaaaaa!
Posts: 6209
Joined: Fri Nov 19, 2004 1:19 pm 0
Location: Craggy Island
Contact:

Post by moosedude »

Kenshi wrote:Well, its no where near as cool as some of the stuff on this thread, but I just ....
Nonsense, if you're proud enough to post about your project here then it must be cool :-)

01000101 01000100 01000111 01000101

http://www.redbubble.com/people/fotofill/ buy my photos!
User avatar
_TinOmen_
Baaaa!
Baaaa!
Posts: 745
Joined: Wed Feb 12, 2003 10:52 pm 0
Location: Stockholm, Sweden
Contact:

Post by _TinOmen_ »

My niche game developer tool "ZGameEditor" is now finished and
released in 1.0 version.

It is a little tool for making 64 kilobyte games and screen savers
for Windows, using OpenGL for graphics and an real time synthesizer
for audio.

It's written in Borland/CodeGear Delphi.

ImageImage

ImageImage

Here is the website: http://www.zgameeditor.org
Post Reply