I ask for help to understand how the P3D V4 SKD IRSceneryObject script works. I installed the script, the object appeared in the scenario as expected (Eglin AFB - KVPS), I think its working seems to have something to do with the time of day, but I do not know how produce the expected practical effect.
Help to undertanding a lua script from P3D V4 SDK
-
- Posts: 240
- Joined: Wed Mar 28, 2012 5:52 am
- Location: Rio de Janeiro, Brazil.
- Contact:
Re: Help to undertanding a lua script from P3D V4 SDK
Hi Luis,
I don't understand what exactly you are asking for with the "expected practical effect". Yes, in the example
gives you the actual simulator time of day in percent and
sets the temperatureScale depending on the time of day.
With
the temperatureScale is then written back to modify the material rendering of the object.
Greets, Benny
I don't understand what exactly you are asking for with the "expected practical effect". Yes, in the example
Code: Select all
local secondsPerDay = 60 * 60 * 24
local percentOfDay = varget("E:LOCAL TIME", "Number") / secondsPerDay
Code: Select all
local temperatureScale = 1.0
if percentOfDay < 0.5 then
temperatureScale = minimumScale + ((percentOfDay / 0.5) * (maximumScale - minimumScale))
else
temperatureScale = minimumScale + (((1.0 - percentOfDay) / 0.5) * (maximumScale - minimumScale))
end
With
Code: Select all
varset("T:TemperatureScale", "Number", temperatureScale)
Greets, Benny
-
- Posts: 240
- Joined: Wed Mar 28, 2012 5:52 am
- Location: Rio de Janeiro, Brazil.
- Contact:
Re: Help to undertanding a lua script from P3D V4 SDK
Hi, Benny. Thanks for your feedback.
I understood the question of temperature and time of day, but how do I see it working into the simulator? I used the time preview to vary the time but I did not notice any modification in material rendering. I saw only the shadows moving as the time going to forward / backward. Maybe the shadows had maked a confusion in my eyes. I will see again this time with double of attention.
Best regards.
I understood the question of temperature and time of day, but how do I see it working into the simulator? I used the time preview to vary the time but I did not notice any modification in material rendering. I saw only the shadows moving as the time going to forward / backward. Maybe the shadows had maked a confusion in my eyes. I will see again this time with double of attention.
Best regards.
Re: Help to undertanding a lua script from P3D V4 SDK
Maybe I'm mistaken... but I think you're messing with an object's infrared image.
Ed Wilson
Senior Developer
Mindstar Aviation
Senior Developer
Mindstar Aviation
-
- Posts: 240
- Joined: Wed Mar 28, 2012 5:52 am
- Location: Rio de Janeiro, Brazil.
- Contact:
Re: Help to undertanding a lua script from P3D V4 SDK
Yes, it is about infrared. I am trying to understand how It Works.
Re: Help to undertanding a lua script from P3D V4 SDK
You need to be in an IR camera mode to see the difference.
Jonathan Bleeker
Milviz systems dev
Formerly known as Naruto-kun
Milviz systems dev
Formerly known as Naruto-kun
-
- Posts: 240
- Joined: Wed Mar 28, 2012 5:52 am
- Location: Rio de Janeiro, Brazil.
- Contact:
Re: Help to undertanding a lua script from P3D V4 SDK
Thanks, JB3DG. Only working in NVG (Night Vision Google).
First two in NVG BLACK HOT with time offset from 00:00 to 12:00.
Last two in NVG WHITE HOT with time offset from 00:00 to 12:00.
First two in NVG BLACK HOT with time offset from 00:00 to 12:00.
Last two in NVG WHITE HOT with time offset from 00:00 to 12:00.
-
- Posts: 240
- Joined: Wed Mar 28, 2012 5:52 am
- Location: Rio de Janeiro, Brazil.
- Contact:
Re: Help to undertanding a lua script from P3D V4 SDK
As shown in the screenshots above at 12 o'clock the texture modified by the script for the object under study differs (from light to dark) from the others objects in scenery. At 00:00 o'clock the textures light or dark are equal for all objects.