Jump to content
Tom Knudsen

Flying with Lua

Recommended Posts

Makes everything more beutiful

set( "sim/private/controls/clouds/cloud_shadow_lighten_ratio",       0.85 )set( "sim/private/controls/atmo/atmo_scale_raleigh",        20.0 )set( "sim/private/controls/atmo/inscatter_gain_mie",     5.0 )set( "sim/private/controls/atmo/inscatter_gain_raleigh",        10.0 )set( "sim/private/controls/atmo/scatter_raleigh_b",         40 )set( "sim/private/controls/atmo/scatter_raleigh_g",      10.30 )set( "sim/private/controls/atmo/scatter_raleigh_r",    0.010 )set( "sim/private/controls/skyc/white_out_in_clouds",     0.5 )set( "sim/private/controls/clouds/plot_radius",    1.20 )set( "sim/private/controls/clouds/soft_occlude",  1.00 )set( "sim/private/controls/skyc/mie_scattering_foggy",  25.000 )set( "sim/private/controls/skyc/mie_scattering_ocast",  7.00 )set( "sim/private/controls/lights/bloom_far", 3000.00 )set( "sim/private/controls/lights/bloom_near", 120.00 )set( "sim/private/controls/lights/mix_big", 80.000 )set( "sim/private/controls/lights/mix_small", 25.00)set( "sim/private/controls/lights/bloom_for_zoom", 0.60)set( "sim/private/controls/hdr/gain_min", -4.8)set( "sim/private/controls/clouds/ambient_gain", 4.0)

Original thread

http://forum.avsim.net/topic/433908-experimenting-with-art-controls-raleigh-scattering/page-8

 

Athmospheric Scattering and light correction

 

xp_test4.PNG

xp_test5.PNG

xp_test7.PNG

xp_test9.PNG

xp_test10.PNG

 

 

There is a developer thread over at http://xp-developer.com/index.php?/topic/39-experimenting-with-art-control-avsimcom-thread/#entry100

Edited by Tom Knudsen
  • Upvote 4

Share this post


Link to post
Share on other sites

Very nice indeed :)

 

I have downloaded flywithlua and put it in my pluginsfolder but how do i get your script to work?

 

It only works with HDR on right?...i think i got it working by copying the script and put .lua as file ending then putting it in the scripts folder?

Edited by P3R

Share this post


Link to post
Share on other sites

1. Download the Fly with Lua script

2. Unzip and place the folder into your plugin folder as described in the readme

3. Make sure you have xsquawkbox installed

4. Delete all .lua scripts in the /Resource/plugin/FlywithLua/Script folder

5. Open Notepad and paste in the code

 

set( "sim/private/controls/clouds/cloud_shadow_lighten_ratio", 0.85 )
set( "sim/private/controls/atmo/atmo_scale_raleigh", 20.0 )
set( "sim/private/controls/atmo/inscatter_gain_mie", 5.0 )
set( "sim/private/controls/atmo/inscatter_gain_raleigh", 10.0 )
set( "sim/private/controls/atmo/scatter_raleigh_b", 40 )
set( "sim/private/controls/atmo/scatter_raleigh_g", 10.30 )
set( "sim/private/controls/atmo/scatter_raleigh_r", 0.010 )
set( "sim/private/controls/skyc/white_out_in_clouds", 0.5 )
set( "sim/private/controls/clouds/plot_radius", 1.20 )
set( "sim/private/controls/clouds/soft_occlude", 1.00 )
set( "sim/private/controls/skyc/mie_scattering_foggy", 25.000 )
set( "sim/private/controls/skyc/mie_scattering_ocast", 7.00 )
set( "sim/private/controls/lights/bloom_far", 3000.00 )
set( "sim/private/controls/lights/bloom_near", 120.00 )
set( "sim/private/controls/lights/mix_big", 80.000 )
set( "sim/private/controls/lights/mix_small", 25.00)
set( "sim/private/controls/lights/bloom_for_zoom", 0.60)
set( "sim/private/controls/hdr/gain_min", -4.8)
set( "sim/private/controls/clouds/ambient_gain", 4.0)

 

6. Make sure you save the file as "save all not text" and lable the extention with .lua

 

i.e  scattering.lua or test.lua

 

7. make sure this file is then put into the /Resource/plugin/FlywithLua/Script folder

 

8. Start X-Plane and Enjoy it

Share this post


Link to post
Share on other sites

Hi Tom, nice tweak, also because it's automatically loaded at startup. I tried but I found the overall appearance really blueish...and somewere not really nice. Can you explain how to tweak that? I use HDR.

Thanks a lot

Share this post


Link to post
Share on other sites

Finally rocking some awsome lights. Tidy up the code right now for sharing, but here is some screens

 

Dusk over ENBO

 

xp_test14.PNG

Night at the same location

xp_test13.PNG

  • Upvote 1

Share this post


Link to post
Share on other sites

Hi Tom, nice tweak, also because it's automatically loaded at startup. I tried but I found the overall appearance really blueish...and somewere not really nice. Can you explain how to tweak that? I use HDR.

Thanks a lot

 

Mat, did you try without HDR?  I like Tom's screenshots but want to make sure I do not mess things up.

 

Maybe I wait till Tom optimize for sharing the LUA settings.

 

Tom, does it have to be run with HDR on?

 

Cheers, AJ  ;)

Share this post


Link to post
Share on other sites

Well it should improve default light, but after starting to use Michel's athmospheric scattering tweak with HDR and Johns SkyMaxx Pro

I would never turn back that road, af far as I can see, just minor impact on FPS, but then my SMP is personally tweaked to my liking.

So to answer your question, yes but it is better and more suited with HDR on (kinda funny because i used to hate the HDR feature LOL)

Share this post


Link to post
Share on other sites

Here is two for testing, please report back to this thread or xp-developer.com

 

Place them into the FlyWithLua/Script folder

 

art_test.lua = Athmospheric Scattering by Michel T minus the light entry

 

light_test.lua = All my light entry with personally tweak.

 

PS..

Besides those two, my script folder is emtpy, SkyMaxx Pro is installed (settings included)

 

Upload failed due to restrictions, so here is the code...

 

 

 

 

Light

set( "sim/private/controls/light/random_percent=", 0.10)set( "sim/private/controls/lighting/deferred_uses_stencil", 0.00)set( "sim/private/controls/lights/3d/constant_atten", 1.00)set( "sim/private/controls/lights/3d/rheo_rgb_curve", 1.00)set( "sim/private/controls/lights/3d/rheo_size_curve", 1.00)set( "sim/private/controls/lights/always_night_lights", 1.00)set( "sim/private/controls/lights/beacon_rotate_billboard", 1.00)set( "sim/private/controls/lights/beacon_rotate_spill", 0.20)set( "sim/private/controls/lights/beacon_strobe_billboard", 1.00)set( "sim/private/controls/lights/beacon_strobe_spill", 0.10)set( "sim/private/controls/lights/bloom_far", 100.00 )set( "sim/private/controls/lights/bloom_for_zoom", 1.00)set( "sim/private/controls/lights/bloom_near", 10.00 )set( "sim/private/controls/lights/dist_far", 100.00)set( "sim/private/controls/lights/dist_near", 80.00)set( "sim/private/controls/lights/exponent_far", 0.45)set( "sim/private/controls/lights/exponent_near", 0.40)set( "sim/private/controls/lights/fat_omni_cutoff", 0.707)set( "sim/private/controls/lights/hdr_mix", 0.60)set( "sim/private/controls/lights/kill_dynamic_billboards", 0.00)set( "sim/private/controls/lights/kill_dynamic_spill", 0.00)set( "sim/private/controls/lights/lod_max_static_bb", 1.00)set( "sim/private/controls/lights/lod_max_static_gnd", 1.00)set( "sim/private/controls/lights/lod_max_static_sp", 1.00)set( "sim/private/controls/lights/mix_big", 64.00)set( "sim/private/controls/lights/mix_small", 16.00)set( "sim/private/controls/lights/mix_weather_fog", 0.30)set( "sim/private/controls/lights/mix_weather_rain", 0.10)set( "sim/private/controls/lights/scale_far", 0.80)set( "sim/private/controls/lights/scale_near", 0.50)set( "sim/private/controls/lights/spill_scale", 66.00)set( "sim/private/controls/lights/srgb_gamma", 2.20)set( "sim/private/controls/lights/use_srgb", 1.00)set( "sim/private/controls/lights/vasi_papi_red_b", 0.90)set( "sim/private/controls/lights/vasi_papi_red_g", 0.60)set( "sim/private/controls/lights/vasi_papi_red_r", 0.80)set( "sim/private/controls/lights/vasi_papi_white_b", 1.00)set( "sim/private/controls/lights/vasi_papi_white_g", 0.50)set( "sim/private/controls/lights/vasi_papi_white_r", 1.00)

art

set( "sim/private/controls/clouds/cloud_shadow_lighten_ratio",       0.85 )set( "sim/private/controls/atmo/atmo_scale_raleigh",        20.0 )set( "sim/private/controls/atmo/inscatter_gain_mie",     5.0 )set( "sim/private/controls/atmo/inscatter_gain_raleigh",        10.0 )set( "sim/private/controls/atmo/scatter_raleigh_b",         40 )set( "sim/private/controls/atmo/scatter_raleigh_g",      10.30 )set( "sim/private/controls/atmo/scatter_raleigh_r",    0.010 )set( "sim/private/controls/skyc/white_out_in_clouds",     0.5 )set( "sim/private/controls/clouds/plot_radius",    1.20 )set( "sim/private/controls/clouds/soft_occlude",  1.00 )set( "sim/private/controls/skyc/mie_scattering_foggy",  25.000 )set( "sim/private/controls/skyc/mie_scattering_ocast",  7.00 )set( "sim/private/controls/lights/bloom_far", 3000.00 )set( "sim/private/controls/lights/bloom_near", 120.00 )set( "sim/private/controls/lights/mix_big", 80.000 )set( "sim/private/controls/lights/mix_small", 25.00)set( "sim/private/controls/lights/bloom_for_zoom", 0.60)set( "sim/private/controls/hdr/gain_min", -4.8)set( "sim/private/controls/clouds/ambient_gain", 4.0)

post-8124-0-22268300-1393978629_thumb.pn

Edited by Tom Knudsen

Share this post


Link to post
Share on other sites
Hi Tom (excuse my english) I have a question. 

You've written two scripts: Art and Light.

 

The "Light" scripts have the codes of the new "white lights", but do not have the codes "Mie scattering". 

 

The "Art" scripts have the codes "Mie scattering", but do not have the codes of the new "white lights." 

 

I'm confused.

What code to use?  :unsure:

 

But above all, you can have the effects of both codes?

I have to make a code mix of both?

 

Thank you for your help.  ;)

Share this post


Link to post
Share on other sites

Use both, then download Aerosoft Free Sky Texture and install the white light included there and it should look something like this (at least if you can match all the settings)

 

sola.PNG

  • Upvote 2

Share this post


Link to post
Share on other sites
I do not understand. I have to copy 2 codes inside XP scrips folder?

Or a single code?  :unsure:

 

I have a suspicion about some strings. 

Observe the strings marked in red color.

 

ART

 

set( "sim/private/controls/clouds/cloud_shadow_lighten_ratio", 0.85 )

set( "sim/private/controls/atmo/atmo_scale_raleigh", 20.0 )

set( "sim/private/controls/atmo/inscatter_gain_mie", 5.0 )

set( "sim/private/controls/atmo/inscatter_gain_raleigh", 10.0 )

set( "sim/private/controls/atmo/scatter_raleigh_b", 40 )

set( "sim/private/controls/atmo/scatter_raleigh_g", 10.30 )

set( "sim/private/controls/atmo/scatter_raleigh_r", 0.010 )

set( "sim/private/controls/skyc/white_out_in_clouds", 0.5 )

set( "sim/private/controls/clouds/plot_radius", 1.20 )

set( "sim/private/controls/clouds/soft_occlude", 1.00 )

set( "sim/private/controls/skyc/mie_scattering_foggy", 25.000 )

set( "sim/private/controls/skyc/mie_scattering_ocast", 7.00 )

set( "sim/private/controls/lights/bloom_far", 3000.00 )

set( "sim/private/controls/lights/bloom_near", 120.00 )

set( "sim/private/controls/lights/mix_big", 80.000 )

set( "sim/private/controls/lights/mix_small", 25.00)

set( "sim/private/controls/lights/bloom_for_zoom", 0.60)

set( "sim/private/controls/hdr/gain_min", -4.8)

set( "sim/private/controls/clouds/ambient_gain", 4.0)

 

Now observe the strings marked in blue color.

 

LIGHT

 

set( "sim/private/controls/light/random_percent=", 0.10)

set( "sim/private/controls/lighting/deferred_uses_stencil", 0.00)

set( "sim/private/controls/lights/3d/constant_atten", 1.00)

set( "sim/private/controls/lights/3d/rheo_rgb_curve", 1.00)

set( "sim/private/controls/lights/3d/rheo_size_curve", 1.00)

set( "sim/private/controls/lights/always_night_lights", 1.00)

set( "sim/private/controls/lights/beacon_rotate_billboard", 1.00)

set( "sim/private/controls/lights/beacon_rotate_spill", 0.20)

set( "sim/private/controls/lights/beacon_strobe_billboard", 1.00)

set( "sim/private/controls/lights/beacon_strobe_spill", 0.10)

set( "sim/private/controls/lights/bloom_far", 100.00 )

set( "sim/private/controls/lights/bloom_for_zoom", 1.00)

set( "sim/private/controls/lights/bloom_near", 10.00 )

set( "sim/private/controls/lights/dist_far", 100.00)

set( "sim/private/controls/lights/dist_near", 80.00)

set( "sim/private/controls/lights/exponent_far", 0.45)

set( "sim/private/controls/lights/exponent_near", 0.40)

set( "sim/private/controls/lights/fat_omni_cutoff", 0.707)

set( "sim/private/controls/lights/hdr_mix", 0.60)

set( "sim/private/controls/lights/kill_dynamic_billboards", 0.00)

set( "sim/private/controls/lights/kill_dynamic_spill", 0.00)

set( "sim/private/controls/lights/lod_max_static_bb", 1.00)

set( "sim/private/controls/lights/lod_max_static_gnd", 1.00)

set( "sim/private/controls/lights/lod_max_static_sp", 1.00)

set( "sim/private/controls/lights/mix_big", 64.00)

set( "sim/private/controls/lights/mix_small", 16.00)

set( "sim/private/controls/lights/mix_weather_fog", 0.30)

set( "sim/private/controls/lights/mix_weather_rain", 0.10)

set( "sim/private/controls/lights/scale_far", 0.80)

set( "sim/private/controls/lights/scale_near", 0.50)

set( "sim/private/controls/lights/spill_scale", 66.00)

set( "sim/private/controls/lights/srgb_gamma", 2.20)

set( "sim/private/controls/lights/use_srgb", 1.00)

set( "sim/private/controls/lights/vasi_papi_red_b", 0.90)

set( "sim/private/controls/lights/vasi_papi_red_g", 0.60)

set( "sim/private/controls/lights/vasi_papi_red_r", 0.80)

set( "sim/private/controls/lights/vasi_papi_white_b", 1.00)

set( "sim/private/controls/lights/vasi_papi_white_g", 0.50)

set( "sim/private/controls/lights/vasi_papi_white_r", 1.00)

 

What strings should I use? 

Red or blue?

 

If I make a single "both mix" code, is this correct?

If yes, with that name I save this code? 

ART.lua?

This code is correct?  :unsure:

 

set( "sim/private/controls/clouds/cloud_shadow_lighten_ratio", 0.85 )

set( "sim/private/controls/atmo/atmo_scale_raleigh", 20.0 )

set( "sim/private/controls/atmo/inscatter_gain_mie", 5.0 )

set( "sim/private/controls/atmo/inscatter_gain_raleigh", 10.0 )

set( "sim/private/controls/atmo/scatter_raleigh_b", 40 )

set( "sim/private/controls/atmo/scatter_raleigh_g", 10.30 )

set( "sim/private/controls/atmo/scatter_raleigh_r", 0.010 )

set( "sim/private/controls/skyc/white_out_in_clouds", 0.5 )

set( "sim/private/controls/clouds/plot_radius", 1.20 )

set( "sim/private/controls/clouds/soft_occlude", 1.00 )

set( "sim/private/controls/skyc/mie_scattering_foggy", 25.000 )

set( "sim/private/controls/skyc/mie_scattering_ocast", 7.00 )

set( "sim/private/controls/lights/bloom_far", 100.00 )

set( "sim/private/controls/lights/bloom_near", 10.00 )

set( "sim/private/controls/lights/mix_big", 64.00)

set( "sim/private/controls/lights/mix_small", 16.00)

set( "sim/private/controls/lights/bloom_for_zoom", 1.00)

set( "sim/private/controls/hdr/gain_min", -4.8)

set( "sim/private/controls/clouds/ambient_gain", 4.0)

set( "sim/private/controls/light/random_percent=", 0.10)

set( "sim/private/controls/lighting/deferred_uses_stencil", 0.00)

set( "sim/private/controls/lights/3d/constant_atten", 1.00)

set( "sim/private/controls/lights/3d/rheo_rgb_curve", 1.00)

set( "sim/private/controls/lights/3d/rheo_size_curve", 1.00)

set( "sim/private/controls/lights/always_night_lights", 1.00)

set( "sim/private/controls/lights/beacon_rotate_billboard", 1.00)

set( "sim/private/controls/lights/beacon_rotate_spill", 0.20)

set( "sim/private/controls/lights/beacon_strobe_billboard", 1.00)

set( "sim/private/controls/lights/beacon_strobe_spill", 0.10)

set( "sim/private/controls/lights/dist_far", 100.00)

set( "sim/private/controls/lights/dist_near", 80.00)

set( "sim/private/controls/lights/exponent_far", 0.45)

set( "sim/private/controls/lights/exponent_near", 0.40)

set( "sim/private/controls/lights/fat_omni_cutoff", 0.707)

set( "sim/private/controls/lights/hdr_mix", 0.60)

set( "sim/private/controls/lights/kill_dynamic_billboards", 0.00)

set( "sim/private/controls/lights/kill_dynamic_spill", 0.00)

set( "sim/private/controls/lights/lod_max_static_bb", 1.00)

set( "sim/private/controls/lights/lod_max_static_gnd", 1.00)

set( "sim/private/controls/lights/lod_max_static_sp", 1.00)

set( "sim/private/controls/lights/mix_weather_fog", 0.30)

set( "sim/private/controls/lights/mix_weather_rain", 0.10)

set( "sim/private/controls/lights/scale_far", 0.80)

set( "sim/private/controls/lights/scale_near", 0.50)

set( "sim/private/controls/lights/spill_scale", 66.00)

set( "sim/private/controls/lights/srgb_gamma", 2.20)

set( "sim/private/controls/lights/use_srgb", 1.00)

set( "sim/private/controls/lights/vasi_papi_red_b", 0.90)

set( "sim/private/controls/lights/vasi_papi_red_g", 0.60)

set( "sim/private/controls/lights/vasi_papi_red_r", 0.80)

set( "sim/private/controls/lights/vasi_papi_white_b", 1.00)

set( "sim/private/controls/lights/vasi_papi_white_g", 0.50)

set( "sim/private/controls/lights/vasi_papi_white_r", 1.00)

Share this post


Link to post
Share on other sites

Tom, I honestly love the results you achieved BUT I will wait till John and the SkyMaxx Pro gang will add all these things so it is more average user friendly.

 

Copying , pasting and creating all these scripts files is way to much for an average user.

 

Do not take me wrong, I DO love the look and I believe it can be incorporated in the new MAX-FX which I will probably get tomorrow anyway... :D

 

Cheers, AJ ;)

Share this post


Link to post
Share on other sites

Probably won't happen AJ messing with art controls is taboo....

Updates would break any changes made...

It would have to come from LR..

Share this post


Link to post
Share on other sites

OK John, no problem. Thanks for the info. Understood. In this case MAX-FX will have to do the trick. :D   Cheers, AJ  

 

Getting it tomorrow morning. :ph34r:

Share this post


Link to post
Share on other sites

Shhhhhh....the wife might hear u

 

John, I know you are going to believe me .... I was about to say at the end of my reply ..." wife does not know.." :D:lol:  Seriously.

 

Do you have a part time job as mind reader??!!

 

Tomorrow is coming soon. :)

 

Cheers, AJ ;)

  • Upvote 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×