Pages

Thursday, July 30, 2009

Water in Your Browser

Recently I’ve been playing around with O3D. If you don’t know, O3D is Google’s new browser graphics API. It enables you to develop 3d interactive applications that run inside a browser window (and quite easily mind you). In fact it rivals XNA on getting an app up and running quickly.

And on that note, I’ve ported the water sample to O3D (minus the camera animation). Besides a bug I encountered with the sample content converter (and promptly fixed by one of the o3d developers), it was a relatively painless conversion. All that was required was to setup a scene in max, apply materials, export to collada and convert to the o3d format. Setting up the render targets also took minimal effort :). The shaders, for the most part, remained untouched.

Click the picture to have a go!

waterscene

If you’re interested in the max file or source you can get both here:

9 comments:

Patrick said...

Looks great! While I really like the idea behind O3D, I must say that I'm disappointed that they only support Shader Model 2.0. I understand why they locked it down, but it is still discouraging, especially with Shader Model 5.0 cards coming out by the end of the year.

Anyway, keep up the good work!

Kyle Hayward said...

I'm a little disappointed by o3d not supporting PS3.0 also. I understand that they want it to work on the maximum amount of computers and hardware, but the decision to support PS 3.0 (and thus effect the amount of computers the app would work on) could be left up to the developer using O3D.

Charles Humphrey said...

Oh I really like the look of this, shame your samples runs at 2.2 fps on my work laptop, will give it a go on the new one in a bit.

UltraHead had a good post a while back on getting XNA to run in a browser, did it my self to and was amazed at how easy it was, shame it's a huge client deployment though.

Anyway, thanks for giving me something else to distract the hell out of me lol

Kyle Hayward said...

Haha no problem mate. Too bad it runs very slow. All the machines I have available to test on run at 60 fps(6600gt and up though). What browser did you try it out in?

Thanks for the tip on getting XNA to run in a browser. :)

hbridge said...

Hi Kyle,

This looks great! We'd love to include it in the O3D community gallery if you'd like to submit it. You just need to fill out this form.

Thanks for trying out O3D!

Henry

Black Jesus said...

heh, o3d doesn't work in chrome...

Kyle Hayward said...

Hmmm that's odd. I've noticed that it runs slower in chrome/v8, but haven't had a problem with chrome running the app.

Were you asked to install o3d when you first loaded the program? If so, maybe o3d didn't install correctly and you need to reinstall.

Unknown said...

Well, for 3d in the browser, Java is a better choice. See this for example:

http://www.gamerendering.com/2008/09/26/projected-grid-water/

Kyle Hayward said...

While java + ogl have been around for quite a bit longer, I would argue that O3D is just as capable as java for 3D rendering in the browser. The water demo you linked to could also be implemented in O3D.

However, development with java + Ogl is made considerably easier with libraries like jME.