Home 3D Art Showcase & Critiques

Diffuse and Normal map matching automated

Hi,

I'm doing some research on workflow optimizations of real time gfx workflows, and I wanted to share this method to get some opinions. In short, atm, I combine 2 scripts (a 3ds max maxscript and a Photoshop script) to get me started asap in photoshop working on a diffuse map that matches normal map transitions correctly.

Both scripts work well, that is if you use them as you are supposed to :) so this is more about solving a bottleneck as opposed to deliver perfect scripts for now.

If you have any comments, opinions, feedback.... shoot. This will be part of a thesis, so I'm always looking for quotes as well :) Thanks for watching.

The global overview of what the two scripts do can be seen in the picture below. A 15min walktrough of how the scripts work on a more complex model such as a character can be seen here:
http://vimeo.com/29365249

masks.jpg

Replies

  • Lonewolf
    Options
    Offline / Send Message
    Lonewolf polycounter lvl 18
    if thats what i think it is its pretty cool

    will save alot of time selecting parts

    so it gives u seperate masks for different parts u select?
  • Butthair
    Options
    Offline / Send Message
    Butthair polycounter lvl 11
    This is a very interesting method for workflow optimizing, especially when tweaking and working on textures.

    I do have a couple questions, because my workflow, although similar, does not require the use of scripts, and I get a similar result, however, I find it less messy.

    Why couldn't you, instead of fill each section with a color through the material, which might take awhile to setup a color, name it, etc., why wouldn't you instead just use a vertex color modifier then bake out the colors and a single mask using the same cage projected by the normals?

    This is the way I do it (when something has a lot of parts) because with the various colors in a single texture, I can use the wand tool, tolerance to 1, and just pick the colors and add color and detail that way. It's nice to see the organization of groups for each, however, I tend to group my things base on diffuse, normals, spec, emissive, and so on.

    This could just be a workflow preference, I'm not saying your isn't efficient, because I see that it is very well organized, which in the end leads to less time spent re-organizing.

    Also, this could be achieved through zBrush, with filling polygroups with color, then baking the colors through xNormals or Max.
  • Ghostscape
    Options
    Offline / Send Message
    Ghostscape polycounter lvl 13
    I just color my mesh red/green/blue and load each channel as a selection and use it to mask off areas. It gives you a crisper edge than the magic wand/color system.

    You can use secondary colors (ie, 255,255, 0) and selection subtraction/intersection to isolate up to 6 masks if you need more fidelity.

    With the magic wand system I find you have to bake the diffuse at higher rez and then generate your masks and scale down or else you get fuzzy edges between color splotches.
  • Butthair
    Options
    Offline / Send Message
    Butthair polycounter lvl 11
    You have a point Ghostscape. I do usually render my textures as high as I can. I just like too. I didn't think about that problem, it's never happened, but it is definitely a problem. I'll try your method too, seems similar...
  • Ghostscape
    Options
    Offline / Send Message
    Ghostscape polycounter lvl 13
    It's similar but you get better aliasing on the selection edges.
  • RealTimeMike
    Options
    Offline / Send Message
    Thanks for the input.

    Main reasons for me why I had this automated in this way are:
    1. The masks are obtained trough the same algorithms of rendering as the normal maps was generetad, so edges, transistions, antialiasing etc are all the same in both masks and normal map. I also used to do it with wand selection but it's not the same. This might sound a bit picky but...
    2. I don't like doing the same things manually over and over again for each asset ;) so if you can have you computer do the work for you. Since you have to define color selections in 3dsmax, zbrush anyway, why do the manual selecting again in photoshop ?

    Butthair: rendering out just one multicolor map to do your masking on indeed requires less render time, but, especially when you have a lot of parts, some colors that are more similar might blend a little different than extreme color differences, and picking all these colors for transitions with that in mind was cumbersome for me. Now I just don't have to think about that ever again ;) You could do the selection in Zbrush, but in max with element selection it goes quite fast.

    Another version of the max script separated on object in stead of material ID btw, so you just had to detach whatever you wanted to handle separately during texturing and give the object a clear name while doing so, and that's the way to go, so I will have to script adjusted.
  • chrisradsby
    Options
    Offline / Send Message
    chrisradsby polycounter lvl 14
    Awesome work, I will surely try to use this the next time I create a character :)
  • RealTimeMike
    Options
    Offline / Send Message
    thx chrisradsby ;)

    Any other opinions out there ?
  • jerry
    Options
    Offline / Send Message
    A lot of these workflow things depend on personal preference but in any case this is a clean and proper way of handling this part of the process. It sure beats doing it by hand every time :)

    Good luck with the thesis.
  • b1skit
    Options
    Offline / Send Message
    Interesting stuff... But it seems like a lot of work for something that can be solved with simple tricks as Ghostscape mentioned?
  • RealTimeMike
    Options
    Offline / Send Message
    Jerry: Thx. ;) Yes, it is indeed a certain way of working.

    b1skit: Ghostscape talks indeed about a nice shortcut. But at some point you have to define parts you will be working on sone way or another, with differences in speed and quality.
  • FAT_CAP
    Options
    Offline / Send Message
    FAT_CAP polycounter lvl 18
    Sorry for the bump, but I've just seen this post, and have got to say it looks like a great combination of scripts that would be really handy in automating some laborious parts of my workflow.

    Is there anywhere we can download the scripts from? Am I being exceptionally dumb in not being able to see a download link, or are these not currently public for some reason?
  • RealTimeMike
    Options
    Offline / Send Message
    FAT_CAP: Thanks for the kind words. The scripts are not online yet as they are still quite alpha, so I hoped to finalize them a bit more, taking feedback from this thread into account. pm me your email address and I'll pass them to you, np.
Sign In or Register to comment.