I managed to got so far, that my spaceships now have a internal logic
-> Now I want to render the internal stuff then the external basically
-> -> So that if I have a cockpit with a window, I would see the outside.
To make stuff more complex, the external scene is in a 1/10 ratio.
I know where I am inside the spaceship, and the view directions
I can calculate in external space where the camera should be, and where it should look there.
Now the question is how could I archive this (This thread is kinda a brainstorming)
Ideas I had so far.
Render a cubemap with 2 180° maps, use as skybox for the internal scene, then only render the internal scene.
-> The obvious downside would be that for the outer scene everything is rendered, and frustrum culling is not working anymore.
-> Also possible renderartifacts, eg if the spaceship is formed like a U , I wouldn’t see the outside on the opposite end, as the skybox containing it would be behind.
Somehow make two scenes, render both to offscreen, then fix the depthbuffer (mosty for the interal) to be scaled as the external, and render both based on the depth information in the final output.
-> Contra, 3 passes for one frame, + additionals for shadows ect this is probably very costly.
-> Pro, the external model in the above U example would work correctly
Create for the inside some kind of BSP like system, then only render the visible inside parts, use the skybox approach for the rest
-> Downside generate BSP or similar tree
-> Should reduce rendering due to rendered insides if not visible.
Does anyone have any other idea how to do this, or what would be other approaches?