JamesTKhan / Mundus

A 3D world/level editor built with Java, Kotlin & libGDX.
Apache License 2.0
158 stars 22 forks source link

Decal Rendering System #231

Open JamesTKhan opened 1 year ago

JamesTKhan commented 1 year ago

This is not a high priority compared to some other features but adding here for discussion and possible implementation down the road before I forget.

Is your feature request related to a problem? Please describe. libGDX has DecalBatch and decal Rendering. Mundus currently doesn't offer a way to use them. You CAN use decals with Mundus projects by rendering them from the runtime but modifying them in editor would be nice.

Describe the solution you'd like Editor side, decals are already implemented (Gizmo system) which displays decals for lights in editor. A DecalComponent and decal rendering could be added too, which would be part of the runtime as well. This would be a separate system from Gizmos.

Additional context You can kind of fake a decal currently by using a plane mesh with a transparent texture, but this lacks other features of libGDX decals like billboarding.

antzGames commented 1 year ago

You CAN use decals with Mundus projects by rendering them from the runtime.

How? Where in the Mundus runtime can I access decalBatch.add or decalBatch.flush?

JamesTKhan commented 1 year ago

You CAN use decals with Mundus projects by rendering them from the runtime.

How? Where in the Mundus runtime can I access decalBatch.add or decalBatch.flush?

You don't, you would manage the DecalBatch and render the decals from the runtime. By default you wont get decals to reflect on water but if we add it in to Mundus then it will.

antzGames commented 1 year ago

By default you wont get decals to reflect on water but if we add it in to Mundus then it will.

This would be amazing. Could you add shadows too?

JamesTKhan commented 1 year ago

By default you wont get decals to reflect on water but if we add it in to Mundus then it will.

This would be amazing. Could you add shadows too?

It is possible but would need some modifications from the regular libgdx decals probably. Not sure how much of a pain it would be offhand but could look into it as part of this feature to see if its doable.