Tremulous Forum
Media => Mapping Center => Topic started by: MrFish on June 02, 2010, 02:35:20 am
-
Ok, my original question was fixed but now I've got a new problem. Again, I'm making cameras in my map with live feed from the game. I've got 4 tvs in one room pointing to 4 different cameras. Each works but the first camera writes the view over all the tvs. If I try deleting the first camera the second camera writes over all the screens. How do I make each camera to it's own screen? I've tried making multiple shader textures (tv1, tv2, tv3) but I get the same problem.
(http://img121.imageshack.us/img121/421/28312704.png)
-
This is a renderer limitation. The renderer can neither show a camera/mirror inside another camera/mirror nor can it show multiple cameras/mirrors in the same view.
-
So I should rotate the other tvs slightly? I don't understand what you mean.
-
No, whenever you see multiple mirrors or cameras on the screen, they will always show the same scene, there's no way to avoid it (except if you arrange the TVs, so that the player can only see one at a time).
The technical explanation is that when the engine renders a camera surface it draws a full-screen view of the scene from the camera position, then clears the depth buffer and then draws a transparent surface for the TV screen. This means that the further surfaces overwrite everything outside the TV surface, because these pixels are at maximum distance, like the skybox.
But when you have more than one visible TV screen, the second one will clear the depth buffer again, so the contents of the first TV screen are then overdrawn !
-
Ok thanks man! That's a huge help :)
-
What I have done to work with this limitation is to make one screen display the camera view, but have the others 'offline'. You could write a shader to simulate a static effect with a black & white noise texture.