Home Technical Talk

UT3 multiple emissive color glows - 1 static mesh

polycounter lvl 15
Offline / Send Message
Autocon polycounter lvl 15
Hello polycounters,

I made sure I checked the search function before posting this so I think im good, then again I could fail super hard at the interwebs and it could have been the first search result and I was just too dumb to realize it.

Anyway I have a model that I wish to glow using an emissive. Did the whole jazz of creating the emissive and got it to make it look kinda like a light bulb in max but not glow. Didnt care to much about that since I knew you could do it in UT3.

On my model I wanted a kinda back computerish screen to glow blue, and white text and a palm print to glow white. There were some other side lights to glow blue and other text to glow white also.

Problem is that when I hook up my emissive map in UT3 its making my model glow the color of the emissive map instead of making the textures from the difuse glow. I assumed that the emissive map would just make the colored textures on my difuse glow depending on the intensity of white/grey on the emissive.

To check if this was acutely the case I hooked up a Constant3Vector with a blue color and a multiply and used this with my emissive. Sure enough everything glowed blue and totaly ignored the colors of my difuse.



So my question is, is this this even possible to get these multiple colors to glow? Or can an emissive only do one color? Checked for tuts online but every example i could find used 1 color in there emissive so it didnt really help. If anyone knows I would extreamly appreciate some insight on this.


Here is a quick render of what my object looks like in Max (its not really glowing, its just kinda lit, couldn't figure out how to make it appear glowing) And of what it looks like in UT3 with the emissive hooked up.

reader1by9.jpg

glowbadtz0.jpg

Thanks again for any help.
-Anthony

Replies

  • Kawe
    Options
    Offline / Send Message
    Kawe polycounter lvl 8
    You should be able to make the emissive map with a color texture instead of a greyscale. I assume you used a greyscale?
  • ImSlightlyBored
    Options
    Offline / Send Message
    ImSlightlyBored polycounter lvl 13
    emissive maps can be all colours.

    You can just import your diffuse map again, (black out everything but that panel) plug it to diffuse and it might not glow much; ramp up the power with a constant and itll glow more. Thats the least amount of work.

    To reiterate - you can put anything on your emissive. I'd even advise doing so, as using a flat color creates false looking glows imo (though I'm not sure if this is more expensive... I doubt it. A pixel value is a pixel value.)
  • Autocon
    Options
    Offline / Send Message
    Autocon polycounter lvl 15
    Ah sweet, thought emissives were only black and white. I guess I should have learned when I though specs were just black and white. Thanks a ton guys =)
  • Kawe
    Options
    Offline / Send Message
    Kawe polycounter lvl 8
    To reiterate - you can put anything on your emissive. I'd even advise doing so, as using a flat color creates false looking glows imo (though I'm not sure if this is more expensive... I doubt it. A pixel value is a pixel value.)

    uhm.. it is more expensive if you need a whole another texture lookup. well you could store the emissive map as black and white in the alpha channel and use it as a mask instead and just mask out the diffuse map in the shader/material.. if the diffuse map has the right colors... which might be what you suggested.

    then we have the texture size problem. a DXT1 compressed texture takes like half the space of a DXT5. DXT1 is RGB and DXT5 is RGBA. So you could store multiple greyscales in the RGB channels in another texture.. if you need multiple greyscales that is. That way you can save some space (not lookups though!). Just tossing it in... each situation is always unique.

    but then I believe DXT1 compression is a little crappier for greyscales in the RGB versus DXT5 in alpha.... but usually that won't matter much. not sure about this one though. actually Im not sure about anything... so it is if my memory serves me right :p look it up if you want to be 100% sure.
  • Brice Vandemoortele
    Options
    Offline / Send Message
    Brice Vandemoortele polycounter lvl 19
    Assuming you use the same texture coordinates, sampling a rgb a sampler or a bunch of grayscale packed doesn't make any difference, it's a single tex2d() operation. The best place to store grayscale info in dxt would be the alpha of dxt5, since it is compressed independently from other channels. If you'd use the red channel for example you might end up with artifacts from the green one, since they're originally supposed to be compressed together as a color. It all depends the level of details you need. SpecPower for example doesn't need much precision so it could easily be packed in R channel. The green is the least compressed channel after alpha (http://developer.nvidia.com/object/bump_map_compression.html).
    In this case using grayscale makes a lot of sense since there's only one hue (blue), you can easily multiply you map by a constant color in the shader as you did, extreme values should naturally clamp to white.
    The masking solution Kawe propose is a clever solution as well, but having a separate map would allow you to animate it: pulsing light, change of color when access is granted etc.
  • ImSlightlyBored
    Options
    Offline / Send Message
    ImSlightlyBored polycounter lvl 13
    Kawe wrote: »
    uhm.. it is more expensive if you need a whole another texture lookup. well you could store the emissive map as black and white in the alpha channel and use it as a mask instead and just mask out the diffuse map in the shader/material.. if the diffuse map has the right colors... which might be what you suggested.
    .
    yeah, I was assuming that an emissive texture was always going to be a seperate entity and require its own call. I'd also like to second the masking technique too, I did consider suggesting it but the original question was whether emissives could have colour or not. But I'd probably choose that route if I could, unless the object has masses of glowing bits.

    Brice, thats real nice information about how channels compress. Gonna store that myself.
Sign In or Register to comment.