DISQUS

CoderHump: Technical Notes on O3D

  • elenzil · 8 months ago
    now *this* feels like the web-based graphics environment i've been looking for !
    i'll try to port my "400 rotating squares" demo, which imo exposes Flash10 as a dog, to it tonight.
  • Ben Garney · 8 months ago
    400 squares made Flash10 break? What resolution were you running at?
  • elenzil · 8 months ago
    well it doesn't behave incorrectly, but it chews up nearly all the CPU of my pretty zippy machine at say 1000 x 1000 pixels.
    it's clearly the rasterization which is the issue. http://elenzil.com/flash/flash_5/oxeFlash5_norm...
  • zwetan · 8 months ago
    I ran demo under OSX and no problem

    but looking at the code, there is room for optimization

    use Vector, not Array, this is a real boost in FP10

    try also to use cacheAsBitmap, it speed up the rendering

    other things to explore:
    don't draw the 400 vector graphics on screen, keep them out of the display list,
    copy them to a bitmapdata and just display that
    (see for ex: http://www.bigspaceship.com/blog/labs/improving... )
  • elenzil · 8 months ago
    thanks for taking the time to look at that .as code, zwetan.
    i tried cacheAsBitmap as you suggested, but not much change (presuming i used it correctly - just shape.cacheAsBitmap = true ?)

    i guess my fundamental take here is that rasterizing 400 rectangles should not be anywhere close to a bottleneck. i've got way more interesting things to do with my programming time than fight that.

    compare, for example, to this demo which renders 1000 rotating bump-and-environment-mapped utah teapots (3783 triangles each) at 30 to 40+ FPS on the same exact machine, and barely bumps the CPU at all. and it uses javascript instead of actionscript, and there's no compilation step.
  • Thomas · 7 months ago
    Keep in mind that Flash ain't GPU accelerated and O3D clearly is.
  • Ben Garney · 8 months ago
    Are you running under OS X with these tests?
  • elenzil · 8 months ago
    vista
  • Ben Garney · 8 months ago
    I just ran it on my XP box at home and it ran very smoothly. My OS X laptop at work had trouble, though.
  • Ben Garney · 8 months ago
    I checked out the demo. You're right, not running super smooth. I was getting some errors, maybe something internally is going wrong and causing problems?
  • elenzil · 8 months ago
    huh. many thanks for looking at the demo. other folks have mentioned it gives errors. where to these errors show up ? do i need a debugger installed ? but in any event i doubt it's the errors which are giving it trouble; at small window sizes it uses just a tiny portion of the CPU.
  • zwetan · 8 months ago
    thanks for the review, very good stuff indeed

    and technically it should be possible to make another branch of the code base and use tamarin as the running engine instead of v8 (agreed it's a lot of work, but definitively possible =))
  • Ben Garney · 8 months ago
    Yeah definitely - then the issue is mainly penetration rate. But as an alternative to something like Unity where you're already pushing a player plugin...
  • repi · 8 months ago
    Ooh very cool, looking forward to seeing it used!
  • equex · 8 months ago
    O3D doesnt work on non-3d accellerated cards, so most corporate workstations cant deal with it :(
    So this is pretty much a hobby level trinket.
  • Ben Garney · 8 months ago
    Yeah, I guess it will really hurt the sales of your game to people who play during work hours.

    Seriously, though, what market are you targeting? Every cheap computer sold in the past few years has some sort of minimal 3d capable graphics chip on board. X300s are plenty to run O3D on, and even the Intel parts are capable enough to do it. Heck, even really terrible cards like S3s have SM2 support nowadays.

    Certainly there are situations where you will want to go with something like Flash that requires no special hardware, but claiming that O3D is a "hobby level trinket" is like saying that Half Life 2 or Left 4 Dead was a "small success." The set of people that can run O3D, HL2, and L4D are basically identical.
  • Aras Pranckevičius · 8 months ago
    Well, according to the our stats - http://unity3d.com/webplayer/hwstats/pages/web-... - there's still almost 30% of the machines that have fixed function hardware. That number is dropping, but it's still quite significant. O3D currently does not support Intel GMA 950 (aka 945), which is also very popular - but that's probably just some bugs or missing workarounds; technically GMA 950 can run SM2.0.
  • Ben Garney · 8 months ago
    Good to see you here, Aras. :)

    Yeah - a lot of people have crappy 3d capable hardware (like the intel chips) but they DO have 3d capable hardware. O3D needs to get a path for those chips.
  • JeramieH · 8 months ago
    "... so most corporate workstations cant deal with it. So this is pretty much a hobby level trinket."

    Blizzard, Sony, EA, etc seem to have tapped a hidden market full of computers with 3D cards not in a corporate environment. Maybe they're onto something.
  • equex · 8 months ago
    uh, for gaming i use my crossfire setup at home, no browser needed.
  • sul · 8 months ago
    funny there is no linux support, but i don't blame them. linux 3d is like a mud hut compared to a mansion.
  • Ben Garney · 8 months ago
    I wish Linux had good 3d support. But the infrastructure just isn't there. A shame. But really, if you want a desktop linux experience, why not use OSX?
  • elenzil · 8 months ago
    it seems like O3D + google native would be an awesome combo.
    the computation you can do on the GPU is pretty impressive these days (eg calculating julia sets, simple waves etc), but for really crunching data like in say a large gravity or fluid simulation i think you need a general-purpose CPU and i'm not sure that V8 or tamarin will really satisfy.

    on another topic, what's the coolest O3D demo peeps have seen so far ?
    has anyone used render targets + environment mapping do do dynamic reflections yet ? all the pieces are sorta just sitting there.
  • Todd · 5 months ago
    Very cool Ben!