2d , 3d or other approach to make this visual?

Godot Version

4.5.1 stable `

Question

Continue making RPG prototype like WoW and need to make name and bottom overlay circle :hollow_red_circle:.
This is another essential functionality in RPG to bring this classic feel, but here is thing I can’t figure out .


In my prototype text get affected by environment and it also visible under certain angle and not bright as WoW ,

For some reason it not display when there is green tile in view

I think this tutorial can help you with that. It shows you how to make a 2D item always face the camera.

1 Like

That’s really cool , thank you .

Some tip for bottom circle ?

Use Label3D for text. It has all the functionality you need. Enable billboarding and disable lighting and depth test. For circles you can use decals.

3 Likes

That’s perfect and way easier , thank you

2 Likes

This uses a full resolution offscreen buffer per health bar?! Really really wasteful. The viewport should at least be sized down to the size of the bar. But even with that, this approach scales poorly. It introduces an additional framebuffer overhead with each new bar. Not good if you need many of them.

3 Likes

I didn’t realize VisualInstance3D → GeometryInstance3D existed. Very cool. Thanks for that info. (Label3D inherits from them.) I’m curious how one would use them to implement a health bar, though I don’t want to derail this thread. Label3D is definitively the way for @iOSxcOder to go with. (I didn’t know that existed either.)

Maybe a Sprite3D with a gradient or an AnimatedSprite3D?

1 Like

A Sprite3D running a shader might do the job just fine, with instance uniform feeding the state. Even two overlapping sprites would be better than involving a viewport.

Label3D is generally great. Its only weak spot is that it doesn’t let you run shaders, at least that was the case last time I checked… in 4.3.

3 Likes

So I tried Label3D - enabled Billboarding , enable - disable depth test, shaded - off , but it clips through objects . Is there some setting to be changed to prevent to be seen through player or other world objects ?

Also this decals, how could I achieve circle , it looks rather square option .

@normalized

Enable depth test.

Decals can project textures. And textures can have alpha channels :slight_smile:

1 Like

So If I want circle to be projected it should be alpha or area around should be alpha and circle white for example ?

Same way you’d do it for a regular sprite. Just some png of a circle on a transparent background.

1 Like

https://youtu.be/zVS1Ne9JA-A fixed , thank you

1 Like