0 votes

Hello,

I am making sprites for an isometric RTS. I have an air transport unit (dropship) which carries other units outside the fuselage - they basically hang outside so they are visible when loaded and can interact with the environment (shoot, get shot, etc). Something like this.

https://imgur.com/JNaC6ps

I want to use my existing nodes and sprites for the boarded units and combine them with the empty dropship sprite using z-depth maps.

This Blender screenshot illustrates the effect I am trying to do in Godot.

https://imgur.com/a/p5rF8VT

I don't want to create dropship sprites carrying various configuration of units as I also want the boarded units to play sprite animations which would make the total frame count too high.

in Engine by (20 points)

1 Answer

0 votes
Best answer

It is possible to export a depth map from Blender as an OpenEXR floating point image, that you can then use in a custom shader in Godot to give your 2D billboard sprite depth. The custom shader simply needs to read in the depth from the OpenEXR depth image, and adjust it for the camera differences between Blender and Godot, if you have exactly the same camera setup it's a lot easier.

I describe the basics of the technique here.

https://quincytdrake.blogspot.com/2020/12/blender-depth-maps-in-godot.html

by (44 points)
selected by

Thanks mate ! Very nice article !

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.