Home Technical Talk

RTT lightmap multiple objects in Max

Hi, I want to bake in 3d Max and vray a lightmap of all the objects of the scene, (a total of 438 ). But I couldn't imagine that it would be such a headache..

The first problem I find is that I can't open the unwrap modifier as they are too many objects.



But not only I can not make the unwrap, I also have realised that even if I can, I wouldn't be able to render one lightmap because RTT only can bake a texture per object..

So I can only think in 2 options:

- Attach all the object in one unique so I can unwrap and bake it, which means to lose some modifiers, instances, etc, and of course a lot of work and time wasted detaching them again.

- Use flatiron but unfortunately this option is very expensive for me.


Is there any other script, or trick that I don't know about? Are these the only options I have?

I am thinking in some sort of script that could attach keeping the information from the original object so it can be restored after unwrapping and baking.
Is there anything similar?

Replies

  • JamesWild
    Options
    Offline / Send Message
    JamesWild polycounter lvl 8
    I recently had to bake lightmaps for a fairly large scene using Blender. I ended up just attaching the whole lot into one object, adding a new UV channel, using auto pack (with so many islands it did a pretty good job) baking the lightmap and then using element select cutting it back up pretty quick. (mobile scene so atlased and cut into about 10 objects - doing this reduced the draw calls too) Switch back to channel 0 and my texture and UV data was still there. Should be the same on Max.
  • styx
    Options
    Offline / Send Message
    Thank you for the idea JamesWild, but this is not a solution for the case of mine.

    I am not worried about doing the packing and unwrap in 3d max, I know how to do a proper one, using texel density with textools and pack afterwards, you can get a good UV for lightmap.
    Anyway I know the lightmap unwrap option in Blender and I agree with you that is quite good getting an automated UV.

    But export to other program will only give me more headaches in my workflow. Besides I would lose the smoothing groups if I export to blender. I don't know how you did export but AFAIK with the obj format you can only have 1 UV channel.
  • JamesWild
    Options
    Offline / Send Message
    JamesWild polycounter lvl 8
    I wasn't suggesting taking it out to Blender if that's how you interpreted my message - just that not separating the objects again is a possibility and might improve performance if you're on a draw call limited platform.

    Regardless I'm using FBX in my content pipeline which supports multiple UV channels.

    Good luck.
  • Noors
    Options
    Offline / Send Message
    Noors greentooth
    http://vertexbee.com/rttassist.htm
    This bakes multiple maps and combine them afterwards. You'd better not use a big padding as it will overlap. But as the alpha is saved, you can still apply a dilatation with xormal filter in photoshop.
    I think this way is preferable compare to a script that would combine the objects, detach while keeping the pivot informations, etc...
  • styx
    Options
    Offline / Send Message
    Wow this is really a good tool! I was looking for something similar for exploding and
    baking normal maps and I couldn't find anything like this. Thanks for the contribution :)

    But I don't believe that it will be useful in my case, because the combine maps process
    is made afterwards, so I would have the same problem as with RTT, It will make 438
    renders of Global illumination, one each per object in the scene. I can not afford
    this.

    I think I'm condemned to attach the objects..

    Jameswild I didn't realised that you werent working with 3dmax. Thanx anyway for the idea :)
  • Noors
    Options
    Offline / Send Message
    Noors greentooth
    Aaah ooh 438 objects. Mmh yeah, might be a bit too much for rtt assist. Well yeah then, make a clone of your scene and attach the objects.
  • styx
    Options
    Offline / Send Message
    Yeah too many objects and rendering with GI. I have to do it in one render pass.


    I've found a script that could be interesting for detaching automatically:

    http://www.scriptspot.com/3ds-max/scripts/detach-by-material-id

    Not a solution at all, but better than nothing.
  • Noors
    Options
    Offline / Send Message
    Noors greentooth
    Why don't you just make 2 scenes ? 1 for lighting with the attached objects and 1 for exporting with your 438 objects ? No need for a script that will broke all your transformations/instances anyway.
  • styx
    Options
    Offline / Send Message
    The objects of the former scene wouldn't have the lightmap UVs so it would be useless.
    I don't know if autodesk has fixed this problem with RTT in the last versions of Max, but I think it should be improved because it's a important handicap in the workflow for videogames.
    Thanx anyway:)
Sign In or Register to comment.