Jump to content

LlGetEnvironment Parameters


Riannah Avora
 Share

You are about to reply to a thread that has been inactive for 454 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

I've been playing with the LlGetEnvironment function and all of the parameters there are associated with them. I've also compared the results of the parameters with the environment settings on my land. Most I can figure out, some not so much. Example:  Exactly which parameter returns the azimuth of sun and moon? And what is this SKY_DOME parameter for?

I apologize if I'm not up to speed on all of the environmental settings. But is there a key available that indicates what the parameters relate to in the environment settings?

Thanks!

  • Like 1
Link to comment
Share on other sites

I think not all of the env parameters directly map to the settings we see in the GUI.

SKY_DOME is the geometry that the sky and cloud textures are drawn on. Traditionally in older games, the sky was drawn on a gigantic box that encompassed the scene, hence the term skybox. SL uses a hemisphere which you can see if you engage wireframe mode (Ctrl+Shift+R). The parameter max altitude does actually correlate to the "maximum altitude" seen in the gui, but I'm also not sure what the other two do. Changing them myself via llSetEnvrionment on my parcel don't seem to actually change anything -  neither visually nor according to llGetEnvironment which seems to always report the same numbers of offset=0.96 and radius=15000 regardless of what I try to set.

Edit: Though if I were to guess, perhaps the offset is the dome's vertical offset from the scene origin, and the radius would probably be the literal radius of the dome. I guess they are locked from being changed?

Also I'm not 100% sure, but I think there isn't a parameter specifically for the azimuth of the sun/moon. Rather, we only get the rotation and direction in the bundled SKY_SUN and SKY_MOON parameters.

Edited by Fenix Eldritch
additional thought
  • Like 2
Link to comment
Share on other sites

1 hour ago, Fenix Eldritch said:

Also I'm not 100% sure, but I think there isn't a parameter specifically for the azimuth of the sun/moon. Rather, we only get the rotation and direction in the bundled SKY_SUN and SKY_MOON parameters.

I've only tried the llSetEnvironmentParams direction, but the SKY_SUN parameter is indeed the position of the sun. You should be able to pull out the azimuth and elevation with something like

rotation skySun;
vector v = llRot2Fwd(skySun);
float azimuth = llAtan2(v.y,v.x);
float elevation = -llAtan2(v.z,llVecMag(<v.x,v.y,0>));
// UNTESTED!

 

Edited by Quistess Alpha
  • Like 1
Link to comment
Share on other sites

On 1/20/2023 at 8:38 AM, Fenix Eldritch said:

I think not all of the env parameters directly map to the settings we see in the GUI.

@Fenix Eldritch that's kind of what I thought... bummer. Thanks for your response though. I'll keep playing with it to see what I can match up.

@Quistess Alpha thanks! I'll try that!

Edited by Riannah Avora
Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 454 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...