Not logged in, Join Here! or Log In Below:  
News Articles Search    

Submitted by Chris Miller, posted on April 25, 2002

Image Description, by Chris Miller

This is a screen grab of my latest coding demo, WebGL. Not your typical OpenGL demo, it combines OpenGL with Dynamic HTML, ASP, and CGI to show interactive 3d modeling in a browser window. You draw in the edit window, then click "Render Changes" to update the 3d display. The scene is rendered by OpenGL into an offscreen buffer. Then it is sent to stdout for display by the browser. I'm not sure if it works on every version of every browser, but i've tested it with IE 5.5 and Navigator 4.04.

Have a look at:

I would love to see some critique, and hopefully squash a few bugs. Please excuse the rest of the site, as it is in development.

Here are some details...
  • Hand coded Dynamic HTML user interface. I used Dreamweaver to create page templates from my menu system.
  • C++ CGI application to render the scene with OpenGL. I'm using glReadPixels to grab the color buffer. This was interesting to write, because there is no user interface. The program simply outputs a JPG stream to stdout.
  • Uses the Intel JPG library to create the in-memory JPG stream.
  • Bilinear filtereing of the 3d image.
  • Parameter passing with POST to retain page state. The grid is encoded as hexdecimal strings which are passed to the CGI program via GET.
  • Possible enhancements...
  • Stack 15 of these 15 x 15 grids together to create a "cube" which is editable slice by slice.
  • Camera positioning
  • Custom positionable lights
  • Load and save of the grid using the browser.
  • Enlarged image rendering
  • And some bugs...
  • Floating palette doesn't drag on Netscape (working on it).
  • Chris Miller

    Image of the Day Gallery


    Message Center / Reader Comments: ( To Participate in the Discussion, Join the Community )
    Archive Notice: This thread is old and no longer active. It is here for reference purposes. This thread was created on an older version of the flipcode forums, before the site closed in 2005. Please keep that in mind as you view this thread, as many of the topics and opinions may be outdated.
    Ted L. Chen

    April 25, 2002, 08:24 PM

    Isn't this an interactive landscape heightfield generator/engine just tilted on its side? Just kidding.

    Aside from the annoying 'clicking' sound IE6 makes when I click on a cell, it's actually quite captivating being able to see something render in 3D controlled by a standard ASP page. There's some color banding though on the preview picture. But it fits well with the current web design so it's no bigger. In another site it might be a problem though.



    April 25, 2002, 08:33 PM

    I was just curious, I recognized the name from the series =) But I thought it might have been coincidence...


    April 25, 2002, 08:57 PM

    Fragmented martin English, hehehe. Thats the perfect way to describe how he writes. What a funny way to describe it. From now on ... Let's ... talk like ... that!!.
    It much more fun and artistic ... writing .. sentences with many ...
    how do you say ... elipses.


    April 25, 2002, 09:28 PM

    Well, probably the best application of this would be when you want to show a 3D model of something with a hell of a lot of vertices or a large texture map, because this way it would be faster, the user doesn't need to download a giant model or texture file for something they might only look at for a couple of seconds.


    April 25, 2002, 09:36 PM

    The message to not read the post is right where it says "MC BAXTON". :)

    Gawd, I hate dumbasses that try to sound smart and 'justify their trolling'... they just end up spurting out garbled engrish. :P


    April 25, 2002, 09:38 PM

    It's a good idea, with lots of possible and cool uses if you put your mind to it. :)

    But just to complain about the GUI, it's annoying to have to click on every cell... is there a way to just allow 'painting'? (Clicking and dragging)


    April 25, 2002, 09:45 PM

    That's cool- It would be perfect for some kind of "paper mario" style graphics :)


    April 25, 2002, 09:54 PM

    I've recently uncovered evidence that MC BAXTON *is* roleplaying. I've even uncovered his secret identity! He's none other than...

    Kurt Miller! ARGH!!!!!!!!!


    P.S. Woudln't that be aweful?!


    April 25, 2002, 10:05 PM

    I get the same as ScrewLoose with Opera 6.01.


    April 25, 2002, 10:48 PM

    Yeah, it was annoying having to constantly click the mouse. Reminded me of Dungeon Siege.

    You should use the buttondown/buttonup states to toggle a "Button Down" variable, and on mousemove, if the button is down it draws the pixel the mouse is over. It's more programming but much better.

    Decimal Dave

    April 26, 2002, 12:17 AM

    Dang! There goes my plans to build a house out of AOL CDs. Office Max is going to be _pissed_ when I bring all of those CDs back tomorrow.

    Headless Chicken

    April 26, 2002, 12:47 AM

    Ok, I'm not very good at speaking troll, but I think this is what he was trying to say:

    Stop taking me so seriously


    April 26, 2002, 12:56 AM

    I've heard there a good book on learning how to speak troll. I think Amazon carries that book.

    Here's a good site for those just beginning to learn troll:

    Headless Chicken

    April 26, 2002, 01:10 AM

    Very intresting, thanks :-)
    but seriously though, sure MC makes some pretty shrewd remarks, but how can you possibly take somebody who calls himself a messiah serously. If people would stop taking his random rants to heart, I'm sure we would all be alot happier. Half the time he makes a fool out of himself anyways...


    April 26, 2002, 04:10 AM

    I want to have t-shirts with MC_BAXTON on it :)

    This is hilarious, I can't believe people still feel the need to react :)

    Vander Nunes

    April 26, 2002, 04:17 AM

    Looks like an interesting prototype.

    I was about to suggest streaming, when I decided to check if someone suggested already, and in fact there was.

    Anyways, nice app.


    April 26, 2002, 04:32 AM

    Ok, so it *is* being rendered on your server. If that's true, then I can see the point of it - it's not all that clear in your description.
    Good work.


    April 26, 2002, 04:35 AM

    Why can't everyone just be happy that flipcode has its own pretty amusing celebrity troll?


    April 26, 2002, 04:36 AM

    Yes, I didn't realise it was server based rendering - don't know why, but his description didn't get that through to me...use of client/server terminology might have helped :)
    I *do* see it's value now.


    April 26, 2002, 04:50 AM

    I agree, Alex!
    But I don't think Chris is a graphics programmer - sounds more like a web surely you can excuse him using incorrect terminology on the subject every so often?
    Not that I don't agree that the terminology should have been corrected....


    April 26, 2002, 05:02 AM

    Worked like a charm in opera 6.0 for me...

    And looks damn cool too :)


    April 26, 2002, 06:17 AM

    Indeed man, I too find MC BAXTON's posts hilarious and enjoy reading them. All these people that get offended by MC BAXTON seem to be relatively new around here. (In that they don't realise that MC BAXTON has made a triumphant return recently.)

    You people who can't handle it make it all worth while. You don't appreciate or more likely, understand, the humour in it.

    Note that I'm not quite sure if they're intended to be humourous, but I do see them that way. =]


    April 26, 2002, 06:25 AM

    I agree with you, there is not merely enough eliteness.
    I believe it's why scene is dead.
    Bring back the wars!

    Alex J. Champandard

    April 26, 2002, 06:27 AM

    I'm not going to forgive him, 'cos I didn't think it was a sin in the first place ;)

    I was merely trying to clear the issue up -- and then I had to explain my side of things in a bit more detail since he brought the topic back up.

    As I said, it looks good anyway, no matter what you call it!


    April 26, 2002, 06:30 AM

    Works wonderfully in Opera 6.2 under Linux - the DHTML and everything is perfect. Only thing is white ends up rendering as greyish - but I suppose that is your lighting :)

    I appreciate this, as I think it would be cool for products like TurboSquid - I hate seeing those models at one angle, it would be neat to do some closer inspection without downloading the model or getting some lame spyware plugin to view it on the web.

    Keep up the good work! :)

    Sampsa Lehtonen

    April 26, 2002, 06:51 AM

    amen to that, pal :)

    I mean, because of MC BAXTON I keep coming back to read these IOTD's (not completely but anyways)... I'm sick and tired of messages touting just "that's cool man", "first!" and "looks good, I'm going to try it out". (Shees, why can't you FIRST try it out and then tell what you think of it.) Messages such as that might make the owner of IOTD a bit more proud of himself and might even encourage him to go on, but it isn't constructive criticism.

    Honest people, if you can't stand negative feedback, how can you even stand the real world? Real world is far away being positive and fair.

    At the moment people start get banned to post I'm out of here. You try to modify the way community works and it will brake apart.

    Vote for MC BAXTON! Feed the "troll" I say!-)

    Peter Mackay

    April 26, 2002, 09:13 AM

    Yes, but people post images here not to get them flamed, but just to say "I did this, it took me a while and I thought I'd share it."

    Chances are the person who developed it knows that there are silly little problems with it. What's that baxton? The grass is the wrong shade of green? Who really gives a damn?!

    Baxton just takes pleasure in beating other people's hard work down because he's obviously not been able to finish anything himself. He's not a person, he's just a human husk filled with cheese.


    April 26, 2002, 10:12 AM

    My thinks he is.


    April 26, 2002, 10:25 AM

    "...he's just a human husk filled with cheese."

    He's human?

    Sampsa Lehtonen

    April 26, 2002, 10:32 AM

    >Chances are the person who developed it knows that there are silly
    > little problems with it. What's that baxton?
    > The grass is the wrong shade of green? Who really gives a damn?!

    Yeah, who really gives a damn. So hey, what does it matter then? If you get hurt by that, maybe you take it too seriously. A little sense of humour and you'll be just fine.

    As far as I've witnessed MC BAXTON's ramblings here, he hasn't hurt anybody badly (if at all).

    Maybe we should have a poll here: "Has MC BAXTON hurt your feelings?"
    - yes, I nearly commited a suicide
    - yes, I've broken into tears
    - no, I don't really care
    - no, I've had a blast

    Kurt? How about poll of the day?...

    This thread contains 102 messages.
    First Previous ( To view more messages, select a page: 0 1 2 3 ... out of 3) Next Last
    Hosting by Solid Eight Studios, maker of PhotoTangler Collage Maker.