0 votes

I am working on a space prototype which involves large world rendering. I have taken inspiration from Kerbal Space Program in that the world is split into multiple scenes of varying scales (in my case, a background scene, miniature scene & a real scale scene). All scenes are rendered to separate viewports and ordered back-to-front so as to display in the correct order onto the screen.

Layout of the scene (image link in case it doesn't load here)

While this method works mostly as intended, I do believe the main viewport of the engine is still rendering in the background.

Is there a way to disable rendering of the main viewport in gdscript?

If not, is there currently a way to access the depth of a viewport in gdscript (I haven't found anything documented anywhere for this) so as to allow for some custom compositig (e.g. via a shader) directly onto the main viewport?

Thanks in advance!

Godot version 3.3.2
in Engine by (18 points)
edited by

1 Answer

0 votes

I ended up capturing a frame of my prototype in Renderdoc and discovered that the main viewport was not being rendered again, to my relief.

In the image below, you can see that I have three colour passes, for three separate layers/viewports, with the final colour pass being the viewport textures being blitted onto the screen.

The RenderDoc capture showing the 3 layer passes & final compositing pass(image link in case it doesn't load here)

Maybe someone can confirm but I would venture a guess that because my root Spatial node has no actual renderables or cameras (see the scene graph I pasted in the original question), the viewport does not render anything other than the viewport container (which is exactly what I need it to do).

by (18 points)
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 Frequently asked questions and 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 [email protected] with your username.