Theory: Warping Questions

Navigation:  Pandoras Box > User Interface - Master > Tabs Overview > Preview > Mesh Editing Mode >

Theory: Warping Questions

prev main next

Navigation:  Pandoras Box > User Interface - Master > Tabs Overview > Preview > Mesh Editing Mode >

Theory: Warping Questions

prev main next


This chapter covers warping questions related to the Mesh Editing Mode in the Pandoras Box Preview and the warping process in general. Whilst the next chapter explains step-by-step the practice, this chapter is all about the theory.
For other topics regarding the Preview tab please see the introductory chapter. If you are interested in the Warper tool, please follow this link.

Projector and Lens Setup

Before the warping process can start, you need to make sure, that the projectors are setup correctly. This includes the physical projector position as well as settings like lens shift, zoom and focus. Hint: Some operators prefer to reset the projector to the factory settings before they start working as this makes sure that no hidden setting is overseen.
Position-wise, the projected images obviously need to cover the screen entirely. If you do the blending in Pandoras Box, the overlap (at the smallest distance!) should be a minimum of 256px due to the internally used 8bit gradient. If you divide 256px with the projector resolution and multiply this with 100%, you get a more handy percentage number, e.g. roughly 13% for HD resolution and 25% for XGA. Many projectors have internal grid test pattern that can help finding a nice overlap; simply count the horizontal grids and if you know, that the overlap is 25% it's obvious that at least a quarter of all grids must overlap each other. Further down it is explained how to calculate and measure the overlap in meters. A smaller overlap is not recommended as it becomes harder to blend both projectors seamlessly. More overlap eases the softedge process but the larger the projected image is zoomed and the more pixels are "outside" the screen, the less resolution you have "on" the screen. Thus, the goal is to find a good position where you do not loose pixels but cover the screen and at least the minimum overlap area.
In regards to quality and final resolution, it is always better to spend time with positioning the projected image using the available hardware tools in difference to correcting a bad position with too much warping and masking.
For blending both projectors, it is important that color and brightness are equal. As you can not increase the brightness from a darker projector, the reference is the worst projector.
Last, check whether the resolution is set correctly in the projector and the Client's graphics card. Please keep also in mind, that the PB Client software should be closed and restarted when graphics card settings are changed. Ideally, you should check that the Client's output settings are reported correctly to the Master. Go to the Configuration tab > Render Engine and select the Client in the top drop-down list.

If one of the mentioned points has to be changed later, you have to redo the warping! Especially for fixed installations, EDID Managers guarantee, that the resolution and frame rate do not change due to a unforeseen shut down, power loss etc.

Screen Measurements and Markers

The example from the tutorial refers to a projection on a flat wall. However, all surfaces - no matter whether they are bended or include corners - work in the same way. Just keep in mind that your measurements refer to the unwrapped width and height of the surface. In other words, you always follow the geometry of the surface as shown with the green line in the image.

For measuring the screen, the overlap or projection area, or the center of it, it might be needed to place markers on the screen. Even though it is not absolutely mandatory to do this, you will notice very fast that markers help a lot during the warping process. The time that you invest in measuring and marking important points will pay off later as the warping itself will be easier, faster, less sensitive to errors and most likely result in a better quality. Especially the risk of warping wrongly due to a bad perspective position is limited. Without markers you can only rely on your optical perception and depending on your position, the projection and surface it can be very hard to see whether a line is really straight, whether a grid is uniform and whether distances are even. How you place markers or how many you need can not be answered in general as this depends on the projection, the environment and your personal preferences and skills. Markers can be drawn (more or less permanently) with a pencils or pen or any paint which even includes ultraviolet paint that only becomes visible with a UV lamp. Markers can also mean tape strips that are attached temporarily (and can be removed nicely). Lastly, you can use a laser distance meter for temporary markers. There is a wide choice of different laser solutions; many operators prefer using cross line lasers with tripods. For screens that are far away or very large it is useful to work with (video) cameras.

Overlap and Aspect Ratio

The softedge area refers to the smallest area where two projectors overlap. For the depicted example, this would be the hatched area. If you do the blending in Pandoras Box, the overlap should be a minimum of 256px due to the internally used 8bit gradient. If you divide 256px with the projector resolution and multiply this with 100%, you get a more handy percentage number, e.g. roughly 13% for HD resolution and 25% for XGA. However, sometimes it is needed to calculate (or check) the overlap very exactly or maybe you would like to place markers and you need a number in meters that you can measure.

In the left example, the horizontal resolution is 2048px. If you measure the projected width, divide it by 2048px and multiply this with 256px, you get the distance for the minimum overlap. For example: 2048px = 3m and 256px = ?m; ?m = 3m / 2048px * 256px = 0.375m
If you cannot see or measure the entire width, you can of course substitute the numbers, e.g. with half of the resolution and half of the width. Keep in mind, that the results gets less accurate the smaller your reference distance is.

Now, let's look at the possibilities regarding the aspect ratio for projections without preplanned content that matches the screen. For this example, let's assume it is not possible to align the projectors better so the above image shows the starting point for the warping process.
Looking at the red projection first, the right side needs to be aligned at the right side of the (hatched) overlap. The top and bottom are now defined by the screen area. The left side needs to be shifted in such a way that the squares in the test pattern stay even. The test pattern shows a 4x3 grid because our projectors also have a 4x3 aspect. For the blue projection the same criteria apply, laterally reversed of course.

This image depicts the ideal (intermediate) result. Note that a square in the red projection has the same height as width and also corresponds to each blue square. If we applied a circle image or Text Input to a Layer and moved it around, it would be perfectly even everywhere on the screen.

However, with this result we obviously overshoot the screen. We cannot move the left and right side in, because this distorted the final aspect ratio. One solution would be to blank both areas. You can either apply a black image to a Layer and position it accordingly, or draw a mask that covers both sides, or apply a "Crop" effect to the Output Layer. Another solution is to use the possibility to change the aspect ratio of the Camera in the Camera Inspector. Simply measure the "on-screen" width depicted with the red and blue arrow and enter this with the on-screen height in the Inspector. This is also possible when the content was prepared with a certain aspect ratio. In that case you just need to make sure, that the projector covers the screen according to the plan and use this aspect ratio in the Inspector.
The units do not matter as the ratio is always the same, meaning that 4:3 has the same result as 1024:768 or 2048:1536. However, the entered numbers must be whole numbers, hence it makes sense to measure in centimeters. For the left example the measurements result in an on-screen width of 233cm and height of 187cm hence we enter "233" and "187" into the Inspector. The area that is now seen by the camera is exactly the area that needs to cover the screen. If you start with this workflow, it makes much sense to use a test pattern in the aspect of 233:187 and the total width of the output resolution. This is because Pandoras Box always refers to the horizontal width, so any new aspect will always cover the horizontal width and the height adopts. In our example, the output resolution is 2048px. Hence the ideal test pattern should be 2048x1644px according to this calculation: 2048 / 233 * 187. In the tutorial we do not use custom test pattern but keep working with the default ones which requires one more adoption.

If your test pattern or content was pre-defined and has a different resolution, e.g. 2000px, you can either scale the Layer with the factor 2048/2000=1.024 or reduce the Z-distance from the camera to the Layer. The default distance is -3000px, so the new distance would be -3000px / 1.024 = -2930px. Of course, you can also adjust the numbers by eye, without the need to calculate them exactly.

If you would like to practice this to get a better understanding, you can do this also with a small projection, for example with one projector on a piece of paper. Draw an area on the paper and try to find the best and fastest way to project an image there using the above explained workflow with the Camera Inspector. Advanced users can also adopt the pixel conversion factor under Configuration tab > Unit Management.

In case the screen is wider than above, and the images do not fill out the screen they must be warped differently. Align the outer edges with the screen edge but again, keep an eye on the aspect ratio so that each square stays even.
The result will look like this: we overshoot the screen vertically. Again, you can either blank this area out, or measure the on-screen width and height to change the aspect mode in the Inspector which is the recommended way.
For this example, the projector's overlap is larger which makes two solutions possible.
This would be the result if the FFDs are adjusted starting at the overlap edges and covering the screen. Just as in the last example, we overshoot vertically and can either blank the bottom area or better, adjust the Camera's aspect ratio.
This alternative would also be possible. Here the FFDs are adjusted referring to all outer screen edges. The disadvantage is that the overlap is reduced but if it is large enough anyways, it is a feasible, acceptable and fast warping solution.

Test Pattern

Needless to say, it makes sense to use images as test pattern that cover the entire projection area and match the resolution of the content used in your show. In the best case, you have at least one background image that suits the needs of a test pattern. This means that it features circles and / or grid lines to make sure, the projectors overlap perfectly and form an image in the correct aspect ratio. Different colors and gradients help during the softedge process. If no images are available, you can also make use of the Stock Assets content found in the Assets tab. The sub folder "Testpattern" includes different test images in all kinds of resolutions. At best, you get familiar with an image editing software and workflows to create test pattern that suit your needs. Then you are flexible and prepared for the worst case as you can prepare or edit test images that fasten your warping work significantly and increase the quality of it.
It is also worth, to get familiar with the Mesh count setting. Each Mesh consists of horizontal and vertical lines anyhow so you can also orientate the warping by these lines. The following two paragraphs explain this in more detail.

Mesh versus FFD

This paragraph describes the difference between a Mesh point (Vertex) and an FFD point, thus it is covering a fundamental function of the warping process.
The pictures below show a 2D plane with a green-colored 10x10 Mesh and orange-colored 3x3 FFD.

See here the differences between moving a FFD control point and moving a Mesh point. Please note that the FFD is only a helping tool to set up the Mesh, you will not see the FFD in the final object.

_img5036This shows the grid without any editing. The green lines represent the Mesh, the orange lines the FFD.

_img5037The top left FFD control point is moved further down. The whole Mesh is affected by this change: the horizontal lines are bend together on the top left side, the Meshes outline gets curved.
This effect can be of advantage or disadvantage. In the beginning of the warping process it can simplify and accelerate the workflow as it is not necessary to move each individual Mesh point. The further the warping process develops the more it is necessary to apply changes to particular pixels only. At this point the FFD is not sufficient any more as it affects large areas of the grid.

_img5038Now only one Mesh point is moved. Only the segment lines between the moved point and the four neighbor Mesh points are affected by this.
The more you are experienced with warping the better you will be able to answer the question how many Mesh points a grid should have. This differs from application to application. If too little points are chosen it won't be possible to apply the detail changes that are necessary. This is especially crucial when setting up Meshes for a softedge projection as the pixels must overlap each other exactly in the overlapping area.
If too many points are chosen, the warping process is lengthened unnecessarily as all points must be adjusted.

Setting up FFD Control Points and Mesh Segments

Before you start moving the control points you have to decide with how many FFD control points and Mesh segments you want to work. The FFD and Mesh count is set up in the Sub Mesh Inspector. The perfect amount depends on your screen surface and outline.
The more warping projects you have done, the faster you will be able to tell the best FFD and Mesh count. If you are not sure in the beginning, simply make a guess and start warping. You will see quite fast, that you have picked too many or too less FFDs. Too many FFD points are not that bad, you simply spend more time in the FFD-phase but you could save time during the Mesh-phase - at least if not way too many FFDs were picked. If you have picked too less FFD points you will notice that you will have to move Mesh points at a very early stage of warping. This will definitely be more time-consuming than starting all over with a new Mesh. In addition, it is easier to obtain a good quality Mesh with FFDs instead of offsetting single Mesh points too far. If you would like to, you can save the current project and have a quick look whether a new Mesh with more FFDs does give you better results and eases your work. This can be found out in a few seconds but save minutes or even hours.


Example 1, a 4x3 FFD
A simply bend screen will go well with only 3 vertical FFD control points. Horizontally there needs to be done more warping, thus 4 FFDs work better. The more smooth the outline has to be, the more horizontal Mesh segments you should take. In this case there are 20 Mesh segments.


Example 2, a 6x3 FFD
Curved screens that are more complex will be easier to handle if you increase the amount of FFD control points. In this case there are 6 horizontal control points and still 3 vertical ones.
The curved outline of the Mesh is the result by only moving the FFD control points.


Example 3, a 5x5 FFD
Spherical screens are bend in all directions. They require to increase the amount of vertical FFD points as well. In the depicted example a Mesh with an 5x5 FFD is shown. If the projector looks straight on the equator, the Mesh deformation will be quite homogenous and the FFD should look similar to the example.

The amount of Mesh segments can be altered as long as working only with the FFD control points. As soon as a Mesh point is moved, the amount should not be changed any more as this will reset the Mesh and your changes will be lost.
In general, the amount of Mesh segments depends on how exact the warp needs to be. Firstly this is a question of how complex or detailed the screen is, including the outline, as shown in the above example with the simply bend screen. If the screen is quite flat itself but has a very detailed outline, it could be a faster solution to create a mask instead of increasing the Mesh count.

Secondly, it is important whether you are projecting with a single projector only, or if several projectors overlap each other. Within the softedge area the pixels from both projectors must overlay perfectly. This requires a higher Mesh count. As a rule of thumb, at least 7 Mesh segments should lie within the overlap area.

Many operators prefer to change the Mesh color for different outputs using the Inspector for the according Sub Mesh and its setting "Editing Wireframe Color". If you choose for example a red Mesh for one output and a green one for the other, it will become much easier to warp the overlap as both lines add up to a yellow color. However, please note that sometimes you can not bring the lines together. In those scenario your goal is to get the mesh lines parallel and with an equal distance. An example would be if you need to get the largest possible overlap and the amount of segments in the blend area cannot be a (reasonable) whole number. E.g., if the output resolution is 1280px and the overlap needs to be 400px and not any smaller!

By the way, it could be helpful to work with Mesh segments that have the same height as width because it is easier for the warping operator to see whether squares (in difference to rectangles) are equal. It also makes it easier to measure the screen and place markers. If your projector has an aspect ratio of 16:9, you could set up a Mesh count of 16 by 9 during the FFD-phase and increase it to 32 by 18 or even 48 by 27 before starting the Mesh-phase. As explained above under "Aspect Ratio", it is also possible to use the aspect ratio of the Camera or on-screen area, respectively.
With the rougher Mesh it is easier to see and get equal squares whilst moving the FFD points. Hence you have a very good basis when starting to work with the Mesh where the higher Mesh count might be needed because of details in the structure or an overlap with another projector. Doubling or tripling the Mesh count has the advantage that your markers on the screen still refer to existing Mesh lines. Alternatively you can also work with textures that show different grids as explained above under "Test Pattern".

The next chapter features a warping tutorial.