Glass Reflectivity
Results 1 to 6 of 6

Thread: Glass Reflectivity

  1. #1

    Glass Reflectivity

    Is there a way to use a hex editor to modify the reflectivity or transparency of the cockpit glass in an aircraft model?

  2. #2
    SOH-CM-2023 mongoose's Avatar
    Join Date
    Jun 2005
    Location
    Navigator, where are we?
    Age
    79
    Posts
    3,555
    Yes! Look in the screenshots thread to around August- September. gecko did some.

    Cato said "Carthaginem esse delendam"
    I say "Carthago iam diu deleta,sed enim Bellum Alium adhuc aedificandum est"

  3. #3
    Yes, I'm doing that constantly. The trick is learning what to look for in the pattern of numbers so you can edit the correct feature.

    *** Always make a back-up copy of the m3d before you start! ***

    The key to seeing the numbers is to have the editor set to show rows of 36 columns. This allows the section you need to find to stand out as all the patterns will start and end in the same vertical columns.

    The section you need to edit is the table of values just before the list of texture file names. (These are referenced in the table by their sequence number in the list. Start counting from the first one being 00.)

    In most cases, but not all, the glass does not have a texture number associated with it. The 8th pair will have some value less than FF (fully opaque). To check to see if I've found the right string of 36 pairs I will temporarily change the value in the 8th pair to FF and then look to see if the windows became opaque in the game.

    My current default values for reflective glass are 00 00 FF 00 99 99 99 12 00 00 00 FF FF FF FF FF 00 00 7E 43 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF

    The third pair being set at FF makes it reflective.

    99 99 99 makes it light grey (BGR sequence) I don't find almost any WWII aircraft that actually had tinted glazing other than small pieces of thick bullet proof glass right in front of the pilot.

    12 makes it fairly transparent. This is based on studying many images from the time period that show barely any cloudiness in the glazing, which would have inhibited visibility.

    7E 43 is the maximum possible value (254) for the specular effect of sun glint. For painted surfaces I use 80 42 (64). https://gregstoll.dyndns.org/~gregstoll/floattohex/ Input floating values to get the hex code

    If there was a texture associated with the glass it would be the next pair after the specular values. For AnKor's shaders to work with glass correctly there should not be any texture assigned to the surface, and occasionally I have to delete it to get the look I want. In most cases this was done inside the cockpit to display a fake reflection of the cockpit interior overlaid on the surface of the glass. The problem is that it's static, and never looks correct from any angle or lighting condition. I usually just kill the static version and let AnKor's shaders take care of it dynamically for me.

    This desire for dynamic lighting effects has also prompted me to redraw a lot of exterior texture files, because prior to these new shaders the modelers had to bake the surface shading features into the texture (light on top, dark underneath). Unfortunately, depending on how the aircraft is maneuvering, this will look wrong most of the time. Additionally, this throws the shader calculations off as well (light colors are given more of a specular effect by the shaders), causing the inaccuracy to persist even with dynamic lighting in effect now.
    US Army, Major, Ret.

    Service To The Line,
    On The Line,
    On Time

    US Army Ordnance Corps.

  4. #4
    SOH-CM-2023 mongoose's Avatar
    Join Date
    Jun 2005
    Location
    Navigator, where are we?
    Age
    79
    Posts
    3,555
    Andy, could you copy that to project knowledge base sticky?

    Cato said "Carthaginem esse delendam"
    I say "Carthago iam diu deleta,sed enim Bellum Alium adhuc aedificandum est"

  5. #5
    Most of it's already there.
    US Army, Major, Ret.

    Service To The Line,
    On The Line,
    On Time

    US Army Ordnance Corps.

  6. #6
    Wow! Great detailed reply. Thanks!

Members who have read this thread: 0

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •