+5 votes

I'm trying to use room to optimize my 3D scene. From what I understood, everything inside a room will be hidden to the player unless he is going inside.

A portal can be placed somewhere in the room that will allow to render only the object visible throught the portal.

When I added the room it seems to work fine and objects inside are hidden unless the player goes inside. However the portal doesn't seems to work or do something. I'm not sure what's wrong or if I didn't understood the concept of room+portals. I included a basic scene to show you the problem.

https://drive.google.com/open?id=0B9jjDvqB8YxFMURVR0lveWd0XzQ

Thanks for your answers

in Engine by (34 points)

From what I understand, portals are only used to allow other rooms to see the content of a near adjacent room, sort of like a hallway to another room.

Not 100% sure though

1 Answer

0 votes

Portals do not "render only the object visible through the portal."
They simply cull the room if the camera is outside the room or if it's looking away from the portal.

So In your example it should look like this:

Portal/Room Example

A camera has to be in a room for portals/rooms to work.

You can also do something like this if you want to create a cave/outside inside system:

Example Portal/Room
Rather than having two rooms next to each other, this has one room surround another and have portals look into the two rooms, like looking into a cave from outside.

by (14 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 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 webmaster@godotengine.org with your username.