Board index FlightGear Development Effects and shaders

Normalmap (model-combined-deferred) does not work  Topic is solved

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

Normalmap (model-combined-deferred) does not work

Postby TheEagle » Mon Apr 11, 2022 6:46 pm

Hello, I'm trying to give the middle part of my yoke a leathery look with a normalmap, but for some reason FG says "no shader source code defined for effect" when I apply below effect (path is Models/Interior/Panel/Controls/yoke/yoke-normalmap.eff) to an object in Models/Interior/Panel/Controls/yoke/yoke-pilot.xml:
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<PropertyList>
   <name>yoke-normalmap</name>
   <inherits-from>Effects/model-combined-deferred</inherits-from>
   <parameters>
      <normalmap-enabled type="int">1</normalmap-enabled>
      <texture n="2">
         <image>Aircraft/c210-family/Models/Interior/Panel/Controls/yoke/yoke-normalmap.png</image>
      </texture>
   </parameters>
   
   <!--  #######################
      ### NORMALMAP INCLUDE ###
      #######################-->
   <generate>
      <tangent type="int">6</tangent>
      <binormal type="int">7</binormal>
   </generate>

   <technique n="4">
      <pass>
         <program>
            <attribute>
               <name>tangent</name>
               <index>6</index>
            </attribute>
            <attribute>
               <name>binormal</name>
               <index>7</index>
            </attribute>
         </program>
      </pass>
   </technique>

   <technique n="7">
      <pass>
         <program>
            <attribute>
               <name>tangent</name>
               <index>6</index>
            </attribute>
            <attribute>
               <name>binormal</name>
               <index>7</index>
            </attribute>
         </program>
      </pass>
   </technique>

   <technique n="9">
      <pass>
         <program>
            <attribute>
               <name>tangent</name>
               <index>6</index>
            </attribute>
            <attribute>
               <name>binormal</name>
               <index>7</index>
            </attribute>
         </program>
      </pass>
   </technique>
   <!--  ###########################
      ### END NORMALMAP INCLUDE ###
      ###########################-->
</PropertyList>


And here is the complete error report from FG:
Code: Select all
FlightGear 2020.4.0 error report, created at lun., 11 avril 2022 17:56:09 GMT
Category:error-category-aircraft
   Parameter:p210n

Error 1
   code:error-missing-shader
   type:error-type-bad-data
   when:17:55:43 GMT
   No shader source code defined for effect
   location:/home/user/fgfs-addons/Aircraft/c210-family/Models/Interior/Panel/Controls/yoke/yoke-normalmap.eff
   context:
      aircraft-model = Aircraft/c210-family/Models/p210n.xml
      effect = noname
      effect-pass = /technique[7]/pass[0]
      effect-technique = /technique[7]
      model-xml = /home/user/fgfs-addons/Aircraft/c210-family/Models/p210n.xml
      primary-aircraft = yes
   preceeding log:
      /build/workspace/Linux-nightly/simgear/simgear/scene/material/mipmap.cxx:-272:   mipmapping: texture size not a power-of-two: /home/user/fgfs-addons/Aircraft/c210-family/Models/Interior/Panel/Instruments/alt/flag.png
      /build/workspace/Linux-nightly/simgear/simgear/scene/material/mipmap.cxx:-272:   mipmapping: texture size not a power-of-two: /home/user/fgfs-addons/Aircraft/c210-family/Models/Interior/Panel/Instruments/tc/turn-coordinator-airplane.png
      /build/workspace/Linux-nightly/simgear/simgear/scene/material/mipmap.cxx:-272:   mipmapping: texture size not a power-of-two: /home/user/fgfs-addons/Aircraft/c210-family/Models/Interior/Panel/Avionics/com-nav/com-nav.png
      /build/workspace/Linux-nightly/simgear/simgear/scene/material/mipmap.cxx:-272:   mipmapping: texture size not a power-of-two: /home/user/fgfs-addons/Aircraft/c210-family/Models/Interior/Panel/Instruments/hobbs/hobbs.png
      /build/workspace/Linux-nightly/simgear/simgear/scene/material/mipmap.cxx:-272:   mipmapping: texture size not a power-of-two: /home/user/fgfs-addons/Aircraft/c210-family/Models/Interior/Panel/Controls/flaps/flaps.png
      /build/workspace/Linux-nightly/simgear/simgear/scene/material/mipmap.cxx:-272:   mipmapping: texture size not a power-of-two: /home/user/fgfs-addons/Aircraft/c210-family/Models/Interior/Panel/Controls/right-controls-panel.png

Command line / launcher / fgfsrc options
   launcher
   download-dir=/home/user.fgfs
   prop:/nasal/local_weather/enabled=true
   prop:/sim/gui/dialogs/metar/mode/global-weather=false
   prop:/sim/gui/dialogs/metar/mode/local-weather=true
   prop:/sim/gui/dialogs/metar/mode/manual-weather=true
   metar=XXXX 012345Z 15000KT 12SM SARA FEW050 SCT100 SCT150 15/M02 Q1013
   prop:/environment/weather-scenario=Manual input
   prop:/local-weather/tmp/tile-management=METAR
   prop:/local-weather/tmp/tile-type=manual
   start-date-sys=2021:12:21:12:00:00
   httpd=8080
   prop:/sim/rendering/multi-sample-buffers=1
   prop:/sim/rendering/multi-samples=2
   prop:/sim/rendering/texture-cache/cache-enabled=false
   geometry=1364 x 708
   enable-terrasync
   prop:/sim/multiplay/txhost=mpserver01.flightgear.org
   prop:/sim/multiplay/txport=5000
   callsign=F-EAGLE
   enable-freeze
   enable-sentry
   developer
   aircraft-dir=/home/user/fgfs-addons/Aircraft/c210-family
   aircraft=p210n
   airport=SAWH
   runway=07
   fg-aircraft=/home/user/fgfs-addons/Aircraft
   fg-aircraft=/home/user/.fgfs/Aircraft/org.flightgear.fgaddon.trunk
   addon=/home/user/fgfs-addons/LandingChallenge
   addon=/home/user/fgfs-addons/MissionGenerator
   addon=/home/user/fgfs-addons/HEMSGen
   addon=/home/user/fgfs-addons/fgcom-mumble

Properties:
   /sim/aircraft-id: p210n
   /sim/aircraft-dir: /home/user/fgfs-addons/Aircraft/c210-family
   /sim/rendering/gl-version: 4.6.0 NVIDIA 390.144
   /sim/rendering/gl-renderer: GeForce GT 520M/PCIe/SSE2
   /sim/rendering/gl-shading-language-version: 4.60 NVIDIA
   /sim/rendering/max-texture-size: 16384
   /sim/rendering/max-texture-units: 4
   /sim/rendering/shaders/skydome: false
   /sim/rendering/shaders/water: 5
   /sim/rendering/shaders/model: 3
   /sim/rendering/shaders/landmass: 4
   /sim/rendering/shaders/vegetation-effects: 1
   /sim/rendering/shaders/transition: 4
   /sim/rendering/max-paged-lod: 100
   /sim/rendering/photoscenery/enabled: true
   /sim/rendering/preset-description: not defined
   /sim/rendering/multithreading-mode: not defined
   /sim/rendering/multi-sample-buffers: true
   /sim/rendering/multi-samples: 2
   /scenery/use-vpb: false



P.S.: The parts of the normal map texture which no vertices are mapped to I have made fully transparent - could that be a problem ?
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: Normalmap (model-combined-deferred) does not work  

Postby TheEagle » Mon Apr 18, 2022 5:04 pm

Actually I wasn't doing anything wrong other than testing with a 1 year old 2020.4.0 AppImage ! :mrgreen: Works with the stable versions.
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


Return to Effects and shaders

Who is online

Users browsing this forum: No registered users and 4 guests