Cylindrical projection to fisheye

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!

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 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 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 ?  

1 Like

Thanks @Bodysoulspirit.

1 Like

Image to be mapped to the tube

Tube through the fisheye


Thanks!

And to finish, I can’t figure out how to configure the Set Window Properties the in the Render Scene to Window node to make the window square, like 1000*1000 pixels.  

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 ! ;)  

1 Like

The colors are different because it’s not same moment: the colors cycle through the whole gamut. The composition is for visualizing Ambisonics B-Format audio. The screenshots are showing a rotating pink noise.

Thanks for the Change Window Size cue. And the compliment.

1 Like

This is what it looks like with actual music, in Ambisonics B-Format.



 

2 Likes

It’s very beautiful man ! Mesmerizing. Must be really gr8 on a dome !

Thanks! As for the dome, I have to use my imagination at the moment…

1 Like

https://vimeo.com/courville/waitingfordomo

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.

Archive.zip (295 KB)

1 Like

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?

cyl2fish shader.zip (236 KB)

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!