Home Technical Talk

3D Paint with multiple UV in the same material?

Anyone know of any 3D paint software that supports the use of multiple UVW sets within the same material?

I need to paint an un-tiled mask between two tiled color textures, for landscape blending in a game. Here's an example, created in 3ds Max:
2006.10.10_landscape_sm.jpg

One 1024^2 color texture (rocks) is tiled in UV space 15 times across the landscape, the other 1024^2 color texture (greenery) is tiled 8 times using its own UV space, and I need to paint a 1024^2 detailed grayscale mask (blending between rocks and greenery) using its own non-tiled UV space.

Only way I can figure out how to do this is by pre-tiling the textures into a massive-resolution file in Photoshop... 1024 x 15 = 15360 wide... painting the mask at this massive res, then rescaling it down to my 1024^2 output size.

But I'd prefer to do this painting in 3D, since the shape of the landscape should dictate the shape of the mask.

Anyone know of a 3D painting tool that can accomplish this kind of task?

Body Paint 3D doesn't, Deep Paint 3D doesn't, Tattoo certainly doesn't.

Replies

  • Eric Chadwick
    Well, Body Paint apparently can do this, somewhat, according to their tech support. Basically they're saying each of my bitmaps would have to be in a separate material, because BP allows materials to use different UVs (just not textures within a single material).

    D/l the demo right now. Curious to see if they altered their Max exporter to support multiple UVs...

    If anyone has any suggestions I'd love to hear it. Working in PS at large sizes is a PITA.
  • poopinmymouth
    Offline / Send Message
    poopinmymouth polycounter lvl 19
    Yes bodypaint can do this. Like you said, just make a multisub material with one texture pure material, and assign by ids. Mr Mint has three textures, and I painted in bodypaint. I plan to have my bodypaint video tutorial done within a month.

    poop.gif
  • Rick Stirling
    Offline / Send Message
    Rick Stirling polycounter lvl 18
    Hmm...

    Is it not possible to simply use alpha blending on your 3rd uv space?
  • Eric Chadwick
    Yeah, that's ultimately what I'm outputting to, and it runs great. I'm just looking for a painting tool that'll let me see all three maps blended together at once on the same set of tris, while I'm painting the mask.

    I think I'm just not explaining it very well.

    non-tiled_mask_example.jpg

    Rock and greens use two different tiled UVs, while the mask uses a third non-tiled UV. I want to paint the mask, and I'd like to see the other two at their tiled resolutions while I paint it, so I can match specific features in each.

    Poop it sounds like what you're saying is you're not using multitexture, you have three different bitmaps each on their own set of tris...?
  • Rick Stirling
    Offline / Send Message
    Rick Stirling polycounter lvl 18
    Aye, but can't you just paint it in real time in your 3d package?

    I've done that before in max, I was using an internally developed material at the time, and I'm not sure what software you are using or whether it supports it by default.
  • Eric Chadwick
    Using Max. AFAIK, it doesn't show multiple UVs at once in realtime, only in the offline renderer. Someone please prove me wrong though, I'd love to hear it.
  • Rick Stirling
    Offline / Send Message
    Rick Stirling polycounter lvl 18
    Hmm - perhaps a shader expert can come to your rescue?
  • Joshua Stubbles
    Offline / Send Message
    Joshua Stubbles polycounter lvl 19
    Did you ever get this resolved, Eric?
    I'd love to be able to show multiple UV maps at the same time in max as well. You'd figure that by version 9, they would have figured that out by now.
  • Eric Chadwick
    Hey Josh, nope not really.

    We talked about it in this thread. That map plugin at least lets me paint in the viewport... but it doesn't update very well.

    Only one UV displays at a time in Max, so I had to tile at the local Map level, not at the modifier stack level... basically I can only view different repeat amounts within the same UV.

    Max also pre-bakes map-level-tiled bitmaps into single un-tiled bitmaps before showing in the viewport, so the resolution gets dropped a bit.

    WIP... http://www.ericchadwick.com/examples/images/2006.11.03_ocean.jpg
    http://www.ericchadwick.com/examples/images/2006.11.07_land.jpg

    If you find something better, please let me know. We'll be using these pp masks more than vert alpha in the future, and I imagine more devs are going to go that route too.
  • CrazyButcher
    Offline / Send Message
    CrazyButcher polycounter lvl 20
    is that some "secret new ship" the NAVY has wink.gif looking forward to see a version with atmospheric scattering smile.gif

    btw that "uv multi-channel painting in max viewport", would you invest money in such a plugin ? Say I do it, and put some "donate" button there, would you think it is something people would shell out some bucks volunteerly ?
  • MoP
    Offline / Send Message
    MoP polycounter lvl 18
    If it worked smoothly in the Max viewport, I'd pay!
  • Eric Chadwick
    I'd donate! Somewhere in the $50 range OK?
    <edit> Will it be Max 8 and 9 compatible?

    Sorry about the blur, good ol' NDA. smile.gif
  • CrazyButcher
    Offline / Send Message
    CrazyButcher polycounter lvl 20
    atm I am packed with work, so it would likely be something for january... the main problem here is that I need to some ugly university tasks, where my motivation is already low, and if I start with this now I am doomed (then again, I shouldnt have brought it up). seriously so I must resist and postpone this. It would be max8&9 I guess.
    the donation well I would make it even cheaper, you can do multi-donate if you think it's worth it wink.gif

    edit: I know it sucks bringing something up and then say well "in a year", sorry, but as it is likely some more work (maybe even not), I'd rather check out early if it was worth planning it at all.
    I would favor a solution that plugs into the .fx shader stuff, because it makes the useage of the mask more generic. however its likely easier to bugfix the mix/composite realtime preview functions first. (it would just suck doing that and then see that autodesk fixes it in a service pack, hence maybe you ask for status on this first ?? I am sure you pros have a more direct access to autodesk)
  • Eric Chadwick
    understood, thanks for at least bringing it up.
  • CrazyButcher
    Offline / Send Message
    CrazyButcher polycounter lvl 20
    okay I couldnt resist, I tested the "mix" material, and actually it is not bugged, but it simply wont support blending when different UV channels are used, and then just displays the mask (undocumented feature I guess). Their abstracted renderer is pretty old and supports only extremely simple texture combiner operations, so eventhough it would be really easy to do in hardware, they won't support it, as it would mean changing stuff for old rendering code.

    and for preview it combines both textures "manually" and also ignores the uv channel stuff, which is a bug, but as that manual preview isnt what you need, it can be ignored...

    so, one would need to come up with a material that properly supports texture blendings... unfortunately max doesnt ship with the Directx9 Shader Material source, which makes this task quite a bit harder. But as the Dx9 Viewport rendering stuff is there, at least some bits are exposed.

    to make 3d painting actually efficient it would be necessary to have access to the texture in vram and only partially update when painted...

  • Eric Chadwick
    Thanks CB.

    I think the shader might be written this way:
    1. multiply the 1st bitmap by the inverse of the painted image.
    2. multiply the 2nd bitmap by the painted image.
    3. finally, add the two results.
    So you get a simple lerp.


    Who wouldn't fail a class or two for a little extra dough?! crazy.gif
  • CrazyButcher
    Offline / Send Message
    CrazyButcher polycounter lvl 20
    you only wanted it in max for conviance reasons or, because it would actually be easier for me to do this in luxinia, then in max...

    the mesh format we export allows up to 4 uv channels, would that be sufficient ?

    we allow Cg support, so how you use the textures is up to you, but I would also provide some basic setups, like the standard blend.

    I guess similar feature set as the simple max painter would be sufficient, and you dont need lots of extras ?

    oh and no need to explain the lerp, that is like the ultra easiest part wink.gif
  • Eric Chadwick
    Sorry man, just trying to help any way I can, which isn't much. smile.gif

    Luxinia would be fine, as long as I could export meshes from Max.

    Simple painting tools would be fine.

    Shortcut keys like Photoshop would be helpful... [ smaller brush, ] larger brush, Shift] harder edge, Shift[ softer edge, X swap foreground/background colors, Alt color picker, 1234567890 for brush strength.

    Could I easily swap between a fully-emissive draw mode and a lit draw mode? The former for pure WYSIWYG painting, the latter to see shape/form.

    We support all 99 uv channels in Max, but we only actually export the UVs that are being used by the bitmaps in the materials assigned to the vertices. I guess though that 4 should be enough, just might mean jumping through a couple hoops before export to your format, by copying/pasting our UVs into the first four channels.

    What bitmap formats does Luxinia support?

    Man, I'm excited for this.
  • CrazyButcher
    Offline / Send Message
    CrazyButcher polycounter lvl 20
    .dds, .tga, .jpg and .png import, writing would be just for the latter 3
    the time issue didnt really change much, so I need to calm your excitement a bit. However for another job I need to do some interactive drawing like thing anyway, so... still my thesis is more important and I just continue to get myself into extra work wink.gif

    but the more you describe it, the faster the execution will be when I will find the time.

    about foreground/background, is that really needed ? I mean you wont have "selection", layers and such, just pure painting.
    Lit/Unlit is possible.
  • Eric Chadwick
    Foreground/bkg is having two colors to quickly swap between... x key quickly toggles between them. Helpful for painting grayscale masks, where I constantly switch between painting with white and painting with black. Body Paint borrowed the hotkey from Photoshop, since it's so useful.

    The Alt key samples a new color from under the cursor, and replaces the color in the fgd/bkg swatch that is currently active.

    I only need grayscale painting, but I could see how others might want to paint in RGBA. For example Reality Engine uses each of the four channels RGBA separately to control different blends...
    http://reality.artificialstudios.com/twiki/bin/view/Main/MixMapTutorial
  • CrazyButcher
    Offline / Send Message
    CrazyButcher polycounter lvl 20
    yupp am aware of using RGBA, packing lightmaps in each.
    about having foreground/background being just 2 colors to swap is cool. I can also do a "mask" with checkboxes for the channels.
  • StrangeFate
    Offline / Send Message
    StrangeFate polycounter lvl 18
    hmm i can't bother checking how things exactly work now, but you should be able to do that in modo too since you have as many layers as you want (ala Photoshop) and yuo can group them in the shader tree for 1 material and UV... or spread over as many materials and UVs as you want.. it doesn't really care, and whether you paint alphas or whatever shouldn't really matter either.

    http://www.strangefate.com/webby/modonna2.jpg
    I did that back in the day in modo beta and basically painted alphas that reveal 3 1024 tiling textures as i paint.
    The concrete was one, the scratches was another (i think) and the greenish dirt another, you can set the scale the textures are being painted on (good for terrain). It has all the usual PS overlay modes, so if your engine supports any of those too, it gives you a more accurate preview.
    At the end you can either save out the alpha to redo the blending in the engine, or bake the final result you see into a UV as a unique texture... but you wouldn't want that for a large terrain tongue.gif

    The paint tools are not PS-amazing in Modo tho, so if you want to paint the actual textures... i wouldn't do it. It's great to paint in details or alphas that reveal a tiling texture as you go.

    you can have textures blended (with alphas using the same materials or UVs and still say at which size each texture is projected on, or you can use several UVs with one material to do that... all the same to modo, it's like PS in 3D, with texture scaling built in.
  • Eric Chadwick
    Ooooh, that sounds like exactly what I need. Thanks for taking the time. How do you get multiple UVs into Modo though? I can't think of a format that stores multiple UVs (OBJ doesn't AFAIK).

    CB I'd say hold off for now, I'll let you know once I've played with Modo some.
  • StrangeFate
    Offline / Send Message
    StrangeFate polycounter lvl 18
    hmm lwo does, there should be lwo exporters for any 3d app these days. 3d exploration can do it in the worst case.
  • MoP
    Offline / Send Message
    MoP polycounter lvl 18
    Heh, you can't get an LWO importer or exporter for 3DS Max other than Deep Exploration. Shame really, there used to be free plugins for that sort of stuff frown.gif
  • Joshua Stubbles
    Offline / Send Message
    Joshua Stubbles polycounter lvl 19
    I wish Autodesk would come to their damn senses and just rebuild max from the ground up again. Since they're pushing 3dsmax mainly for games, they really need to amp it towards game development.

    - A more robust viewport rendering engine (better shader & normal map support, realtime lighting, etc)
    - Speed up mental ray & final gather RTT
    - More native format support
    - Displacement painting
    - Multi-level UV/texture display
    - Fix all of the f'n bugs and memory leaks!!!!!!!


    /closes steam vent

    smile.gif
  • CrazyButcher
    Offline / Send Message
    CrazyButcher polycounter lvl 20
    .FBX is supported in modo, which allows multiple UVs
Sign In or Register to comment.