Making a dedicated topic for this. Personal research and work in doing 3d game development with Defold. I’ll mostly post links to resources, show progress with working with Defold, and we can discuss and learn together for anyone who wants to participate.
http://thebookofshaders.com/
Been doing a bunch of research all over the place. Defold has/used to have more plans to have a Light component, but I’ve read that it shouldn’t be used. I’d still like to have easily placed lights for scenes in the editor. Not just for 3d but also for 2d projects. These days 2d games often do have lights shading 2d textures.
Tools like http://www.snakehillgames.com/spritelamp/ can make many cool effects possible
There’s also https://www.codeandweb.com/spriteilluminator
And http://www.2deegameart.com/p/sprite-dlight.html
These effects should still be possible to accomplish with Defold as is. I’ve also found it is apparently possible to define more textures manually beyond what editor allows (although it’s not something built in importer does). Need to test these!
I’m doing 3d dev for a project here at King.
Rundown:
Rendering 3d is perfectly possible - even with things such as dynamic shadows (I’ve seen it)! However you have to do ALL of the hard work yourself. As it is today, Defold has very poor 3d support for people who are new to game dev (something I want to change). What do I mean by this?
-You need to create your own shaders from scratch. (Lambert, Blinn, etc)
-You need to setup the render script by yourself. Afaik, the render script examples in the documentation are not the same as the one you get on a new blank project in Defold - so even if you follow the docs to the character, you still only end up with a black screen. This has been reported and will be fixed. In general though I think that the render script is quite a big problem for new users, as you need to understand how the graphics pipeline works (I am still struggling with this).
-You need to setup the camera by yourself. By default you get an ortographic camera when starting a new project. For 3d perspective however you wanna use vmath.matrix4_perspective() - http://www.defold.com/ref/vmath/#vmath.matrix4_perspective:fov-aspect-near-far
On top of this, there are a few things that Defold currently does not support, such as normal maps, vertex colors and the ability to modify mesh components via code (other than in a vertex shader that is).
I think that in an ideal world, a new user should be able to setup say… a 2.5D platformer without too much hassle. I think that is one of the goals we need to have.
Last but not least: Keep this thread active! Share your discoveries!
EDIT: If you happen to know a skilled graphics programmer, have them apply to us please We currently have a position open for an Engine/Graphics Programmer on Defold: https://apply.king.com/vacancy/c-developer---game-engine-stockholm/941/description/
It would be useful to have an option to make the Scene Editor allow normal 3d scene controls such as scene camera rotation. More features that the Unity or Unreal editors have would help. I am happy that Defold treats 2d as first class, but if I can make 3d projects with it too then I would strongly prefer it over other tools for any low poly stylized 3d project not heavily using advanced 3d photo-realistic like features. It would be ideal for most mobile focused games over Unity or Unreal.
I’m very motivated to help get more of the 3d features more accessible too. I promise to keep posting once I have more ready! I hope to see more from others too!
For one project, I have baked ambient occlusion using xNormal, and then merged it into the diffuse texture. Despite being completely flat, it still looks pretty good.
With more 3d support, Defold would be killer for making games like Hearthstone or any board game made into a computer game with 3d elements.
http://wiki.polycount.com/wiki/Texture_types
I’ve not tested it yet, but just wondering is the Cube Map File functional? There is zero info about it anywhere on the site. I suspect it is older like the Light and not supported and I’ve been meaning to try it out.
The new examples has a better 3d shader, and a phong shader. The 3d glasses effect can be easily turned off in the render script.