Home General Discussion

Flash Molehill - Flash and 3D?

polycounter lvl 12
Offline / Send Message
Fomori polycounter lvl 12
OK so I work as a 3D artist in a games company that makes online Flash-based games. So most of what I produce is pre-rendered at the moment. But the flash developers here keep getting excited about this "Molehill" and telling me about it. But they're Flash programmers not artists (so a lack of understanding both ways). Well I have a mild idea what this might mean for big online Flash gaming, but still feel like it's early days. Can anyone shed light on it at all? And how well it can integrate into a purely Flash and browser based gaming platform?

Some links I've seen:

[ame]http://www.youtube.com/watch?v=JSlehUCU9gs[/ame]
[ame]http://www.youtube.com/watch?v=UZb1huF7Np0[/ame]
http://www.flashrealtime.com/videos-3d-flash-molehill/

Replies

  • Ben Apuna
    Options
    Offline / Send Message
    Well from what I understand molehill is purely flash so it should work well across any browser and hardware platform that supports flash.

    It allows flash apps to access and use the GPU to do 3D related operations rather than having to fake it at a "higher" level all through software, which is slower and less efficient.

    This means that as an artist you'll be able to work with higher triangle counts, possibly larger textures, maybe use pixel shaders... than you would currently without molehill (provided that you were making real-time assets rather than pre-rendered assets). You'll probably need to make real-time assets rather than pre-rendered assets.

    If you were working on 2D games it would mean you could have more sprites onscreen at the same time, and hopefully pixel shaders.

    Here's a recent thread over at TigSource about current options for 3D in flash with a few observations about molehill.

    Molehill might lead to a 3D revolution in flash game development. Though 3D is inherently more expensive to produce so smaller developers might get squeezed out of the market by larger developers that have more resources to dedicate to art. Or it might not... who knows? the people who normally play flash games may prefer 2D games over 3D. Only time will tell...

    EDIT:

    I forgot to mention that many PCs out there are still only using integrated Intel graphics chips rather than actual dedicated GPUs. A 3D flash game relying on molehill will probably perform badly in those cases.

    So the real question is what percentage of typical flash game players don't have dedicated GPUs?
  • acc
    Options
    Offline / Send Message
    acc polycounter lvl 18
    I've been working with Stage3D (Molehill is the old code-name) since the first pre-beta release, and my next project is being built with it (2D game using the speed of 3D hardware acceleration).

    Stage3D is part of Flash Player 11 which is currently in public beta. There's no integration that needs to be done aside from an HTML tag that needs to be present for the browser to allow Flash to use your GPU. In addition, all the old Flash features are still available so you can overlay the old 2D graphics system (awesome for interfaces!) on top of the new 3D display.

    If it can't access your GPU it also has a software renderer to fall back on. In practice, that doesn't matter much since software is slooooooow, but it's nicer than crashing.

    Some of the very low-level technical features are a bit limited right now but for the most part everything you'd expect is there. You can do normal mapping, bloom, dynamic lighting, shadows, etc. Post-process effects (on older cards) are very slow so I hope that part gets some improving.

    It's a very big deal for browser gaming since Flash is on the vast majority of computers. Flash Player 11 will likely hit 90%+ market penetration in just a few months after beta ends. No other web technology comes anywhere near that update speed, besides Adobe Reader.

    Also a big deal is that the Unity team is promising to have full support for exporting Unity games to Flash format (SWF). If they deliver and if it is fully featured, the Unity Player will likely disappear (slowly) but Unity as a development tool will become far more useful as you'll be able to reach hundreds of millions more people with it.

    Basically, awesome all around.

    ... except that Adobe is still dragging their feet on right-click support and mouse-capture, so the types of games you'll see at first is going to be pretty limited. Can't do a good FPS without mouse capture! I'm still hoping they'll pull something out of their ass for the full release but it's unlikely.

    I'm not sure how good the support is for Intel integrated chips - they're shit to begin with - but I think there is some support and if you're doing more pushing pixels than polygons it'll work pretty well. Don't quote me on that, though.
  • kaptainkernals
    Options
    Offline / Send Message
    kaptainkernals polycounter lvl 12
    For me, this is really exciting, I work alot in flash, and I really love it, some of you hate flash, but for me, it's using the right tools for the right situation.

    As for the 3D, ACC said pretty much all I'd like to say and has said more than I could of shared, so while I haven't had the chance to play with Stage3D as ACC has, I'd just like add the following:

    Playable molehill game - somewhat old though:

    http://molehill.zombietycoon.com/Game.html

    Which requires flash player incubator to play:

    http://labs.adobe.com/downloads/flashplatformruntimes_incubator.html
  • Fomori
    Options
    Offline / Send Message
    Fomori polycounter lvl 12
    Great. Sounds pretty good then.
    I should hopefully be doing some experiments with a Flash coder here soon.
    I think the consumer having a decent GPU could be an issue, but I expect they won't be doing games that feature a lot of 3D on screen.
    Didn't know about the Unity integration and that sounds great as I've just started looking into Unity.
  • Maph
    Options
    Offline / Send Message
    Maph polycounter lvl 8
    Damn, I had no idea Molehill/Stage3D was this advanced yet!

    For those experiences with it and working with it inside Flash, what's the API like?
    A straight 1:1 wrapper to OpenGL (ES) (I'm assuming they're using OpenGL for the graphics API, cross platform 'n such) or is it more managed like Unity's API?
  • acc
    Options
    Offline / Send Message
    acc polycounter lvl 18
    Neither, the API is actually extremely low-level, but it automatically chooses whether to use DirectX or OpenGL so as a developer you don't need to worry about that (just worry about if it goes into software!)

    Adobe's focus seems to have been on getting free third-party engines working and ready for use (Away3D, Alternative3D, Flare3D, etc) rather than expecting individual devs to write their own shaders, model loaders, etc.

    If you want that plug-and-play, load-my-model and handle-my-render-passes type experience you should use one of those free engines. I haven't used any personally but my impression has been that Away3D is getting the most favourable reviews right now.

    There were also a couple of 2D engines floating around, but I can't recall the names or if they are in a decent state yet.

    If you want to jump in and build your own graphics system from scratch, I have a few basic tutorials available. You can find lots more with a quick search, as well as how to set up the beta for development to begin with (I'm going to write a tutorial on that soon, just haven't gotten around to it yet).

    There is also a big kirupa thread chock full of goodies like normal map shaders. Look for Furqan's posts in particular because he was way ahead of pretty much everyone. (note: that most of that stuff is from the pre-beta so there could be some small incompatibilities, but since most of it is shader code it should be fine).

    Working with low-level AGAL is not as brutal as it seems at first -- and you're spared the high compile times and structural inefficiency brought in by general purpose engines - but it is a serious investment for dedicated programmers.
  • acc
    Options
    Offline / Send Message
    acc polycounter lvl 18
    Said I would do a tutorial on setting up Flash Pro for this, and here it is!
  • Fomori
    Options
    Offline / Send Message
    Fomori polycounter lvl 12
    Sweet! :thumbup:
Sign In or Register to comment.