Kewl's picture

Let's say that I have a 4000*1000 pixels rectangular image that is destined to a cylindrical projection: how would I proceed to transform this image to a fisheye image for an eventual dome projection? TIA!

Comments

You could render the image

jstrecker's picture
Submitted by

You could render the image onto the inside of a cylinder (Make Tube), then place a camera (Make Fisheye Camera) inside the cylinder.

Or maybe somebody's made a PBMesh file that maps from cylinder to fisheye, which you could use with Warp Image with Projection Mesh.

Thanks. What settings do I

Kewl's picture
Submitted by

Thanks. What settings do I use for to put the fisheye at the bottom of the tube, in the center, looking up? And, there's seem to be a (virtual) light source: what do I tweak for an evenly distributed lighting inside the tube?

Thanks. What settings do I

Bodysoulspirit's picture
Submitted by

Thanks. What settings do I use for to put the fisheye at the bottom of the tube, in the center, looking up? And, there's seem to be a (virtual) light source: what do I tweak for an evenly distributed lighting inside the tube?

Not tested but if your tube is vertically set at Z=0 and has a height of 1, put the make targeted fisheye camera its position at Z=0 too to be IN the tube, set it's Y position at (-the half of the height of your tube, so if 1 at y=-0,5) and set it's direction to the top of your tube, so Y target at +0,5 for example ...

If I get your question ;)

An for the lightning does it solve the problem if you use shade with unlit imagerather then shade with image ?

So the colors do look like

Bodysoulspirit's picture
Submitted by

So the colors do look like inverted right ? Probably easier if you shared a screenshot of the composition or the composition.

For the Set Window Property does it not work when you use the node change window size attached to the Render Scene to Window Property Port ?

Byttheway, it looks great ! ;)

I realise this is an old

pbourke's picture
Submitted by

I realise this is an old thread/question, but PBmesh was mentioned and as the person matching the initials of the node ... I find myself obliged to provide the warping mesh. See attached.

I am not sure of the relative merits but since Vuo has a fisheye renderer (cool!) I suspect that looking up a cylinder is a much more general way to do it. For example the attached example is for the original question of a 4x1 cylindrical panorama, or vertical height on the fisheye of 57.5184 degrees, other aspect ratios would need their own mesh. Whereas for the cylinder method one just adjusts the height of the cylinder accordingly.

ps: The image being mapped needs to be at a resolution close to twice the window resolution or aliasing effects will occur, I think this would happen for the PBmesh as well as fisheye looking up a cylinder method.

And for completeness here is

pbourke's picture
Submitted by

And for completeness here is the GLSL shader version .... map a cylindrical panorama image onto a fisheye, assuming the panorama rises from the horizon upwards. Adjust the cylaspect variable to match the aspect ratio of the cylindrical panorama.

ps: This is my first ever VUO GLSL shader, happy to receive feedback on standards/conventions/style that I may not be adhering to.

pps: That is now three versions: fisheye render of geometric cylinder, PBMesh, and now GLSL shader. I'd be interested to know from those who might know about such things, what the best performing method is?

Hey Paul, glad to see you

Kewl's picture
Submitted by

Hey Paul, glad to see you here!

At the time I posted this, I spent some time on your website: lots of info to digest... In any case, having you hanging around here is certainly a good news for us taking a stab at dome projections. Thanks!