UV Mapping with Pixel Bender

Posted on 21. Jul, 2009 by in Blog

Have you ever rendered out a sequence from any 3d application like Cinema 4D or 3D Studio Max and wanted to replace something in it after you rendered it out? It happened to me a couple of times. Not to mention that it would be super cool if you could blend you 3D objects better with your After Effects environment. There are tools to do that on the side of the 3D package, but what about After Tea Cups With Lids Amber Rings Wholesale Tea Trays Toddler Sleeping Bags Effects? Shouldn’t we have a chance to change our minds and make changes inside our favorite compositing tool?

The plugin is now available for purchace. Check out the [intlink id=”1150″ type=”post”]Youveelizer[/intlink] tutorial for more info. Read on if you’d like to learn more about the concept of UV mapping, or just watch the [intlink id=”1150″ type=”post”]Youveelizer[/intlink] tutorial.

UV Mapping (source: wiki)
UV mapping is a 3D modeling process of making a 2D image representing a 3D model. The map transforms the 3D object onto an image known as a texture. In contrast to “X”, “Y” and “Z”, which are the coordinates for the original 3D object in the modeling space, “U” and “V” are the coordinates of the transformed object. This creates the effect of painting the image onto the surface of the 3D object.

Every 3D application is capable of generating UV maps and rendering out a UV pass. What if we could use those UV maps in After Effects to change textures, replace 3D screens, change pictures hanging on our 3D walls, or even add reflections to our 3D models?

I did some tests and came up with a very rough Pixel Bender plugin for painting an image onto a surface of a 3D object using UV maps. Here is the result of the first test.
This technique opens up new opportunities to cutting down render times and making changes on the fly inside After Effects. There are some problems that need to be faced, but all and all it looks promising. I’ll keep you posted. The tutorial and plugin should be available after publishing all of the 4 tutorials I have already announced. Two of them are already online, so it shouldn’t be longer than two weeks. I’d do it now, but I’m a bit busy (for a change).

The plugin is now available for purchace. Check out the [intlink id=”1150″ type=”post”]Youveelizer[/intlink] tutorial for more info.

Tags: , ,

20 Responses to “UV Mapping with Pixel Bender”

  1. Oregano

    21. Jul, 2009

    That’s awesome, really looking forward to see it.

    Try render the Dof pass and use it like a alpha channel to ad fog or stuff like that.


  2. Mike

    21. Jul, 2009

    Impressive stuff. Keep up the good work!

  3. vianz

    21. Jul, 2009

    Is there something you can’t do? amazing..

  4. harry

    21. Jul, 2009

    wot? but, how ? This is simply stunning!

  5. Rafael Guerra

    21. Jul, 2009

    Wow, how did you figure out something so brilliant like this?

  6. illd

    21. Jul, 2009

    There is already a free plugin which can take “normalrenders” of a 3D app and remap shadows and even AE lights to relight the object. Check this out: http://www.minning.de/software/normality

    • Jerzy Drozda Jr

      22. Jul, 2009

      I know, but thats different. Plus – mine also does that in a different manner.

  7. Stefan Minning

    22. Jul, 2009

    Very cool technique – I like to use it a lot with a plug-in I wrote specifically for this purpose.
    Haven’t looked at Pixel Bender yet – is the speed comparable to a regular compiled AE plug-in?

    BTW, just to avoid confusion, I’d like to point out that Normality does not remap shadows at all.

    • Jerzy Drozda Jr

      22. Jul, 2009

      Hey Stefan! Nice to see you. Hard to say if it’s faster, but it’s relatively fast. It;s GPU Accelerated. And the Pixel Bender is of course compiled in AE. It was actually used in CS3 as well under the hood for some effects, so I think it’s safe to assume it’s at least not slowing things down. BTW – I’m planning a huge tutorial on Normality and some of my own scripts. All of this coming in less than 3 weeks, so stay tuned.

      • Stefan Minning

        23. Jul, 2009

        Looking forward to the tutorial! If there’s anything I can help with let me know!

        • Jerzy Drozda Jr

          23. Jul, 2009

          Most of the stuff I’m dealing with is pure Pixel Bender. Sometimes things just do not work as they should – a simple find edges convolution matrix for example. Frustrating. Actually the plugin is done – I just want to introduce some smart smoothing as I described below in the response to RussellCroy.

  8. RussellCory

    22. Jul, 2009

    Very excited to see you going in this direction!

    I’ve been playing with Normality & getting interesting glints and highlights with it. My main problem is getting C4D to render out a normal map that doesn’t have aliased edges on the geometry. Hopefully you will cover it in your upcoming tuts.

    • Jerzy Drozda Jr

      22. Jul, 2009

      That’s the issue with rendering passes in general – not C4D specific. The edges shouldn’t be antialiased when you think about it, because theres no transition or blending going on between two objects, so the renders are fine. Same goes for depth maps and other passes.

      As depth maps do have some workarounds (like special materials and stuff) it’s really hard to find something working, so the very common way to fix that is to render out a given pass at 4x the resolution and then resize it down to the target resolution.

      Not very elegant way of doing things, but on the other hand the uv passes and most of other passes render quite fast, so for the time being you can try that.

      BUT – uv maps are a special case. If you make antialiasing like I described there will still be jitter after applying the texture, so the texture needs to be applied on the oversampled version and then the whole thing should be scaled down.

      I’m actually trying to implement some smart antialiasing into the plugin I’m working at, so keep your fingers crossed.

      • Russell Cory

        23. Jul, 2009

        Thanks for the input, I’ll give it a run.

        BTW: Congrats on the new website, it looks great. You are a true asset to the global After Effects community!

        • Jerzy Drozda Jr

          23. Jul, 2009

          Thanks. I’m doing as much as I can. I’m glad that you like it. Heppy AfterEffecting.

  9. joe

    23. Jul, 2009

  10. Splette

    23. Jul, 2009

    Wow. that’s cool. I never thought that would be possible. Thanks.

  11. Chi

    10. Feb, 2011

    I wish there is a similar filter that can work in Photoshop.
    However, I couldn’t find any…

  12. wholesale mac makeup

    09. Jan, 2012

    such as mac brushes set, mac eyeshadows.