This release includes a couple of fixes enabling better error handling in native extension builds and when hot-reloading shaders. We have also added launch image options to game.project for iPhone X and some that were previously missing.
Engine
DEF-2739 - Fixed: Better error handling when reloading invalid shaders.
DEF-3035 - Fixed: 3D physics objects can now be spawned with a scale != 1.
We are working on a feature that will make it possible to add resources (textures, texturesets and materials) as script properties.
This together with the built in property texture0, and some new properties for material, textureset and texture[1..7], this will make it possible to switch both texture, textureset and materials for renderable components at runtime.
Render Targets with texture resources
We are investigating a way to use texture resources as render target attachments. This means it will be possible to set a texture on a drawable component (sprite, model etc) in the editor, while using the same texture as color attachment for a render target. It will make it easier to create post processing passes without having to do a lot of manual setup in the render scripts. It will also be possible to get the sampler name (as specified in the material file) to texture property name (texture[0..7]) for material resources, making it easier to set textures for their correct texture unit as expected by the material.
Particle stretch and particle orientation along movement direction
The idea for this feature came from a hack-day where the idea was to make it easier to create more advanced particle effects, such as sparks flying or a jet engine flame.
This resulted in two new features currently being implemented; an option to orient particles along the direction it is moving in, and adding a keyable particle property “stretch” where the stretch property can be set according to particle velocity (making it part of the simulation) or fully custom controlled with keys in the curve editor.
Here’s a quick test with regular sprites but with an additional normal map texture and a custom material and shader to do the light calculations. This is way easier with the new upcoming features.
This looks so good, i can’t even. A couple of questions:
If i have a flipbook animated sprite, can i pass the corresponding normalmaps for each sprite?
Can i, on the other hand, pass one texture, which will stay the same for every sprite from animation? Some color lookup texture for example, or other stuff i might need in the custom shader.
Can i change this second texture dynamically? Not to some rendered texture, but to some (other) texture from the assets?
Tutorial will be awesome, but plain sources of some demo on github should do just as well.
I would love to see how you did this, @sicher ! I’ve tried to make such an effect in Defold already, tinkering with normal maps, but the results weren’t even close to this Moreover, which tool do you use to create normal map? I’ve tried with Crazy bump because it’s free, but I saw commercial Sprite Lamp and Sprite DLight in action and they look great
We had an almost finished version of multi texturing, but decided that it wasn’t good enough. It’s been put on the back-burner, but we will definitely do a retake and ship this during the autumn.