UV Mapping with Pixel Bender

Posted on 21. Jul, 2009 by Jerzy Drozda Jr 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 Effects? Shouldn’t we have a chance to change our minds and make changes inside our favorite compositing tool?

Update
The plugin is now available for purchace. Check out the Youveelizer tutorial for more info. Read on if you’d like to learn more about the concept of UV mapping, or just watch the Youveelizer 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).

Update
The plugin is now available for purchace. Check out the Youveelizer tutorial for more info.

  • Twitter
  • Facebook
  • LinkedIn
  • StumbleUpon
  • Digg
  • Technorati
  • del.icio.us
  • Google Bookmarks
  • Wykop
  • Reddit
  • email
  • Print

Tags: , ,

27 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.

    regards

    Reply to this comment
  2. Mike

    21. Jul, 2009

    Impressive stuff. Keep up the good work!

    Reply to this comment
  3. vianz

    21. Jul, 2009

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

    Reply to this comment
  4. harry

    21. Jul, 2009

    wot? but, how ? This is simply stunning!

    Reply to this comment
  5. Rafael Guerra

    21. Jul, 2009

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

    Reply to this comment
  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

    Reply to this comment
  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.

    Reply to this comment
    • 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.

      Reply to this comment
      • Stefan Minning

        23. Jul, 2009

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

        Reply to this comment
        • 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.

          Reply to this comment
  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.

    Reply to this comment
    • 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.

      Reply to this comment
      • 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!

        Reply to this comment
  9. joe

    23. Jul, 2009

    Reply to this comment
  10. Splette

    23. Jul, 2009

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

    Reply to this comment
  11. [...] eins78 shared UV Mapping with Pixel Bender [...]

    Reply to this comment
  12. Феликс

    18. Oct, 2009

    Прикольно :) Надо это сообщение использовать в своих корыстных целях. Просто обязательно!

    Reply to this comment
  13. Deriksims

    04. Jan, 2010

    Да уж. По поводу коментариев – навеяла на меня где-то услышанная фраза:
    Ведь именно мы повернули вспять реки и счетчики электроэнергии.

    Reply to this comment
  14. пyпo

    06. Jan, 2010

    Хорошая тема, продолжайте. Иногда нахожу ответы, которые получить самому просто реально не хватает времени. Премного благодарен!

    Reply to this comment
  15. Youveelizer | CG Stream

    27. May, 2010

    [...] on Mac’s and PC’s. Enjoy! Further info This is the post where it all started – UV Mapping with Pixel Bender. If you’re completely new to the concept of UV maps and Normal maps check out Lutz [...]

    Reply to this comment
  16. mary discount mbt shoes

    24. Jun, 2010

    GiDid you? ve you a healthy life. .

    Reply to this comment
  17. mary discount mbt shoes

    24. Jun, 2010

    Look at me, I am lonely

    Reply to this comment
  18. mary discount mbt shoes

    24. Jun, 2010

    so for the time being you can try that.

    Reply to this comment
  19. cheap handbags

    09. Jul, 2010

    notice me!

    Reply to this comment

Leave a Reply