KatsBits Community

Where I've Been

0 Members and 2 Guests are viewing this topic.

Offline Shaderman

  • Defunct
  • Full Member
  • **
    • Posts: 147
Secondly, this is going to take much longer than I thought as the GTKRadiant and Q3Map2 sources are heavily coupled (they depend a crapload on each other).

Oh yessss, I remember that from GtkRadiant 1.5. I don't know which version you're using (I guess 1.5 or 1.6), but maybe it's worth to look into the other one to get out the q3map2 source. AFAIK q3map2 didn't change from 1.5 to 1.6 but since the 1.5 source was heavily rewritten in all parts it's maybe more coupled with q3map2 and thus it might be much easier to get q3map2 from the 1.6 code base which itself is based on GtkRadiant 1.4.

It's 7:50 am here and I didn't have a coffee yet... I hope this makes sense :)


Offline silicone_milk

  • VIP
  • Full Member
  • *
    • Posts: 172
    • My Portfolio
it does make sense. I'll take a look in to it. I've been working out of the 1.5 codebase and trying to make the q3map2 a completely independent project (as part of the main focus on running it on the gpu). Also, since I'm at it, I'm rewriting the base in c++ to have access to the boost library and the standard c++ libraries. Although, I'll have to work some c in to the parts that will be running on the gpu since the c++ extensions aren't fully developed yet...


Offline silicone_milk

  • VIP
  • Full Member
  • *
    • Posts: 172
    • My Portfolio
Got the BSP section of the q3map2 source compiled on its own. Replaced all the raw pointers with boost smart pointers and all the c-strings with standard library string types.

Introduced some interface classes to work on BSP data rather than having a bunch of loose global functions floating around in the q3map2 header.

Having some issues with the fact that q3map2 relies heavily on almost all of the variables being global. There's really going to be a lot of work refactoring all of that code.


Offline Shaderman

  • Defunct
  • Full Member
  • **
    • Posts: 147
That's a start :) Oh well, I remember those static vars everywhere in the Radiant code  ::)


Offline silicone_milk

  • VIP
  • Full Member
  • *
    • Posts: 172
    • My Portfolio
Got some more work done on it. Embedded the Python interpreter in to the compiler.

More detail can be found at the Quake3World thread - http://www.quake3world.com/forum/viewtopic.php?f=10&t=43211 This is where I've been talking about it mostly.


Offline Shaderman

  • Defunct
  • Full Member
  • **
    • Posts: 147
Nice! I'm very interested in this technology and I'd love to see the code changes you made to q3map2 once you've something to show.


Offline silicone_milk

  • VIP
  • Full Member
  • *
    • Posts: 172
    • My Portfolio
nothin to show.

Adding some test code to the heavily coupled q3map2 source from the gtkradiant 1.5 svn repo to see if I can offload some basic functions to the gpu first.

The C++ route was just too much damn work for a hobby project. And the opencl bindings are for C anyways so might as well just stick with it, neh?

I *did* set up ssh and a git repo (svn but better) on my server and once I lock down the ssh access with chroot to keep people from having full access to my server, I'll be opening the repo as read-only to people interested in keeping track.


Offline carnage

  • Defunct
  • Newbie
    • Posts: 40
Interesting project Milk. Having done a fair bit of GPU programming myself it will be interesting to see what kind of performance benefits you can get from this. Its defiantly not a trivial matter to move a CPU code into a massively parallel architecture with very limited inter thread communications.

I haven't worked with CUDA or CL though. Will be interesting to see if this is even possible.


Offline silicone_milk

  • VIP
  • Full Member
  • *
    • Posts: 172
    • My Portfolio
Thanks. I can see a huge performance increase (theoretically) for the light compiling phase as we're dealing with a lot of floating point math in huge matrices.

OpenCL is a joy to work with. Makes getting code on to the GPU quite easy and has a similar syntax to the ANSI C99 standard of the C programming language.

I'm going to chroot my server tonight I guess. And get that git repo public :)

At the moment I'm working on a kernel for radiosity calculations.


Offline ratty redemption

  • VIP
  • Hero Member
  • *
    • Posts: 1031
    • ratty's deviantart pages
milk, i can't remember but did ydnar ever get ao to work with q3map?


Offline carnage

  • Defunct
  • Newbie
    • Posts: 40
Interesting, I have only worked with sharer level graphics programming so I guess that general purpose GPU programming languages are a bit more lenient with amount of variables/memory you can access to be able to do some cool stuff like this.

I would love to see the source when you get the server up so I can really see what going on under the hood and get a better idea of what GPGPU stuff is capable of.

But in general graphics cards are pretty good for processes that can be split up into a large number of independent processes that have roughly the same execution time (AFAIK). So I guess quite a bit of q3map is a good candidate for acceleration.


Offline pazur

  • Jr. Member
  • *
    • Posts: 69
Would be great if you can make this GPU q3map for ATI users although I don't map on the id-Tech 3 engine anymore I might consider building a custom map for Urban Terror in future.


Offline silicone_milk

  • VIP
  • Full Member
  • *
    • Posts: 172
    • My Portfolio
Would be great if you can make this GPU q3map for ATI users although I don't map on the id-Tech 3 engine anymore I might consider building a custom map for Urban Terror in future.

OpenCL is able to execute on ATI cards although I have none at my disposal to test the code on. The beauty of OpenCL is that it's a standard that is implemented to run on many platforms. The biggest community for OCL development I've seen happens to be made up of mainly Mac programmers surprisingly enough.

CUDA, on the other hand, is an NVIDIA only tech that I feel will probably end up being phased out since NVIDIA is supporting OCL now as well.

Didn't get around to fixing my server tonight. They kept me late at work and I'm a bit tired.


Offline silicone_milk

  • VIP
  • Full Member
  • *
    • Posts: 172
    • My Portfolio
Hm. Forgot I said I was going to open the git repo.

Spent the past three days fighting a buffer overflow bug that only appeared in the release version of q3map2 but not in the debug o_O

It was a silly little fix that worked effectively. Took forever to track it down.

So there *is* something I haven't tested yet regarding read/write permissions to the repo. I don't think you guys would ever upload anything retarded to my repository but I like to minimize possible... issues.


Offline kat

  • Administrator
  • Hero Member
  • *
    • Posts: 2692
    • KatsBits
Don't open a server to the Net, if that's what you're talking about, it's just asking for trouble if you have no real way to monitor what's being uploaded to it.