yelocloud opened this issue on Sep 15, 2007 · 315 posts
bagginsbill posted Wed, 26 September 2007 at 8:03 AM
Hi everybody!
Cath,
I made all those pictures to demonstrate the issues with using a photograph on an environment sphere. I was trying to avoid words, as they are imprecise. However, I seem to have failed, so now I will try words, and more pictures later if necessary.
You have disagreed with me on several things that are extremely important in this context. I hope I can convince you to change your mind on them so that we can all get back to the interesting use of these images. For example, I wrote about using a virtual chrome ball in Poser to make your own IBL images that are consistent with your scene. I wrote about this more than a year ago. This is a very good idea, and I'm pleased that you came up with it as well. However, there are some refinements to the technique that I'd like to talk about. But first we have to clear up these coordinate mapping issues.
Before I get into them, I want to point out that we do agree that the angular map image we use on the IBL must be consistent with the panoramic image we use on the environment sphere. What we do not agree on is how to accomplish that.
First you have stated that I got east and west mixed up. Yet my renders show a compass as well as an image mapped on a semi-transparent sphere that are 100% consistent from all viewpoints. You have repeatedly stated that I must use a 2 to 1 ratio image in order to avoid this problem.
My last slide contradicts that. I showed you three different image maps and the corresponding render. The first is 2 to 1 as you insist must be used. The second is 1 to 1. The third is 1 to 2. Yet all three renders are identical. The ratio of the image width to height does not matter, as long as the information remains the same. Regardless of how you resize the image, if the aspect ratio of the FINAL PROJECTION ON THE SPHERE is the same, then the results are the same. I agree that if you place a circle of identical aspect ratio in those three image maps, you will get different shapes and only the 2 to 1 will produce a circle. But if you squash the circle so it is consistent with the aspect ratio of all the other objects in the image, it will end up looking the same on the sphere.
Let me put it another way. I can take any panoramic image made by anybody, and use photoshop to resize it so that it is no longer 2 to 1. This will have zero impact on the position of the things in the image. Of course the resulting change in resolution will have an impact on the quality of the render, but this has nothing to do with the position of each part of the image.
I had hoped my renders made that unambiguously clear. If you still believe the aspect ratio of the image matters, then I don't know what else to say.
Second, you said that there is nothing wrong with the UV map of the Poser Hi-res sphere. There most certainly is something wrong with it. I demonstrated in the renders that some of the image is missing. In particular, viewed from the west (looking east) you will see that one edge of the image is completely missing, and that the remainder of the image has been stretched. In all your demonstration images, you failed to show us the sphere from all directions.
You did not see this because every image you attached to your sphere in your demonstrations had no features in the U direction. You had stripes in the V direction, but no visible change in the U direction. If you only use horizontal stripes, you cannot tell if some is missing or not. An image like that proves nothing.
Please try this experiment. Pick any 360 panoramic image or diagram. Use the map of the world if you like. Apply it to your sphere. Now render it from different angles, so you eventually see every part of the sphere. You will see that part of the image is missing on the west side.
You can also demonstrate the U coordinate problem using the Tile node. Start with a new sphere. Attach a Tile node - the node that makes red and blue squares. Set the Tile_Width to .05, so that the aspect ratio of the tiles matches the aspect ratio of the UV map. Leave all the other values at their defaults. This will give you roughly accurate square shapes along the equator. With your camera facing north in the default starting direction, render the sphere. Looks good. Now orbit your camera so you are facing east, looking at the west side of the sphere. Render. You will now see that the tiles are messed up.
Look closely at how I corrected this. You must use a U_Scale of .83333 (25 / 30) to correct the problem. This is because the UV mapping of the vertices on the sphere is wrong, and as a result, 1/6th of any mapped image never appears. In the U direction, they do not go from 0 to 1 as they should.
Now orbit your camera so you are looking straight down on the sphere. Render. the north pole is completely messed up!!! I don't have a workaround for this.
Looking down on the sphere, count the tiles around a circle. There should be 20 identical tiles. It is closer to 16 and 2/3rds.
Now change the U_Scale to .041667. This is .05 times .83333. Render from above again. You will now see 20 identical tiles around a circle, as you should. But the north pole is still wrong. So is the south pole.
You may find it interesting that the Poser Torus is also messed up in a very similar way. Try various tile sizes on the torus.
Now that you know where to look for the problem, put a real 360 degree panoramic image on your sphere. Render it so you can look at the west side. You will see that part of the picture is missing, and your left and right edges form a seam artifact.
Finally, you have shown us images mapped on the environment sphere in your demonstrations. Not once have you shown what the sphere looks like FROM THE INSIDE. It is fine to show the external view of a sphere when attaching a map of the world. Ignoring or correcting the UV mapping problems, this will look mostly correct.
As I'm sure you know, when you look at the BACK of a polygon, whatever image is attached will be reversed. Just so, when you are inside the sphere, ALL the polygons are reversed. Any words appearing in your image will be backwards.
When we attach a photograph to a sphere and look at it from the inside, the photo will be reversed. This is why I negate the sign on my U_Scale. This flips the photo back around so that any words that appear in the photo are shown correctly, just as the camera saw them.
Similarly, because of this reversal, EAST and WEST are swapped. You have shown us images with your markings in the order (from left to right) North, West, South, East. But that is NOT how the compass points lay out on a panoramic photograph. Starting from the North, as you turn 90 degrees to the right, you encounter East. So wherever north is in your image, East is 1/4 of the width of the image TO THE RIGHT. Facing East, a 1/4 turn to the right leads to South. So too on the image, 1/4 to the right is South. Similarly from there next is West, and back to North. So the compass points on a panoramic photograph, left to right, are North, East, South, West as I have done, not North, West, South, East as you have done.
I understand your confusion. Looking from the outside, the words show up in the right places. But it is not correct to look at the sphere from the outside. You must look at it from the inside. From the inside, you must reverse your image, in order to have the words come out right, instead of have them read backward. Therefore, East and West must be swapped.
Finally, when you take into account the .83333 adjustment for the U coordinate scaling, the actual orientation of the image is wrong. South is no longer south. That is why I used a U_Offset in my final demonstration.
So, to sum it all up. Take your panoramic image JUST AS IT IS. Attach it to your environment sphere. Set the U_Scale and U_Offset of the Image_Map as I showed in my slides. You will now have the image correctly projected on the sphere when viewed from the inside.
I would like to address the IBL (angular map) that goes with this later. FIrst I'll wait to see if I've convinced you of the above or not. We cannot accurately discuss the IBL mapping to go with this panoramic image until we agree on how to handle the panoramic image.
Renderosity forum reply notifications are wonky. If I read a follow-up in a thread, but I don't myself reply, then notifications no longer happen AT ALL on that thread. So if I seem to be ignoring a question, that's why. (Updated September 23, 2019)