Home Technical Talk

Creating a matte window texture

rares
polycounter lvl 9
Offline / Send Message
rares polycounter lvl 9
Hy guys ! i'm trying to create a matte glass texture for the windows of a car. I've never done this before , so the first thing i tried was using an hdri enviroment and baking the reflections to get a base for the glass look, the problem with that is that there is no way , as far as i can tell, to bake reflections independent of a camera ( i'm using batch bake in mental ray)...granted i could bake separate maps from a view that favourises each window and then cut and paste the good bits in a final map, but i wonder if there isn't an easier way.
How do you guys make textures for matte glass ?

Replies

  • Ben Apuna
  • rares
    Offline / Send Message
    rares polycounter lvl 9
    That's the kinda thing i had in mind, except that instead of using a cube to extract my reflection i want to be able to use the meshes for the windows to do that.
    I don't think that chopping up a cube map would give a good result because the windows are slanted and convex, and they'd reflect the enviroemnt differentely than the straight faces of a cube
  • Ben Apuna
    No, you don't want to chop up the cube map and apply it as a mapped texture. You need to find a way to hook it up in your shader to give off proper real time reflections.

    I might be totally misunderstanding what you are trying to do here.

    If you want a render of these windows with reflections. Then the other way to handle it is to turn on raytracing and actually have something in your scene for the windows to reflect. A good cheat is too just have a environment image mapped to a cylinder or half sphere which surrounds your object.

    Sorry for the short reply earlier, I was heading off to sleep and figured the info on the wiki page would be self explanitory.
  • rares
    Offline / Send Message
    rares polycounter lvl 9
    I don't have to do any shader work, no realtime reflection required, the car itself will only have a color map, so i just need the windows to look like they're made of glass, but not actually be reflective, the way i wanted to achieve this was to mix the color fo the glass with a bit of the baked reflection....the only problem i had was getting a baked reflection that was independent of the viewport camera, but in the end i think i'll just bake reflection on each window from a view that gives good results, and combine the pieces in the color map.
    Thanks for your help Ben Apuna
  • low odor
    Offline / Send Message
    low odor polycounter lvl 17
    hmmm..I not sure if I understand 100% either..but one way you could do it, would be to aply the evnviroment map to the object. In the(bitmap) coordinates rollout of your material , switch it from texture to environment. Then switch your mapping to spherical or screen(whatever fits). Once you RTT it should have the enviroment map baaked into the texture
  • rares
    Offline / Send Message
    rares polycounter lvl 9
    that's a great ideea low odor, i'm not sure i understood the entire process too well tho, so i'm just gonna say what i did :
    1) i mapped an eviroment texture to the color slot of the shader using a spehrical projection, like this :

    Mapping.jpg

    2) i used convert to file texture with default options
    what i got didn't look much like a reflection tho :(
    here's the comparison : enviroment converted to texture left, baked relfection right

    converted_baked.jpg

    if i didn't understand the process please correct me
  • Eric Chadwick
    Reflection angle is always relative to the viewing angle. In the case of baking a texture, the "viewing" angle is both isometric and dead-on to each polygon, which means each polygon's baked reflection will get something close to a single pixel of the reflection map (with some averaging from the vertex normals).

    In other words, you can't use a render-to-texture to bake a decent reflection.

    If you want to bake in a reflection (which always looks crap IMO, better to go with gray windows) then you should just layer it on in Photoshop.
  • rares
    Offline / Send Message
    rares polycounter lvl 9
    the baked reflection alone wouldn't have been the final texture, i do plan to layer it in photoshop.
  • MoP
    Offline / Send Message
    MoP polycounter lvl 18
    Personally I wouldn't bother baking any reflection at all, it will most likely always look weird, since it would be specific but un-moving. If you absolutely can't use a dynamic environment map for whatever reason (ancient engine? Handheld?), it's probably better to go with a simple gradient with a non-specific highlight or two painted on top.
  • rares
    Offline / Send Message
    rares polycounter lvl 9
    i'll probably do a mixture of what you suggested and baked reflections from apropriate angles, because a gradient alone doesn't have much variation. I just wanted some different aproaches to experiment with .
    Thanks guys :D
Sign In or Register to comment.