Home Technical Talk

[Testing] Using Headus to pack Lightmap UV's

polycounter lvl 9
Offline / Send Message
Cordell Felix polycounter lvl 9
Hey guy's, so I'm pretty tired of packing uv's by hand twice for udk.
I figured lightmaps is just one of those things that should be auto packed.
Sure you can still autopack with a 0.03 spacing or whatever, but the results are lame.

Headus is a great tool for autopacking and gives you the percentage of how much uv space is actually taken up. Plus, if you pack in Headus with a padding of 4, you get like PERFECT spacing for a lightmap.

I have been doing tests, and all have failed.
Steps ive done so far are:
Test 1:
-Save 1st channel of mesh UV's
-Export mesh as .OBJ and pack that shit in headus for lightmap uvs
-export mesh back into 3ds max, save the new 1st channel UV's which are my "lightmap" uvs. (so now i have my original 1st channel diffuse UV's and my 1st channel headus lightmap uvs saved out.)
-open up my original mesh with the 1st channel uvs set as the real ones used for diffuse.
-load the headus lightmap uvs into the 2nd channel of mesh and export to udk.
-shit does not bake out right.

I think the problem is that it's basically using different sets of uvs from 2 different meshs. Sure its the right mesh, but im using 2 different ones. That must be messing things up.

I've done it were i saved the 1st channel into the 3rd channel, export, unwrap 1st channel in headus, reimport into max, save 1st channel in 2nd channel and then save 3rd channel into 1st channel...[COLOR="rgb(0, 255, 255)"]it makes sense i swear[/COLOR]
Theres a couple other steps i've done too which require saving out uv's and loading them up...but I just dont think Headus reads a 2nd map channel...

Any thoughts?
I would love to get this to work so that we can all pack some beautiful lightmap uvs.

Replies

  • passerby
    Options
    Offline / Send Message
    passerby polycounter lvl 12
    seems like overkill to use headus for just packing already existing shells, what we really need is someone to write some good plugins for max and maya specifically for packing lightmaps.

    also that workflow seems a bit easier in maya, could export out the mesh as obj to do lightmap uv's than when bring it back in use a script with transfer attributes, to takes the uv's from the imported object, and put them in the 2nd channel of existing object in the scene.
  • cupsster
    Options
    Offline / Send Message
    cupsster polycounter lvl 11
    try this:
    - import lightmap unwrap to max
    - save separate channel as "lightmapUV"
    - reset object xform and mapping
    - add unwrap mod > set ch 1 > load saved diffuse
    - add 2nd unwrap mod > set ch 2 > load saved lightmap
    to verify they are different open tools > channel info there should be different numbers

    - if not baking lightmap properly i think it bakes lightmap into diffuse (hard to tell without picture)
    - it is not required to have same islands for lightmap so you can weld/iron them
  • r_fletch_r
    Options
    Offline / Send Message
    r_fletch_r polycounter lvl 9
    Post pictures.. saying things don't work is not helpfull.
  • wolver
    Options
    Offline / Send Message
    http://packer.3d-plugin.com/

    im not sure how this compares to headus but whenever i have used it for light maps it produces great results
  • DeadlyFreeze
    Options
    Offline / Send Message
    DeadlyFreeze polycounter lvl 17
    I use headus also and noticed this awhile back. The problem seems to be headus changing the order of the referencing groups when importing/exporting the obj from max to headus.

    g Box01
    f 1/1 3/2 4/3 2/4
    f 5/5 6/6 8/7 7/8
    f 1/9 2/10 6/11 5/12
    f 2/13 4/14 8/15 6/16
    f 4/17 3/18 7/19 8/20
    f 3/21 1/22 5/23 7/24
    
    g Box02
    f 4/3 2/4 1/1 3/2
    f 8/7 7/8 5/5 6/6
    f 6/11 5/12 1/9 2/10
    f 8/15 6/16 2/13 4/14
    f 7/19 8/20 4/17 3/18
    f 5/23 7/24 3/21 1/22
    

    So box 1 is the original from max, box 2 is from headus. The vertex/texture vertex are all correct but the order is wrong, I'm pretty sure this is what trips max out. They might look alright in max (with broken seam lines) but as soon as you export them it gets all jacked up.

    Could be wrong but from my test that seems to be the problem, there's no real fix as far as I know.
Sign In or Register to comment.