Wednesday, August 5, 2009

Jack of all features

And now for something completely different...
I've put the shader compiler on the side and started implementing another complicated feature: network distributed rendering !

Compared to writing a compiler, it's substantially easier.. but not easy 8)
I've done quite a bit of network programmign before, but it's never easy. With BSD sockets and TCP/IP one has to assume that there is going to be a certain amount of latency, and tends to write non-blocking multi-threaded code.. which sensibly complicates things.

I spent the last weekend writing some basic sockets code.. and then mostly rewriting it.
The first time around I tried to get everything done from Friday night into Saturday morning, and it was pretty dreadful.. conceptually very broken.

I don't get a good feeling when writing network code. I lack the confidence, and I'm pretty sure I'm missing that fundamental understanding of how things are meant to be.. a feeling that I get elsewhere writing other types of code.
Some day I'll get it for network code as well.. if anything, I'd like to reach a point where I can nicely abstract things at different levels, without ending up with ugly large loops.
Because my goal is LAN network, I could probably do away with a lot of the multi-threading stuff and perhaps just pretend that the latency in the communication is really minimal.

So, why all of a sudden into this, where so many more basic features are missing ?
My main focus is to experiment with different things rather than do one or two "right". Experimenting is very important in getting a good estimate of things. It's good to get a broad view of what is possible, without spending years refining the art of writing compilers or implementing some advanced texture sampling.. or any form of global illumination !

..many try to predict the future of real-time graphics.. but the problem is that those that have a voice are usually too busy with meetings and have long left the actual code development activities.

There is this eternal concept of theory vs practice (very much the story of my troubled school education), where the hacker types are not well received. Writing code is seen on par of getting hands dirty with engine grease.. ..in fact, the rich and successful people are usualy those with lots of charisma and nothing else.. the visionaries, the exploiters.. that's important too, but it's against my principles: "talk is cheap, show me the code".

Additionally.. I've been setting up a page dedicated to the project. As usual, using Google Sites, which is fairly nice, if only the editing wasn't such a painful experience 8)
I usually end up retouching the HTML.. which is chock full of ugliness.. like a dozen nested div tags with no purpose !!

Anyhow...

8 comments:

  1. I feel like there should be a "Kaz" somewhere in there !

    ReplyDelete
  2. Mr. Kaz-Future-Graphics-Man: End of the GPU Roadmap.

    ReplyDelete
  3. ...cool.. the guy actually kindly came presenting this to our company some time ago.
    I like the excitement about the future software rendering, it's nice that someone so visible in the industry would push this.. though it's also wishful thinking.. to have a more difficult play field so that even more companies would need to license technology ;)

    I'm not sure however about the REYES portion of it. Seems to be all about micro-triangles.. but normally one would refer to micro-quads, unless having something really specific in mind about a micro-triangles implementation.
    Also, I'm not sure about not needing texture sampling... texture sampling is very much part of any renderer. In fact, I remember some people from Pixar making a point of needing texture sampling done in "software".. because current hardware texture samplers can only deliver the cheaper filtering schemes: bilinear, trilinear with mipmaps, etc. (apparently, HW texture filtering isn't going away for real-time)

    I think that the fact that micro-polys eventually are converted into pixels without any texture sampling at that stage, makes it seem like sampling is not needed.. but in fact micro-polys get their color from a texture, and that texture needs to be sampled sooner or later 8)

    ..so, it's good inspiration, but I don't think that the "future of rendering part" is built on any solid internal research results.

    woooo

    ReplyDelete
  4. I have to admit that I was pretty overwhelmed with the sheer amount of data/information. For sure though, the future never always exactly is how people predict (or would like to see). I would gather that the changes will be "somewhere in the middle" of what he's predicting and the actual reality.

    Having read through the paper though, I was left with questions about what the state of AI, animation, audio, and physics in games will be by 2014; I can't help but feel that (again) graphics and rendering are going to be the main focus (yet again) with these other areas lagging behind (as usual).

    ReplyDelete
  5. Physics as in dynamics.. that seems fairly easy to implement in an engine, and I think many companies simply use Havok.
    If by physics one meant something more, then there would be more need for innovation.. otherwise I don't see much reason to change.

    Animation and AI are somewhat connected, and they both suck pretty hard in games.. especially AI, but also animation.. in most cases one has the distinct feeling of manipulating a marionette.

    Those two fields could use a major improvement.. but I personally don't have time or experience or general interest 8)
    ..though, someone ought to do something about it..

    ReplyDelete
  6. I guess (eventually) people will start to focus more on AI and animation ... once the graphics gets to the point of realism where the horrible animation makes it painfully obvious! 8P I think animation is a prett complex area though since I can see how AI and physics can affect/influence it ...

    Anyway, some nice SIGGRAPH 2k9 papers here: SIGGRAPH 2009: Beyond Programmable Shading.

    ReplyDelete
  7. I think that in games the poor quality of animation is already painfully obvious 8)
    One problem with games is that they are interactive.. and it's easy for the player to jerk around a character by joystick movements.
    In a sense, old Laser Disc games like Dragon's Lair were more advanced.. because they were somewhat interactive, but not to the point to get the player to look like a spastic dummy 8)

    ReplyDelete