- Home /
Multiple camera One rendertexture (panoramic view) Please Help Very Important!!
hi everyone, I have been looking for days and now I'm stuck. I really need help, this is really important, for my bachelor thesis.
So I created a panoramic camera out of multiple cameras with all 10 degrees FOV forming a cilinder. I have to put the output of all of them to one renderTexture. But I can't figure it out.
So my cameras are looking just like in these examples: http://www.youtube.com/watch?v=fUZFLh9zWVs http://www.youtube.com/watch?v=SdaBJ9zgruY
I can so what this guy has done. By just creating a separate plane for each camera, put them all side by side, creating a renderTexture from each camera and put them on those planes accordingly.
HOWEVER! What I need is to have all the outputs of the cameras to be rendered onto ONE texture. Because I have a customly created mesh that is loaded dynamically and I have to put the renderTexture on that.
So far I have tried, creating a renderTexture for every camera, and then putting all those textures onto 1 other created texture, But I couldn't manage to do it. I also Tried merging the cameras by using only one same renderTexture as target for every camera. But I couldn't get that to work either.
This is my custom mesh:
On the example I did put a test texture on it, which is taken my a 360 degree camera. So I need to do the same from in game. (don't mind the jpeg compression artifacts, it's because of the file size limit here on unity answers)
So PLEASE anyone, could you at least give me some advice or ideas?? Even if it sounds stupid, please share, at this point I have nothing to loose with trying.
thanks in advance
Answer by crogersKixeye · May 21, 2013 at 11:58 PM
Can you put several materials on the mesh? might have to tweak the UV's Can you stitch the images together? or make the big texture and copy these to it. Check out hugin.sourceforge.net (stitches photos to make a panorama)
$$anonymous$$y mesh uses at the moment a custom made self-illu$$anonymous$$ated Diffuse shader with 2 different UV coordinates. One coordinates for the alpha masks (you can see on the edges of the meshes (3 of them) fading out to black, those are alpha masks. Because these are outputs for 3 projectors and those 3 meshes overlap, so that's that)
The second UV coordinates are for the texture. They are calculated through a calibration tool just like the meshes their shape.
$$anonymous$$y problem isn't with UV coordinates. $$anonymous$$y problem is creating a panoramic camera output that only exists out of ONE texture. At the moment I only managed to create a panoramic camera by using multiple cameras (And it's not the same when using 2x 180 degrees FOV)
So because I have multiple cameras, I have multiple outputs. I need them to get sideBySide on my mesh. Just like that example texture. So that my gameplay is viewable from my projectors. I hope you understand the idea.
Someone also advised me using orthogonal cameras which render joint quads each with their texture. He said the output to the camera is than one texture. I also didn't understand that well
So simply said, I have these cameras, (27 of them on the example with each 10 degree FOV): WW
And I have to put their output just like my example texture on my custom mesh.
And thanks for your reply. I literally can use ANY help
EDIT: I forgot to mention, The program you suggested doesn't help me. I have to create my output from render-to-textures which are re-calculated every frame. But that programs is just for creating one single texture just like that on my example.
Never $$anonymous$$ind, I solved it. It had to do with viewports. Will share my result/answer when I'm finished implementing it
QUIC$$anonymous$$SORT, any news? I had this working myself, for a while. Now my last camera takes over the whole RT, don't know what went wrong.
Actually, found my problem. This only works with Forward rendering.
Your answer
![](https://koobas.hobune.stream/wayback/20220613102705im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
How to specify a depthSlice of Camera's targetTexture? 1 Answer
Camera panning on pre-rendered backgrounds 2 Answers
Rendering the same Render Texture differently to separate cameras 0 Answers
Culling Mask with Depth Occlusion 1 Answer
How to make the camera render RenderTexture if the camera is in another scene? 1 Answer