Creating "Window" to Remote Location? (Render to Texture?)
by Jack Stone · in Game Design and Creative Issues · 04/13/2012 (11:43 am) · 4 replies
I am currently working on a Space Simulator concept demo. I have opted to build a fully 3D ship interior (which is hidden behind a portal zone), and allow the player to walk around it in first person mode, and then switching the view to a Flying Vehicle for the exterior views.
This works fine, but I would like to add windows to the interior, allowing the player to see the environment outside. The problem is that the interior is hidden in an different part of the level from the actual flying vehicle, so simply cutting a window into the interior would not work.
What I need to do, essentially, is to create a "window" in the interior that looks onto a different area of the level. I am using T3D 1.1, and the solution needs to be network safe.
The best idea that I have come across is to use a "render to texture" setup, where I would create a camera at the location of the flyingvehicle, and then render that camera's output to a texture painted onto the wall of the ship interior.
I have found the updated FXSnooperGUI:
http://www.garagegames.com/community/forums/viewthread/127227
Which seems to work ok in T3D, but this renders to a GUI object, not a texture. Is it possible to easily alter this resource to render to a texture? I can't seem to find any other resources out there that implement Render-to-Texture in T3D, which is slightly unusual since this is a powerful feature.
I would appreciate any thoughts or advice on this issue, or on any other ways to accomplish what I am trying to do.
This works fine, but I would like to add windows to the interior, allowing the player to see the environment outside. The problem is that the interior is hidden in an different part of the level from the actual flying vehicle, so simply cutting a window into the interior would not work.
What I need to do, essentially, is to create a "window" in the interior that looks onto a different area of the level. I am using T3D 1.1, and the solution needs to be network safe.
The best idea that I have come across is to use a "render to texture" setup, where I would create a camera at the location of the flyingvehicle, and then render that camera's output to a texture painted onto the wall of the ship interior.
I have found the updated FXSnooperGUI:
http://www.garagegames.com/community/forums/viewthread/127227
Which seems to work ok in T3D, but this renders to a GUI object, not a texture. Is it possible to easily alter this resource to render to a texture? I can't seem to find any other resources out there that implement Render-to-Texture in T3D, which is slightly unusual since this is a powerful feature.
I would appreciate any thoughts or advice on this issue, or on any other ways to accomplish what I am trying to do.
#2
I have tried using fxguisnooper and another resource to render to a texture, and that is working on the server, but it doesn't appear to work on the client, probably because the gui's the fxguisnooper uses would not be networked.
I thought of creating an object that is client side only, and using fxguisnooper on that object, but I can't seem to find a working resource that will create client side only objects. I found one by Thomas Lund:
http://www.garagegames.com/community/resource/view/6504/2#comments
But the .zip file doesn't work.
05/17/2012 (9:01 am)
Thank you for that suggestion. I had looked at that resource some time ago, for another project, but I had problems compiling the webkit under visual studio 2010. It looks like that's been fixed now, so I might give it another go.I have tried using fxguisnooper and another resource to render to a texture, and that is working on the server, but it doesn't appear to work on the client, probably because the gui's the fxguisnooper uses would not be networked.
I thought of creating an object that is client side only, and using fxguisnooper on that object, but I can't seem to find a working resource that will create client side only objects. I found one by Thomas Lund:
http://www.garagegames.com/community/resource/view/6504/2#comments
But the .zip file doesn't work.
#3
05/18/2012 (3:56 pm)
This is what portals and zones are for, isn't it?
#4
08/18/2012 (11:09 pm)
If you ever get render to texture working I would greatly appreciate sharing how to implement it.
Torque Owner Joshua Leeming
Default Studio Name
http://www.garagegames.com/community/forums/viewthread/109335
It may give you a pointer/idea of how to go about implementing it.
Essentially it creates an image of the webpage and renders that... it might be possible to do something similar with the fxsnooperGUI, and render an image of the scene (like a screenshot) ...Whether or not this is the right approach or not, or even how it would go performance wise - I'm not sure - but it's an approach...