Mapping 2d square to a patch sphere
  • skyvat
    activ8 member
    Posts: 54
    Joined: Thu Jul 08, 2004 10:19 pm

    Mapping 2d square to a patch sphere

    by skyvat » Sun Nov 06, 2005 6:57 am

    Hopefully someone's done this already and can give me a few pointers.

    I'm trying to create a rectangluar image that will map smoothly onto a 3d sphere without having major distortions. At this point it seems that sizing the image to a square (ie 400x400) and applying a polar coordinates filter in either photoshop or After Effects would work - but it's not! I'm still getting weird distortions when I map it.

    In AE I'm setting the filter for "Rect to Polar" at 100%. Anyone figured out the secret to this?

    Thanks in advance

    dan
  • User avatar
    chromafresh
    super8 member
    Posts: 144
    Joined: Wed Dec 01, 2004 11:39 am
    Location: Tokyo
    Contact:

    by chromafresh » Sun Nov 06, 2005 4:06 pm

    Try putting the "test pattern" onto the sphere and see what it gives you back. It should give you a good idea of whats visible from the front of the sphere. It looks like the mapping isn't "polar" but "spherical" or "cylindrical" and wraps around connecting in the back. It sounds like you just want something like a logo or something to be mapped onto the front of a sphere, but to do that all you should have to do is make the logo small enough with enough open space on either side. I'd try something like an 1000X1000 file with the logo in the center at a size of about 350X350. Hopefully I'm understanding what you're trying to do. But Polar Coordinates shouldn't work for this kind of texture mapping.
  • skyvat
    activ8 member
    Posts: 54
    Joined: Thu Jul 08, 2004 10:19 pm

    by skyvat » Sun Nov 06, 2005 5:16 pm

    Thanks Chroma,

    Maybe I should say more, the animation is a white solid with an inverted square mask that simply grows to the comp size, making it all gradually invisible via alpha when mapped onto the sphere. The idea would be to have a solid sphere, then a little hole appears in the top, then the hole grows and grows until the sphere disappears. So the effect should wrap fairly seamlessy around the shape I was assuming Polar Cord was meant to do just that, Is there another filter that's designed for this or a different technique that would work?

    d
  • User avatar
    chromafresh
    super8 member
    Posts: 144
    Joined: Wed Dec 01, 2004 11:39 am
    Location: Tokyo
    Contact:

    by chromafresh » Sun Nov 06, 2005 5:42 pm

    This should be easy if I'm understanding you right.
    Since mapping wraps around the Y axis, you basically just need a white solid with a linear wipe that reveals the background alpha from the top down.
    Since its just flat white, the movie doesn't even have to be that large, just enough to keep the edge sharp.
  • skyvat
    activ8 member
    Posts: 54
    Joined: Thu Jul 08, 2004 10:19 pm

    by skyvat » Sun Nov 06, 2005 7:45 pm

    Hey - that worked. :D

    Thanks for the pointer. Would you do the same thing if you were going to add more complex patterns and gradients?
  • User avatar
    chromafresh
    super8 member
    Posts: 144
    Joined: Wed Dec 01, 2004 11:39 am
    Location: Tokyo
    Contact:

    by chromafresh » Sun Nov 06, 2005 8:44 pm

    I guess. If you just imagine how the texture wraps physically around the object the rest is pretty easy. It should work for anything. You know what I mean about wrapping around the Y axis? It should be more obvious whats happening if you try using something like the "test pattern" to see how its being wrapped around the sphere on the Y-axis. You could have the white layer with its wipe duplicated and staggered on the timeline with color variations or just run horizontal lines up and or down the movie and resulting in similar "bands" on the sphere. What this also means if it isn't obvious is that the same sphere with its bands revealing and disappearing, could be rotated 90 degrees on X and you would get concentric circles spreading and disappearing in the center as you look down the top of the sphere.
  • skyvat
    activ8 member
    Posts: 54
    Joined: Thu Jul 08, 2004 10:19 pm

    by skyvat » Sun Nov 06, 2005 10:42 pm

    Yeah - I see now that it wraps around the poles north to south, kinda pinching at the poles. I'll play - lots of ideas now

    dan
  • skyvat
    activ8 member
    Posts: 54
    Joined: Thu Jul 08, 2004 10:19 pm

    by skyvat » Sun Nov 06, 2005 10:48 pm

    oh - 1 more question - what's this about a timeline? :shock:
  • User avatar
    chromafresh
    super8 member
    Posts: 144
    Joined: Wed Dec 01, 2004 11:39 am
    Location: Tokyo
    Contact:

    by chromafresh » Mon Nov 07, 2005 2:16 am

    The pinching means that its "spherical" mapping as opposed to "cylindrical" which would look stretched at the poles.

    My suggestion for the timeline was that its just easy to make repeated actions with after effects by creating one action in a layer, then duplicating the layer and changing its position on the timeline, like delaying for one or two frames.

    For example, if we're talking about a horizontal, long, and thin white solid travelling from the top to the bottom of our comp window, making two lines would just mean duplicating the first layer with its keyframes and delaying the duplicate by a number of frames.
    If you wanted to change an aspect of the duplicate, like tint it into another color, you would then have a white, and a colored line.
    By repeating this process you can get multiple lines, or gradients, or whatever, just by duplicating layers, staggering them and then applying filters individually.

    Naturally you can do this with bedded comps as well.
    (make a comp with motion, bring it into another comp, duplicate and stagger, etc.)
  • skyvat
    activ8 member
    Posts: 54
    Joined: Thu Jul 08, 2004 10:19 pm

    by skyvat » Mon Nov 07, 2005 7:51 pm

    Oh yeah - I got that. I thought you were refering to some kind of timeline functionality in Modul8. Sorry for the confusion.

    d

Who is online

Users browsing this forum: No registered users and 7 guests