Skip to content
Forum Archive

Spherical mapping

7 posts

Ninja.Bob#

Spherical mapping

Im fairly new at using AVS and im having trouble mapping a rectangular image to a sphere Im not sure which trans effect to use for this effect. The preset involves a texered starfield which means it re-renders each frame so a gradual movement to the sphere is no help. It tried using trans/movement and even though im sure I had the maths right the screen just flashed a solid colour. Any help on this would be appreciated.
Warrior of the Light#
Perhaps you could add the preset so that we can take a look at it and see what we're talking about and help you with the code?
Ninja.Bob#
Um basically this is what i have at the moment. The stuff after the buffer save transforms it from the flat to the sphere but i want to correct it so that a) it doesn't have the lines from the movement and b) the back of the sphere is not just the inverse of the front.

I did search for sphere but could not find what i wanted.

Also is there anyway to get AVS to render at a high res but display at a lower one?
dirkdeftly#
is this what you're looking for?

trans/movement (rectangular coordinates, wrap, bilinear filtering):
d=sqr(x)+sqr(y); z=if(below(d,1),sqrt(1-d),1);
x=x/z; y=y/z;