0 votes

I tried to follow the "3D in 2D" tutorial, but my 3D object has some animations.

I'm using a Viewport to render my 3D object into a 2D Sprite, working as intended.

But it looks like to be using the same Viewport when I duplicate it, as if I duplicated only the 3D object inside the Viewport, instead of the whole thing.

That's the tree:

When I have ONE instance of "Overworld3D" node and play an animation on "3D", it works fine.

When I have TWO instances of "Overworld3D" node, on different positions, when I play an animation on one of them, it works on both, but the other node not playing an animation appears behind both of them too! (As if it's sharing the viewport but now with two instances of "3D")

On the left, two instances of "Overworld3D" not playing any animation (but they still are one on top of the other, I've checked that, and that's the problem)
On the right, two instances of "Overworld3D", but only one of them is playing an animation (it's contracting), and it's visible that the other instance, the one still not playing an animation, is behind it on BOTH instances (???)

Any clues on what should I do?! All resources are already local.

As pointed by Dlean Jeans, setting Viewport "Own World" property solved the duplicated instance issue, but it happens to mess with environment settings, apparently a limitation regarding to "Transparent Bg" property on Viewport, but I managed to solve the problem by setting an environment to the 3D scene's Camera (I'm not sure why it's not applying the default_env, maybe an issue?)

asked Jul 27, 2019 in Engine by Zeero (38 points)
edited Jul 27, 2019 by Zeero

1 Answer

+1 vote
Best answer

Not sure if I understand you.
But try to enable the Own World property of the Viewport.

answered Jul 27, 2019 by Dlean Jeans (3,873 points)
selected Jul 27, 2019 by Zeero

This solved the duplicated instance, but models are completely black even adding an World and Environments to the Viewport. Looks like this unanswered problem.

By reading this, seems like it's impossible. It correctly displays the light when I turn off the Transparent Background option on Viewport, but now displays the default clear color around it... (as Transparent Background isn't enabled)

Solved by applying a Environment to 3D scene's Camera.

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.