Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

C182T: Pedestal lightmap is broken #460

Open
wlbragg opened this issue Nov 26, 2021 · 12 comments · May be fixed by #532
Open

C182T: Pedestal lightmap is broken #460

wlbragg opened this issue Nov 26, 2021 · 12 comments · May be fixed by #532
Labels

Comments

@wlbragg
Copy link
Collaborator

wlbragg commented Nov 26, 2021

First, my card is a fairly high end nVidia. The Glare shield lighting is slightly bright and just looks off. I found no control option or dial for it, it appears to be on by default.

The other lighting effect that is really off is the pedestal lighting. On my system it washes out much of the textures it is affecting. All the other lighting effects are good. I'm not sure this is just a question of brightness or if something is wrong.

Ok, after looking at the lightmaps I think I see what is wrong. the lightmap for the model T doesn't look like a lightmap at all. I can only guess at what happened.

       <inherits-from>Aircraft/c182s/Models/Effects/c182T_glareshield</inherits-from>

calls a multicolor lightmap

<texture n="3">
      <image>Aircraft/c182s/Models/Effects/LMPanel-c182T.png</image>
      <type>2d</type>
      <filter>linear-mipmap-linear</filter>
      <internal-format>normalized</internal-format>
    </texture>
    <lightmap-enabled type="int">1</lightmap-enabled>
    <lightmap-multi type="int">1</lightmap-multi>
    <lightmap-factor type="float" n="0"><use>/systems/electrical/outputs/dome-light-l</use></lightmap-factor>
    <lightmap-color type="vec3d" n="0">1.0 1.0 0.99 </lightmap-color>
    <lightmap-factor type="float" n="1"><use>/systems/electrical/outputs/dome-light-r</use></lightmap-factor>
    <lightmap-color type="vec3d" n="1">1.0 1.0 0.99</lightmap-color>
    <lightmap-factor type="float" n="2"><use>/systems/electrical/outputs/glareshield-lights-norm</use></lightmap-factor>
    <lightmap-color type="vec3d" n="2">0.99 0.99 1.0</lightmap-color>
    <lightmap-factor type="float" n="3"><use>/systems/electrical/outputs/pedestal-lights-norm</use></lightmap-factor>
    <lightmap-color type="vec3d" n="3">1.0 1.0 0.98</lightmap-color>

This is the lightmap that is supposed to be 4 color and it is huge. I had to scale it down from 5000x5000 to 640 in order to post it here.
LMPanel-c182T

@wlbragg wlbragg changed the title Glare shield lighting may be too bright Pedestal lightmap is broken Nov 26, 2021
@wlbragg
Copy link
Collaborator Author

wlbragg commented Nov 27, 2021

I tested using LMCabin.png instead of c182T_glareshield.png. It works somewhat better, but obviously not perfect

@hbeni
Copy link
Collaborator

hbeni commented Dec 12, 2021

Unfortunately I have no experience with the lightmap effects and need help to fix this

@wlbragg
Copy link
Collaborator Author

wlbragg commented Dec 15, 2021

@hbeni do you know where LMPanel-c182T.png came from. I ask because it looks like it is a generated ambient occlusion map. If it is, then someone made it. probably from blender. Whoever made that should have the blend that was used to generate it. It would be a matter of using that blend to make a four color lightmap instead. I imported the interior model interior-model-c182t.ac into blender and It looks like it could be used as is to generate the 4 color lightmap from. but it is just the panel. You have to generate maps for everything else the lights might touch.
LMCabin.png
LMControls.png
LMPanel.png
LMSeats.png
I think what happened is they were never done or they all use the same lightmap as nothing changed other than the panel and controls. They of course totally different. I'd guess LMControls.png and LMPanel.png are the only ones that changed and need burned. The only thing keeping me from burning them is knowing what placement and settings to use for the lite effects.
The way it is done in Blender is you set an actual light or lights in the blend file and give them the correct intensities. Then you burn the lightmap. I don't know the placement of any of the lights or what settings were used on the c182. I could possibly come up with something plausible (better than nothing and better than what is there now.

When I posted

I tested using LMCabin.png instead of c182T_glareshield.png. It works somewhat better, but obviously not perfect

I used the lightmap for the c182 which after looking at the uv-mapping is totally different than the 182t. I'm surprised it worked as well as it did.

This is c182t uv-map for the panel.
182t
This is c182 uv-map for the panel.
182

@wlbragg
Copy link
Collaborator Author

wlbragg commented Dec 15, 2021

I took a look at LMControls and it is the yoke and other stuff, so it may not have changed much if any. So I guess it is just the panel, or more accurately as related to the file definition, c182s_glareshield. But it would be a pretty complex burn. You would start with the panel and then have to burn all the switches and knob additive to the panel one at a time, I think. That is probably why it never got finished.

@HHS81
Copy link
Owner

HHS81 commented Dec 15, 2021

@hbeni do you know where LMPanel-c182T.png came from. I ask because it looks like it is a generated ambient occlusion map. If it is, then someone made it. probably from blender. Whoever made that should have the blend that was used to generate it.

That was originally me, and no - it should not use a generated ambient occlusion map. It should use the generated multilight map. (something like you did for the SpaceShuttle) Only made for the c182s-mainpanel. And that`s the problem- it simply doesn´t work for the c182t-panel. You can´t use the lightmap of the c182s for the c182t.
The lightmap should be completly redone for the panel of the c182t.

@hbeni hbeni changed the title Pedestal lightmap is broken C182T: Pedestal lightmap is broken Feb 10, 2022
@hbeni hbeni linked a pull request Nov 28, 2023 that will close this issue
@TheFGFSEagle
Copy link
Contributor

Umm, you keep in mind that there is a compositor light illuminating the pedestal ? Especially the ambient color for that can really wash out the original color, if too bright.

@hbeni
Copy link
Collaborator

hbeni commented Nov 29, 2023

Thats already true for the S variant too. And it doesn't look bad in my opinion.

@TheFGFSEagle
Copy link
Contributor

I quite liked it, too. @wlbragg could you maybe post a screenshot of the actual issue ?

@wlbragg
Copy link
Collaborator Author

wlbragg commented Nov 30, 2023

there is a compositor light illuminating the pedestal

I guess I didn't know that. I'll have to check that out as well.

Glareshield
glare

Pedestal
pedestal

The glareshield works but could be better.

@TheFGFSEagle
Copy link
Contributor

Ahem … that is definitely not the compositor light (it illuminates basically only the elevator trim display) - there is something wrong with the lightmap !

@wlbragg
Copy link
Collaborator Author

wlbragg commented Dec 1, 2023

c182s
182s-pedestal

182t
182t-pedestal

@hbeni
As far as the "pedestal" compositor and lightmap light is concerned...

  1. Is the pedestal compositor light only supposed to illuminate part of the elevator trim as we see in the 182s image, is that the correct amount of coverage for the pedestal light?
  2. What about the pedestal lightmap then, what is it supposed to illuminate? If the pedestal lightmap is supposed to illuminate the same thing then why have both? Plus, there is only one control dial to control both methods of illuminating the pedestal.
  3. The 182t pedestal compositor light is not illuminating as much of the elevator trim nor is it as bright as the 182s. So I assume it is definitely wrong, correct?
  4. Is the pedestal compositor and/or lightmap light supposed to illuminate the fuel selector?

As far as the glareshield lightmap light is concerned...

  1. Is it supposed to illuminate all the way down to the elevator trim?
  2. Is it supposed to illuminate all the way down to the fuel selector?

@hbeni
Copy link
Collaborator

hbeni commented Dec 1, 2023

Is the pedestal compositor light only supposed to illuminate part of the elevator trim as we see in the 182s image, is that the correct amount of coverage for the pedestal light?

The C182S models this nicely and could be used as reference. Yes, only part of the trim wheel is lit. The Pedestal light should also illuminate the fuel tank selector:
grafik

What about the pedestal lightmap then, what is it supposed to illuminate? If the pedestal lightmap is supposed to illuminate the same thing then why have both? Plus, there is only one control dial to control both methods of illuminating the pedestal.

Yes, there is only one knob to control the pedestal light. Its just a small light above the elevator trim wheel.
The lightmap was the "old" method of implementing it, and it lacked lighting of the trim wheel and the fuel tank selector. I wanted a light effect on them too, so the only way (at least for me) to get this was a compositor light. I liked the lightmap producing the softer cone and the overall appearance on the texture better than just the compositor light cone; so I kept the lightmap. Also I have no clue of lightmaps and didn't want to break anything.
Is there a better way to implement this?

The 182t pedestal compositor light is not illuminating as much of the elevator trim nor is it as bright as the 182s. So I assume it is definitely wrong, correct?

It should behave completely the same as in the c182s in my opinion.

Is the pedestal compositor and/or lightmap light supposed to illuminate the fuel selector?

The pedestal yes. I think the glareshield light is way too intense in the T variant right now. I think with full glareshield light intensity, the cabin as a whole should reflect/scatter some of the light, and also the fuel selector, like it does already in the C182s. I assume this is done via the cabins light map. In the S variant also the radio stack makes the cabin a little red at night and full radio lights with all radios on.

As far as the glareshield lightmap light is concerned...

Is it supposed to illuminate all the way down to the elevator trim?
Is it supposed to illuminate all the way down to the fuel selector?

I would expect it to be the same as in the 182S. So: Yes, and Yes (both with high intensity, low intensity should not reach the fuel selector)

grafik

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants