Hello Ventuzians!
THE FORUMS ARE CLOSED!

Please join our discord server HERE!! << click me :D

We are shutting our Ventuz Forum, but don't worry, it will all be archived for you to search in if you have a query. From now on, please add all your comments, questions or observations into our Discord Server

Thanks for the great time - see you on discord!!
Dee, Karol, Daniel and the whoooole Product and Support team!

Shader for rear sphere projection

Q and A about functionality and how to solve a special task for your application.

Moderator: Support

Post Reply
in_ty

Shader for rear sphere projection

Post by in_ty » 05 Dec 2013, 14:46

Hi everybody! I need to create a content for the rear projection sphere. So I need to put everything to the render target and then apply a shader, which transforms coordinates to polar, to the texture. I am absolutly nube in shaders and have no time to learn them before the event, maybe somebody can give an advice, what is the best way to solve a problem? I've found this shader for vvvv http://vvvv.org/tiki-download_file.php?fileId=2063 but it doesn't work correct in ventuz, or maybe I am doing smth wrong...

User avatar
Götz_B
Posts: 180
Joined: 21 May 2013, 13:01

Re: Shader for rear sphere projection

Post by Götz_B » 06 Dec 2013, 12:57

Hi,

how should your expected result look? And how does it differ from the shader output?
Can you post a pre-post picture as an example?

Regards,
Götz

joysprod
Posts: 201
Joined: 20 Jan 2012, 12:24
Location: United Kingdom

Re: Shader for rear sphere projection

Post by joysprod » 06 Dec 2013, 19:35

Im guessing that In ty is wanting to do something similar to the "Pufferfish" sphere projection? http://wiki.openstreetmap.org/wiki/Pufferfish_Display

Pufferfish is a system of using a media server (Coolux have written a distort filter) to project inside a sphere with an extremely wide angle lens from a single projector. To make this work you have to take an Equi-rectangular-projection and convert it to an earth-azimuthal-projection. It should then project correctly inside the sphere.

I dont know what is coming in the later version of Ventuz with warping and blending?

Regards

Peter

in_ty

Re: Shader for rear sphere projection

Post by in_ty » 06 Dec 2013, 20:04

Yes, joysprod is absolutly right! Here is my example in vvvv Image

User avatar
Götz_B
Posts: 180
Joined: 21 May 2013, 13:01

Re: Shader for rear sphere projection

Post by Götz_B » 09 Dec 2013, 11:22

Ok... i just asked because thats exactly the output your posted shader produces.
You probably did not set all needed input values properly. The Shader need a Texture and a Matrix. The texture comes from a Texture Loader of course. I took a Camera to provide a standard ViewMatrix to the shader.
MipMaps can produce unwanted effects here, so try to set GenMipMaps to False on the TextureLoader.

BUT:

You can achieve almost the same result without the need for a shader. Just take a Circle and set the Texture from Flat to Wrap. You need to increase the Tesselation to get proper results. Plus, i needed to adjust the Scaling of the Texture Mapping to -1 because the texture was mirrored. If needed, scale the Circle according to the aspect ratio of your texture.

The result is the same, but without the distorted parts that are not part of the picture anyway.
Attachments
CircleWrap.png
Shader.png

Post Reply