Some thoughts on render targets and using 3d in GUI

#1

Something that is not currently easy to do with Defold is setup render targets with cameras to render specific objects and then use whatever was rendered / composited in textures in GUI.

What I want to be able for it to be easily possible to do is to use 3d models within GUI in the same way as games like Dota Underground or Legend of Solgard do.

Another example would be portraits in Dota 2 or most RTS games. This specific use case would probably be the easiest do deal with since usually you only need to render 1 portrait at a time. It’s the ones where you need to render a dozen models at once out of possibly hundreds where it gets tricky.

unnamed

Imagine a model may be on a render predicate / render target just for itself to render to, so that it is possible to use that resulting texture within a GUI scene. Probably most people who know how this could be setup see how tedious it would be to do so currently. I can imagine ways of doing it but not the kind of simple just works method that beginners would be comfortable with.

This issue is something that needs to be easier to do. Features like RenderCam need to be able to part of the core (something RenderCam is lacking is it’s only really meant to render a single camera at at time and not to handle situations like this - another use case would be like rendering what a security camera sees in a game world), the camera components need to have features, features like render targets for situations like this need to be as easy to use as setting a camera component to render to a render target slot with whatever settings, and that render target slot’s texture being immediately usable within GUI nodes or even elsewhere. Even better if the engine can smartly reuse render targets of the same size.

Again at the moment I’m confident this is possible however the way it is possible is cumbersome and not newbie friendly. It may still be worth it to try to implement systems like this with the available features so what’s missing is more obvious. Looking at other engines like Unreal or Unity may be useful.

This thread is not really useful I just wanted to talk about this issue some because it would be useful for many game applications to be easier. :smile:

11 Likes

#2

It seems like rendercam itself probably needs some improvements. The code is public domain anyways, so someone could probably create a new project which improves the feature set there. However, I do agree that it would be ideal if Defold incorporated more advanced camera features in the first place. For an advanced game the builtin camera setup isn’t very useful.

1 Like