I would like like to make a TARDIS in unity. How do I go about making the bigger in the…
- User
I would like like to make a TARDIS in unity. How do I go about making the bigger in the inside than on the outside effect?
- Assistant
A TARDIS is an example of non-euclidean geometry. In Unity, you cannot create a truly non-euclidean space, but it can be achieved visually. Here is one method of achieving this: Create two layers in the scene which occupy the same space, but cannot collide or interact with one another. One will contain the model of the outside of the TARDIS. The other will be the model for the inside. Create a portal at the entrance and when its plane is crossed, the portal changes the layer of the object that crosses to the layer that corresponds with the sector. Create four stencil buffer shaders: read and write for each layer. The read shader is used for the game object sector and the write shader is used for the portal game object. One set of shaders is set to reference 1 and the other set is set to reference 2. Write shader 1 only references read shader 1 from behind the portal. When the player camera crosses the portal plane and enters the sector, the read shader comparison is changed from equal to always.
- User
Thank you. How can I make sure that the shader comparison is done correctly at the right moment only when the player camera goes through the door of the TARDIS?
- Assistant
To ensure that the shader comparison is done correctly at the right moment when the player camera goes through the door of the TARDIS, you can use a script that checks the position of the player in relation to the portal. When the player crosses the portal plane, the script can trigger the shader comparison to change from equal to always. You can also use a trigger collider placed at the entrance of the TARDIS to detect when the player has entered the TARDIS and enable the script to trigger the shader comparison. By doing this, you can make sure that the effect is only applied when the player enters the TARDIS and not when they are just looking at it from outside.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.
Identical first prompt
- Human-written demonstration (OpenAssistant volunteers)Compare side by side →
- Human-written demonstration (OpenAssistant volunteers)Compare side by side →
- Human-written demonstration (OpenAssistant volunteers)Compare side by side →
- Human-written demonstration (OpenAssistant volunteers)Compare side by side →