v5.2 combination PBR+O:Weather.AmbientPrecipState NOT WORK

SDK supports Prepar3D’s philosophy of an open development architecture and encourages third parties to bring new innovations with improved add-ons and training content.
Post Reply
Wonderboy
Posts: 65
Joined: Wed Feb 11, 2015 2:58 pm

v5.2 combination PBR+O:Weather.AmbientPrecipState NOT WORK

Post by Wonderboy »

I always believed that the developers from LM, although they do not always respond to messages, at least secretly fix bugs for the release of a new version of the simulator. But this bug has been going on since version 4, maybe it's time to finally pay attention to it?

А problem with the combination "T:AlbedoTexture + O:Weather.AmbientPrecipState". Once you remove the PBR material from the material properties and switch to diffuse texture control (T:DiffuseTexture), all problems evaporate.
But if O: Weather.AmbientPrecipState is replaced with A: AMBIENT PRECIP STATE, the texture starts showing. Of course, now it is always shown, but at least this allows you to make sure that the problem is not in the numbering of Z-layers.

Again. This code woks:

Code: Select all

!lua
local raining = 0x00000004
local snowing = 0x00000008
local StringNew

local precipState = varget("O:Weather.AmbientPrecipState", "Mask")
precipState = math.floor(precipState)

  if precipState == raining then
      StringNew="WetEffect_ON.dds"
  elseif precipState == snowing then
      StringNew="WetEffect_ON.dds"
  else
      StringNew="WetEffect_OFF.dds"
  end
varset("T:DiffuseTexture","String",StringNew)
But if in this code you replace the only last line with

Code: Select all

varset("T:AlbedoTexture","String",StringNew)
it stops working

And yes, the problem is clearly not with the material, since without scripts it is shown exactly as it should.


I am reliably aware that at least one of the major port developers has repeatedly informed you about a problem with this particular combination, but so far nothing has been done. They had to use SODE. Well, be men, or write "use SODE, we are impotents" or finally fix this damn bug with PBR materials. Thank you.
12700K @4.8 GHz, 3080ti, 32 Gb DDR4-3400
Post Reply