cubemap to fulldome / fisheye shader

Guyz,

can you try to render some geometry with HDR assigned to environment map and look to the cubemap, are the seams of HDR map visible?

Can you post an example Sheff? I’m unable to reproduce your problem. You shouldn’t be able to see seams in the original HDR map though. If you do then they are going to show up in your final render

Could the cubemap to fulldome shader be used to render pre-rendered cubemaps to fisheye masters? Im experimenting with new Corona Renderer in 3DS Max which has no spherical camera yet.

Re: Seams

You can get rid of the seams if you change the vertex shader for the surface you are rendering. The environment map and rim lighting is based on camSpaceNorm in the default PhongMAT.

You can change this snippet to have the envmap and rimlights based on the surface’s worldspace normals:
In vertex main():

[code]//Default:
vec3 camSpaceNorm = uTDMat.camForNormals * TDDeformNorm(N).xyz;
vVert.norm.stp = camSpaceNorm.stp;

//Instead, for cube map rendering
vVert.norm.stp = TDDeformNorm(N).xyz; // not camSpaceNorm.stp[/code]

my problem is how to take an input of fisheye fulldome images and turn them into a cubemap - i.e. five separate images i can then put through 5 projectors and map/mask them to fit a dome?

Normally you would want to split, warp and blend from fisheye rather than cubemap. Do you plan to send each individual face to projectors?

i don’t understand why i would want to warp to fisheye then unwarp to projectors. there is a lot of distortion and detail lost at the edges of a fulldome image. i’d rather not warp to fisheye at all with 3d content… BUT with video i have captured with my 4.5 sigma lens, i would need to unwarp it to mix with the realtime objects, then use a camera rig of the corresponding projectors.

so to answer your question, yes…

For a start you will be loosing a ton of pixels projecting a square image from each unit but the real issue is how do you set up projectors to replicate cubemap positions? Splitting and warping from fisheye allows you to choose projector placement, geometrically correct and warp and specify what each unit should output, i.e. spanning multiple cubemap faces.

problem with fulldome is you are 1. putting a circle within a rectangle (creating a lot of blank space) and 2. stretching the edge pixels to infinity then unstretching them in the projection.

So I’ve playing with Steve Masons uber cool Evil Space Flame patch for fulldome projection using Bergi’s great cubemap to fisheye file. Occasionally the cubemap faces become visible however. I’ve attached a file if anyone wants to have a look.
cube_to_fisheye 4.toe (12 KB)

This is great JonathanK, thanks for sharing!

I’m trying to recreate this effect but using flat 2D Images onto flat screens in an attempt to do some non-standard image transitions.

I am having trouble sorting this out, can you offer any tips to help out a GLSL-noob?

I’m working with LED screens that are fairly low-res, 512 x 512, to be exact and the images range from standard people pictures to corporate logos.

Thanks!

I’ll mention that there is a new Projection TOP in the 50000 series of builds that does some work like this as well.

This is good to know. I’m comparing both Projection TOP and This fisheye shader and I do not notice a difference in performance however.

I have a question. For a fish-eye field of view that does not require the bottom side of the cubemap (I’m using 210 degree) would it be worth the trouble to hook up 5 cameras to a Cubemap TOP in order to not process the unneeded 6th side?

Edit: I tried it out. The 5 camera setup drops my frame rate by 10 fps so it’s heavier… but it does offer additional options in terms of “breaking the illusion” by adjusting each camera in a different way. I assume automating the 5 cameras could also make this system even slower.

That’s a good idea, parameters in the Render TOP to turn off rendering particular Cube Map sides would be helpful.

That would be great Malcolm! The vertex shader Fisheye 180 Render Top is good but without serious tesselation does not work.

Hi all, I know this is a very old thread but I was hoping I could find some assistance in converting the shader in this .tox for use with current GLSL versions as texCoord is depreciated now. Any input would be greatly appreciated!

I am wondering the same thing, but for 2022.29850 version. I don’t know GLSL yet but is there any easy process for updating this shader? Looks like a useful program. Thanks for any advice, gurus.

Hi there,

You can also use the ProjectionTOP nowadays which does almost the same. Though in any case I also updated the shader to run in the 2022 version. (gl_TexCoord.xy == vUV.st, and textureCube() should be texture(sTDCubeInputs[0],…)).

Cheers,
tim

cube_to_fisheye.tox (6.1 KB)

Thank you very much @timgerritsen! I shall try this out. Much appreciated.