Home Technical Talk

Decals in Max

polycounter lvl 11
Offline / Send Message
leechdemon polycounter lvl 11
Not sure how decals work in other engines, but ours use coplanar geometry that is cropped around the texture space we're decaling. In our engine, we draw the decal last and so it appears on top. In Max, I have a hard time displaying this; I get Z-Fighting in the Viewports, and Renders will show one or the other on top. The only real work aroudn I've found is applying a Shell modifier with a very small Outer Amount in order to force it to draw last.

Is there a smarter way around this, maybe through FX id's or object properties or something? Some way to tag it as "draw last" or "draw on top" or something?

Replies

  • Eric Chadwick
    Options
    Offline / Send Message
    Best bet would be to get ShaderFX and play with the Z Read and Z Write options, making your own shaders to control this.
  • Mark Dygert
    Options
    Offline / Send Message
    The way I've gotten a decal to work without flickering is to use a composite map slot (not a composite material type), and a secondary UV Chanel for the decal. Its a pain in the ass but works.

    These two tutorials cover it greater detail. I also think there is an official Autodesk promo video floating around, probably up on youtube?
    http://www.3dtotal.com/team/Tutorials/decal/decal.php
    http://www.cgrats.com/apply-decals-using-a-composite-map.html


    I would love to have it handled like it is in UDK or Source, pick your texture, pick the decal tool, and click. Manipulate the "decal helper" to move scale and position it where you needed. I think there was a script that worked like that for Maya, and someone was working on a 3dsmax port... I wonder whatever happened to that...:shifty:
  • leechdemon
    Options
    Offline / Send Message
    leechdemon polycounter lvl 11
    Vig - the only problem with that technique is that it requires the material to contain it's own decals. So, it's a fix, but a material one. The method we're using has floating geometry with decals on them, and we just draw them last. Since it's a separate object, even if I have it masked onto the base material, there's only a 50% chance it'll draw in any given frame based on Z-Fighting. It's a geometric problem with Z-Fighting, not specifically the material setups. if we were using a material-based decal system that'd work fine.

    Eric - I'm thinking that's what I'm looking for. No way to get access that without pricy plugins, though?
  • Mark Dygert
    Options
    Offline / Send Message
    The last time I checked ShaderFX is free to individuals and companies smaller than 2 people.
  • leechdemon
    Options
    Offline / Send Message
    leechdemon polycounter lvl 11
    Oh snap, really? I'll have to check it out then. Thanks!
Sign In or Register to comment.