Monkey3D
Community Forums/Monkey Talk/Monkey3D
| ||
I messed around with WebGL during the past few days and started writing a small 3D engine using WebGL in Monkey called 'Monkey3D' (creative as always). It's basically a Monkey port of the tiny ZauberCraft engine I made in BMax with lots of adjustments to make it work with WebGL. You would think that WebGL would be just OpenGL with less features, but no, they chose to remove the whole fixed function pipeline, forcing you to do everything OpenGL used to do for you yourself with lots of custom shaders. It took quite some time to get used to most of the functions not existing anymore, but luckily I did a few applications with GLSL in the past, so I didn't have to learn that as well. I wrote a small "Planet earth" demo with multiple combined texture maps (specular, normal, atmospheric, day/night diffuse) and a few neat shader effects to demonstrate the current features. Screenshot: Link to the demo (requires WebGL-enabled browser) Download the source code |
| ||
The plastic shine spoils the illusion, but it's very pretty nonetheless. Very impressive work, and I look forward to seeing becomes of it in future. |
| ||
Less than a week and someone is writing down a 3d engine-wrapper! Great! |
| ||
Cool but what i would really like to see is a proofen 3d engine supporting WebGL (OpenGL ES2). |
| ||
The plastic shine spoils the illusion, but it's very pretty nonetheless. Yeah, I tried tweaking it, but my lack of artistic talent made it somewhat difficult :) Cool but what i would really like to see is a proofen 3d engine supporting WebGL (OpenGL ES2) I don't really know what you mean by 'proofen', but the demo in the first post does just that. It wraps most of WebGLs functions for Monkey-use, packs them up into an object oriented interface and saves the user from having to bother with OpenGL directly. Of course a lot is missing right now since I've only been working for three days on this, but I'll see where it goes. The interesting part is that WebGL is basically OpenGL ES2, which is supported by the iPhone, the iPod touch, the iPad, Android and certain other mobile phones, so making the engine multiplatform shouldn't be too much work. I also tried to keep the implementation close to the one I did in BMax, so it would also be possible to make a Windows/MacOS compatible version. I can't really test multiplatform capabilities right now since the free Monkey demo still only compiles to HTML5. If I remember correctly, Monkey without Mojo should still compile for all platforms, so I guess I'll just have to wait a bit longer. |
| ||
I don't really know what you mean by 'proofen' He means "proven". Ie, established. Unfortunately, considering Monkey is literally only days old, it is a bit of a pipe-dream to expect a "proven" 3D engine for an "unproven" language. |
| ||
Noobody: Excellent work! |
| ||
Why not use the same graphics API as Unity since it already works in a browser? (might use OpenGL already..didn't research) |
| ||
thats a good lookin planet there |
| ||
Why not use the same graphics API as Unity since it already works in a browser? Unity is 'cheating' by using their own browser plugin. Said plugin is basically the same engine that is used with regular Unity applications (so DirectX, OpenGL and more are available), only that it renders into the browser window. That way they avoid having to use slow JavaScript as the driving force behind rendering and still have the full feature set of Unity available. They have to maintain a plugin for all 8 supported browsers, but if you take up to 6000$ for a license, that is well feasible :) |
| ||
That is really impressive. Nice work! |
| ||
Cool but what i would really like to see is... ...Unity. Fine, but that has nothing whatsoever to do with Noobody's showcase. They have to maintain a plugin for all 8 supported browsers, but if you take up to 6000$ for a license, that is well feasible :) LoL... match point! |
| ||
The logic that Unity is cheating because they use their browser plugin is a little bit beyond me. Anyway i didn't want to turn things down and i'm quite aware of what WebGL is but what i was trying to say is that it would be very cool if there would be an 3D engine based on WebGL(OpenGL ES2) because there is quite a difference between an 3d engine and just an API. I wrote proven (thanks for the correction) just because i'm fond of stuff that works and which is permanently supported as well. Last edited 2011 |
| ||
Wow, that's great! I'm going to have to find some time to learn more about WebGL! Defiantly looking forward to having a play with your engine :D Cheers Charlie |
| ||
The logic that Unity is cheating because they use their browser plugin is a little bit beyond me. That was a joke! Hence the single quotes around 'cheating'. I didn't mean to belittle Unity or its developers. |
| ||
looks interesting :) |
| ||
@Noobody: Is your engine open-source, and can I use it to make a module for Monkey, and include the engine source code in the module? I was planning to do a WEBGL target for Monkey, and this would be great start. |
| ||
@Lumooja: I wouldn't recommend using the engine right now, as the whole structure is still temporary. The version I'm working on right now is already completely different from the one I uploaded and is very likely to get refactored in the near future. I did plan to make it open-source, though I haven't decided on a licence yet. If the whole multi-platform thing works out, I might even make it donation ware or charge a small amount for it. |
| ||
If you are, are you going to minic the blitz3d/minib3d commands? That would be quite convenient. What is your intention in respect to the multi-platform thing? It works under HTML5, right? Or does it support other platforms as well? |
| ||
@Warner: I'm using the same basic structure with entities, meshes etc., but the commands and handling will differ in some places due to the different feature set. For example, in B3D or MiniB3D you couldn't use shaders, but in WebGL they're now mandatory. I try to hide these kind of things from the user while still allowing him access to them if he wishes to. In the shader case, for example, you may specify a custom shader for a mesh; but if you don't supply one, the module will automatically generate one for you matching the mesh parameters (textures, lights etc.). As for the multi-platform thing, I really don't know yet how well this will work. It is currently for HTML5 only, but as soon as the Monkey demo supports more than just one target, I'll do some tests and see whether it's feasible or not. |
| ||
You can use Android NDK 5 to make a OpenGL demo for Android, I could then convert it to a Monkey target for the full version of Monkey. Last edited 2011 |
| ||
The monkey demo will never support more than one target. That's the point. |
| ||
@Warpy: As Mark wrote in his blog, Monkey itself is going to be free and open source, for all targets. It's Mojo that is only working for HTML5 in the demo version. See this quote: The plan at this point is to make monkey free and open (in all respects), while charging for mojo (possibly with a free html5 version, or maybe a dual license GPL release - haven't decided on the 'demo' yet). I also asked in the "Monkey is out" thread about this, and it still holds, we just need to wait a bit longer. |
| ||
Just a quick update: It's still alive! (click for larger image) New features: Loading models, lights (per-pixel lighting, diffuse/specular), automatic shader generation, proper multitexturing. Main code for the example shown in the image: |
| ||
I am assuming we need to build our own collision engines to go with this? Very,very cool. Last edited 2011 |
| ||
The most impressive thing Ive seen with Monkey so far... well done! |