Board index FlightGear Development Effects and shaders

Lightmap issue with logo light

An exciting "new" option in FlightGear, that includes reflections, lightmaps, the particle system etc.. A lot is yet to be discovered/implemented!

Lightmap issue with logo light

Postby scarymovie » Wed Mar 15, 2023 9:46 am

Hi everyone, I am trying to correct an issue with the logo light lightmap. It seems that the logo light is missing a part which is the rudder.
Image

The "Rudder" object is included in the effect.
Code: Select all
<effect>
      <inherits-from>Effects/CRJ700lightmap-lowreflect</inherits-from>
      <parameters>
         <lightmap-multi>1</lightmap-multi>
         <lightmap-factor n="0"><use>sim/model/lights/landing-left-lightmap</use></lightmap-factor>
         <!-- <lightmap-color type="vec3d" n="0"> 1.0 0.95 0.6 </lightmap-color> -->
         <lightmap-factor n="1"><use>sim/model/lights/landing-right-lightmap</use></lightmap-factor>
         <!-- <lightmap-color type="vec3d" n="1"> 1.0 0.95 0.6 </lightmap-color> -->
         <lightmap-factor n="2"><use>sim/model/lights/logo-lightmap</use></lightmap-factor>
         <!-- <lightmap-color type="vec3d" n="2"> 1.0 1.0 1.0 </lightmap-color> -->
         <lightmap-factor n="3"><use>sim/model/lights/landing-nose-lightmap</use></lightmap-factor>
         <!-- <lightmap-color type="vec3d" n="3"> 1.0 1.0 1.0 </lightmap-color> -->
         <texture n="3">
            <image>Effects/Lightmaps/CRJ700-fuselage-lightmap.png</image>
         </texture>
      </parameters>
      <object-name>Fuselage.001</object-name>
      <object-name>Belly</object-name>
      <object-name>Belly.001</object-name>
      <object-name>LeftDoor</object-name>
      <object-name>RightDoor</object-name>
      <object-name>APUDoor</object-name>
      <object-name>CargoDoorCtr</object-name>
      <object-name>CargoDoorAft</object-name>
      <object-name>GearNDoorLInt</object-name>
      <object-name>GearNDoorCInt</object-name>
      <object-name>GearNDoorRInt</object-name>
      <object-name>GearNDoorL</object-name>
      <object-name>GearNDoorC</object-name>
      <object-name>GearNDoorR</object-name>
      <object-name>Hstabs</object-name>
      <object-name>Vstab.001</object-name>
      <object-name>Rudder</object-name>
      <object-name>ElevatorL</object-name>
      <object-name>ElevatorR</object-name>
      <object-name>EnginePylons</object-name>
      <object-name>Antennas</object-name>
   </effect>


What else do I need to check in order to fix this? Thank you, guys.
scarymovie
 
Posts: 214
Joined: Wed Nov 21, 2007 3:34 pm
Location: Singapore

Re: Lightmap issue with logo light

Postby TheEagle » Tue Mar 21, 2023 8:22 pm

You need to look a the blue channel only of your lightmap texture and check if the rudder is actually lit there.
Cessna 210 (Wiki)
My other aircraft: my wiki profile !
Other: FGTools (GitHub)
World tour: View on SkyVector
Please consider donating $1 / €1 to help me finance a new camera !
User avatar
TheEagle
 
Posts: 3411
Joined: Sat May 01, 2021 3:27 pm
Location: France
Pronouns: You, he
Callsign: F-EAGLE
IRC name: none
Version: Git next
OS: Ubuntu Studio 22.04

Re: Lightmap issue with logo light

Postby scarymovie » Thu Mar 23, 2023 1:16 pm

TheEagle wrote in Tue Mar 21, 2023 8:22 pm:You need to look a the blue channel only of your lightmap texture and check if the rudder is actually lit there.


Hi TheEagle, should I import the model into Blender to check this?

Thank you.
scarymovie
 
Posts: 214
Joined: Wed Nov 21, 2007 3:34 pm
Location: Singapore

Re: Lightmap issue with logo light

Postby scarymovie » Thu Mar 23, 2023 1:19 pm

I guess this is the one I should look at?

Code: Select all
<?xml version="1.0" encoding="UTF-8" ?>

<PropertyList>
   <name>Effects/CRJ700-lightmap-reflect_low</name>
   <inherits-from>/Effects/model-combined-deferred</inherits-from>
   <parameters>
      <!-- Light map -->
      <lightmap-enabled type="int">1</lightmap-enabled>
      <texture n="3">
         <filter>linear-mipmap-linear</filter>
         <internal-format>normalized</internal-format>
      </texture>
      <!-- Reflection -->
      <reflection-enabled type="int">1</reflection-enabled>
      <reflection-correction type="float">-1</reflection-correction>
      <reflection-dynamic type="int">1</reflection-dynamic>
   </parameters>
</PropertyList>
scarymovie
 
Posts: 214
Joined: Wed Nov 21, 2007 3:34 pm
Location: Singapore

Re: Lightmap issue with logo light

Postby TheEagle » Thu Mar 23, 2023 5:23 pm

You must look at the texture Effects/Lightmaps/CRJ700-fuselage-lightmap.png, and yes, this is most easily done in Blender, in the UV editor.
Cessna 210 (Wiki)
My other aircraft: my wiki profile !
Other: FGTools (GitHub)
World tour: View on SkyVector
Please consider donating $1 / €1 to help me finance a new camera !
User avatar
TheEagle
 
Posts: 3411
Joined: Sat May 01, 2021 3:27 pm
Location: France
Pronouns: You, he
Callsign: F-EAGLE
IRC name: none
Version: Git next
OS: Ubuntu Studio 22.04

Re: Lightmap issue with logo light

Postby wlbragg » Thu Mar 23, 2023 5:52 pm

I tried following the suggestion of looking at the lightmap using the UV editor. I'm not sure that is the "easiest" way for someone that might not be familiar with Blender or lightmaps. You would need to know how lightmaps are generated and have the Blend that produced the lightmap in order to follow this suggestion "easily".

What TheEagle is suggesting is that the lightmap (.png image file) is maybe missing the rudder in the lightmap image. Using Blender as suggested would be a good idea if you have the lightmap and the Blend it was originated from. If not then you might have to import the .ac into Blender and look at the mapping of the rudder area and try to identify a lightmap that was generated for that part of the aircraft. There may not be one, thus why it's not working.

@scarymovie where did you get this aircraft from? I could explain in more detail if I knew the source and could give you examples from that same source. Also someone else, including myself, might be able to help identify the issue.

Look at this, it might help explain what you're looking for if using Blender.
Kansas and Ohio/Midwest scenery development.
KEQA, 3AU, KRCP Airport Layout
Intel i7/GeForce RTX 2070/Max-Q
User avatar
wlbragg
 
Posts: 7586
Joined: Sun Aug 26, 2012 12:31 am
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Linux/RTX 2070

Re: Lightmap issue with logo light

Postby scarymovie » Thu Mar 23, 2023 6:23 pm

wlbragg wrote in Thu Mar 23, 2023 5:52 pm:I tried following the suggestion of looking at the lightmap using the UV editor. I'm not sure that is the "easiest" way for someone that might not be familiar with Blender or lightmaps. You would need to know how lightmaps are generated and have the Blend that produced the lightmap in order to follow this suggestion "easily".

What TheEagle is suggesting is that the lightmap (.png image file) is maybe missing the rudder in the lightmap image. Using Blender as suggested would be a good idea if you have the lightmap and the Blend it was originated from. If not then you might have to import the .ac into Blender and look at the mapping of the rudder area and try to identify a lightmap that was generated for that part of the aircraft. There may not be one, thus why it's not working.

@scarymovie where did you get this aircraft from? I could explain in more detail if I knew the source and could give you examples from that same source. Also someone else, including myself, might be able to help identify the issue.

Look at this, it might help explain what you're looking for if using Blender.


Hi wlbragg, this is the CRJ 700 aircraft. I'm not sure how the lightmap was built but tried to look at it in blender. No luck in finding anything out. Not sure what i should be looking for. Thank you so much. :)
scarymovie
 
Posts: 214
Joined: Wed Nov 21, 2007 3:34 pm
Location: Singapore

Re: Lightmap issue with logo light

Postby wlbragg » Thu Mar 23, 2023 7:47 pm

Here is what's going on.

This is the portion of the aircraft that has a lightmap applied. (file Aircraft\CRJ700-family\ModelsCRJ700.ac)
Image

This is the current lightmap (file Aircraft\CRJ700-family\Models\Effects\LightmapsCRJ700-fuselage-lightmap.png)
It is the blue channel as TheEagle explained.
Image

This is the portion of the aircraft that is missing the lightmap (file Aircraft\CRJ700-family\ModelsCRJ700.ac)
Image

This is what the lightmap needs to look like to get light on the rudder.
Image

You could paint it on to the area of the lightmap that needs it as I have done.
Kansas and Ohio/Midwest scenery development.
KEQA, 3AU, KRCP Airport Layout
Intel i7/GeForce RTX 2070/Max-Q
User avatar
wlbragg
 
Posts: 7586
Joined: Sun Aug 26, 2012 12:31 am
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Linux/RTX 2070

Re: Lightmap issue with logo light

Postby scarymovie » Fri Mar 24, 2023 2:17 pm

Hi wlbragg and TheEagle, thank you so much (and many thanks for the illustrations, wlbragg). That fixed the issue. Now I learned so much about lightmap. :D
scarymovie
 
Posts: 214
Joined: Wed Nov 21, 2007 3:34 pm
Location: Singapore

Re: Lightmap issue with logo light

Postby wlbragg » Fri Mar 24, 2023 3:39 pm

Your welcome. Once the mystery is removed things suddenly look much easier.
Kansas and Ohio/Midwest scenery development.
KEQA, 3AU, KRCP Airport Layout
Intel i7/GeForce RTX 2070/Max-Q
User avatar
wlbragg
 
Posts: 7586
Joined: Sun Aug 26, 2012 12:31 am
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Linux/RTX 2070


Return to Effects and shaders

Who is online

Users browsing this forum: No registered users and 5 guests