Announcement

Collapse
No announcement yet.

rendering a 360 Panorama (Cyclorama) to 8 screens

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    rendering a 360 Panorama (Cyclorama) to 8 screens

    Hi,
    for testing I am using the first person shooter template.
    I want to render a 360 panorama aka a cyclorama. I tried using a scene capture cube, but of course that fails because of bad performance. So, I tried positioning 8 Scene Capture 2D cameras each covering 45° FOV and that gives me quite decent performance (about 30 FPS). Just for testing I fed the output to texture targets each having a 1024x512 resolution, then created a material and rendered them to some kind of "video wall" made from 8 cubes.
    Now, how do I render all of the textures into a single large image and display it on the screen inside the view port?

    Is there a better or alternative way of doing it?

    I have got a decent setup to work with:

    Ubuntu Linux 14.04 LTS
    Intel(R) Xeon(R) CPU E3-1240 v3 @ 3.40GHz
    16 GB RAM
    256 GB SSD
    2x Radeon HD 7850 Eyefinity and 9 Displays.

    Thanks in advance!

    #2
    What you are trying to do? Some real life panorama on 8 monitors or in game panorama?
    If that is in game it is singleplayer or multiplayer? Is view trough panorama interactive (ie. can one player influence what another can see on panorama display?).
    Can this whole panorama be seen at once by one player?

    Your approach while easy on game designer side is very resource wasteful.

    Instead you should do trigonometry:
    Flatten your problem to circle and single camera represented by triangle.
    Now calculate what portion of circle that triangle camera can see. Add like 5% margins on sides.
    Render only that (ie. place single 2d camera in word and render to texture.
    Then pan that panorama circle to face correct direction.

    Math for it is very simple for situation when player is always in center of panorama, gets a bit nasty if player can move.
    But it is just elementary school trigonometry.

    PS. I would start testing with making panorama camera fov 5% bigger, matching it rotation directly to player camera rotation, then rotating panorama circle to same direction.
    This should work fine if player is in middle of panorama.
    Last edited by Nawrot; 03-23-2015, 10:43 AM.

    Comment


      #3
      It's not actually a game. It's for walking around in a maze having a 360 view. It's indeed for some real life panorama on 8 monitors. The 8 screens are arranged in a circle. The panorama can be seen at once all the time. Instead of using 8 cameras I could also get away with 4 cameras each covering 90° FOV. The player itself can only move in a straight line and does not rotate. The viewer of the panorama therefore can also only move in a straight line and the viewer's rotation never cause rotations of the player.
      I have made a little sketch to illustrate what I mean.
      Click image for larger version

Name:	cyclorama.png
Views:	1
Size:	38.4 KB
ID:	1071099
      hint: a cyclorama is a moving panorama.
      What I simply don't know right no is how to render the whole panorama at once on the 8 screens. That is, if I am going with what I have described I don't know how to render the textures side by side. I also think that using one large borderless window for presenting the whole panorama is certainly easier than 8 separate windows.
      Last edited by Blinky0815; 03-24-2015, 09:20 AM.

      Comment


        #4
        Great project.

        Forget all scene capture actors, they are not meant for quality of renders you probably need. And this would eat a lot of fps.

        Instead You should try multiplayer setup with each player covering 90deg (or 45).
        If you can setup unreal to always target same monitor, you will be almost there.
        Also with multiplayer built in from beginning you will get easy way to expand for multiple PCs.

        So set up multiplayer, make player controller send exactly same input to all pawns (that control cameras).
        For this create function in player controller that tells location and rotation of player, make all pawns register to it, and follow player location.
        At Event BeginGame assign monitors ids and add correct local rotation to their cameras.

        Then you can add some umg gui to assign each player pawn to separate (or same PC).
        Last edited by Nawrot; 03-24-2015, 09:41 AM.

        Comment


          #5
          Thanks!
          For now, I am staying with a single computer, because multiple computers will cost about 4500€ extra.
          My template for playing around is the first person shooter template. There is no multiplayer template, so, I can just add more pawns to that and follow your instructions, right?
          After reading your advice, I searched the forum and found https://forums.unrealengine.com/show...or-Punishment)
          I think I can at least learn a lot from this post.
          Btw. I just started last monday installing UE4. Before that, I have never ever used a game engine. I have been programming for over 20 years, though. I was almost about to buy Leadwerks, since it's cheap and runs on Linux. So far I can honestly say, that UE4 is an absolute joy to use and super easy to build. There is still tons of stuff to figure out.
          I will post some pictures of my setup If I get something to run.

          Comment


            #6
            Thanks!
            For now, I am staying with a single computer, because multiple computers will cost about 4500€ extra.
            My template for playing around is the first person shooter template. There is no multiplayer template, so, I can just add more pawns to that and follow your instructions, right?
            After reading your advice, I searched the forum and found https://forums.unrealengine.com/show...or-Punishment)
            I think I can at least learn a lot from this post.
            Btw. I just started last monday installing UE4. Before that, I have never ever used a game engine. I have been programming for over 20 years, though. I was almost about to buy Leadwerks, since it's cheap and runs on Linux. So far I can honestly say, that UE4 is an absolute joy to use and super easy to build. There is still tons of stuff to figure out.

            Comment


              #7
              With "So set up multiplayer, make player controller send exactly same input to all pawns (that control cameras)." you mean, that I'll take the first player (pawn) and attach all the other players (pawns) to him? I just tried this and if I move the first player (master) in the editor all of it's slaves, the attached players. move accordingly, which is what I want.
              I still have to figure out how to assign the the monitor id to the camera. Ok, I added Event Begin Play within the BP editor. I don't see how to assign a monitor ID.
              Last edited by Blinky0815; 03-24-2015, 01:00 PM.

              Comment


                #8
                You need multiplayer to have multiple pawns display their cameras.
                But you can have up to 4 multiplayer instances of unreal on single pc (i think its 4). So you can develop just with one pc.
                However i strongly recommend that you make sure this multiplayer idea will work in cooked/released game before you develop further.

                There is probably way to make multiple camera viewports without multiplayer, but that requires C++.

                Monitor ID may be problem, for monitor ID i mean viewport placement on monitor, you need read information from windows about where is which monitor.
                Then move viewport there. You could always duplicate that multimonitor setup from windows and let user point which monitor output is for which view.
                Then you move viewport to that desktop coordinates. However i am not sure if this is doable from blueprints.

                As for pawns. You need to make pawn that is camera only, and always snaps to location that player controller has exposed as variable or dispatcher or function, interface.
                Yes multiple ways to do it, but dispatchers are best for this imo.

                Ps. I also need to learn multiplayer someday, its on my todolist.
                Last edited by Nawrot; 03-24-2015, 12:39 PM.

                Comment


                  #9
                  I am not afraid of C++. I use it every week.
                  "However I strongly recommend that you make sure this multiplayer idea will work in cooked/released game before you develop further."
                  Even if it only works in the editor, it would be fine.
                  What exactly do you mean with "dispatchers"?
                  Auto possess and receive input from other players only works for multiplayer, right?

                  Comment


                    #10
                    Event Dispatchers - learn about them, they are great for many things. They are basically functions that you can bind to from other blueprints.
                    When Owner blueprint calls this function, every blueprint that registered will get event with variables passed from owner.

                    For your project:
                    - create event dispatcher in player controller, give ti variables that pass your player location.
                    - in pawn blueprints create bind (Assigned) events that point to player controller dispatcher.
                    - call that dispatcher function every tick from player controller, all pawns will receive events with updated location

                    You kind of cannot autoposses multiple pawns by single player, s you need to make this part of communication by yourself.
                    And best for this are dispatchers.

                    Ps. Dispatchers solve most of cast to problems, you cast to once at begin play, no more Cthulhu cast to mess in every single graph.

                    Comment


                      #11
                      Ok, I think I need to look at a few MP examples / projects.
                      If I take the first person shooter template and change the number of players to 4, I get 4 windows, each showing the view of a player. From my understanding, those players can be controlled by the server, why do I need an extra camera/pawn?

                      Comment


                        #12
                        You can posses only one pawn per player. They all are also on separate pcs (or in separate engine instances).
                        So you should reserve pawn and player controller for actual player.

                        Make pawn that is only flying camera. That can update its location and rotation from real player controller over neetwork.
                        Use those camera pawns to display viewports on monitors.

                        Not sure if dispatchers work over network but if they do they are best for this task of updating locations.
                        Last edited by Nawrot; 03-25-2015, 11:11 PM.

                        Comment


                          #13
                          I am currently watching: https://www.youtube.com/watch?v=TbaO...AH0YSuGqvhlSIr
                          and looking at code dealing with multiplayer.
                          One little thing. If I start the First Person Template from within the Editor, the mouse is captured all the time. I this the default behavior?
                          Last edited by Blinky0815; 03-26-2015, 01:02 PM.

                          Comment


                            #14
                            Little update: I am still learning about network and multiplayer, but I think I might get away with a super simple solution.

                            Just a thought:
                            Eventually, the player will be controlled by video tracking the viewer inside a real life cyclorama, therfore his movement will be represented by two numbers indicating a relative movement in x and y direction, which is a simple movement vector.
                            Using a listen-server, I am thinking about sending values coming from video tracking to the listen server using a few lines of c++, make them available to blueprint and then make them "RepNotify" to propagate them to the clients. Now, all network players are identical, except the fact that depending on the player-id, the camera is facing into a different direction and this direction has to be set once during start up. Later, all the players are moving into the same direction and the corrections of the movement vector depending on the initial rotation of the camera can be made due to RepNotify.
                            I am going to make a simple example, which just propagates values (read from a game pad) to other clients and displays them on the screen.

                            Comment


                              #15
                              C++ seems to make everything soooo much easier! UE4 is epic! .-D

                              Comment

                              Working...
                              X