Static environment mapper when looking through two layers

Discussion in 'Track Modding' started by ethone, Feb 11, 2012.

  1. ethone

    ethone Registered

    Joined:
    Nov 30, 2011
    Messages:
    1,153
    Likes Received:
    37
    I'm encountering some issues when looking through two "layers" of a material with a cube map and the associated environment mapper.
    View attachment 1105

    On the left all is well (green arrow), there is a wall inside the building preventing the camera from looking through the windows, through the building and out the other window. Further to the right though you can see that the window starts looking more psychedelic when the inside wall angles away and we're looking through one pane of windows, through the inside of the building and out the other side through another pane of windows. The glass material is not set to double sided and the polys all face outside so I'm not sure why there even is any effect of the second pane of glass in the first place.

    Is this an outright bug? Can I circumvent it through different material settings or using a different shader?
     
  2. Luc Van Camp

    Luc Van Camp Track Team Staff Member

    Joined:
    Oct 4, 2010
    Messages:
    1,030
    Likes Received:
    15
    That's definitely not expected behaviour, and you're right, it shouldn't even interact with the second layer. Which shader are you using? Anything out of the ordinary in the exporter? Could you copy/paste the top section of the STATIC## in question, please?
    Out of curiosity, what happens if you temporarily detach the second layer to a separate object?

    It's working fine on one section, so I'm inclined to say it's a bug, though I haven't seen it happen on the ISI tracks. I'll inform Scott about this ...
     
  3. ethone

    ethone Registered

    Joined:
    Nov 30, 2011
    Messages:
    1,153
    Likes Received:
    37
    The shader is Cube Map Add Alpha Reflect T1. Blend is Src/InvSrc.
    I had the idea about detaching the second layer too and what you see on the screenshot is with the second layer already detached:
    View attachment 1106

    In the screenshot from my previous post the camera is looking roughly along that green line. Through the red object of windows first, then the blue one from its relative backside.
    My mappers look like this:
    Code:
    ReflectionMapper=STATIC46 	// pitbuild01 #5
    {
      Type=Cubic
      TextureSize=(512)
      UpdateRate=(0.100)
      StaticSwitch=(100.000)
      Pos=(35.548,5.95,-3.692)
     
  4. Michael Juliano

    Michael Juliano Track Team

    Joined:
    Oct 4, 2010
    Messages:
    371
    Likes Received:
    5
    Yeah, this is a new one on me--never seen this before. Let me think about it for a bit and see if I can come up with anything...
     

Share This Page