Difference between revisions of "User:Jenna Huntsman"

From Second Life Wiki
Jump to navigation Jump to search
(Add deeplink to new section)
(Set redirect to new user page.)
Tag: New redirect
 
(28 intermediate revisions by one other user not shown)
Line 1: Line 1:
[[Put Profile Image here.|thumb|Jenna Huntsman]]
#REDIRECT [[User:Quinn Elara]]
 
= Intro =
 
I'm a hobbyist scripter.
 
= Projects =
 
== LSL ==
 
My Marketplace Store.
 
= Code Snippets =
 
== sRGB EOTF ==
Note that when converting a colour from regular LSL space (sRGB) to linear space for use in a light, it's likely quicker and cleaner to use the internal function [[llsRGB2Linear]]. This is mostly a function that can be used for fun to manipulate the gamma space of colours.
{{LSL_Function
|mode=user
|func=srgb_eotf
|p1_type=vector|p1_name=color
|p2_type=float|p2_name=gamma
|return_type=vector
|return_value=returns the given gamma-encoded color to non-gamma-encoded (linear) color.
|func_desc=
Converts a gamma-encoded color value to linear space. Useful when dealing with lights (as these expect a non-gamma-encoded color).
|spec=<syntaxhighlight lang="lsl2">vector srgb_eotf(vector color, float gamma) //To convert from regular LSL colour to light colour, gamma value should be 2.4
{ //Conversion from gamma-encoded sRGB space to linear space. Credit: Jenna Huntsman, Christopher J. Howard
    vector low = color / 12.92;
    vector high = <llPow((color.x + 0.055)/1.055,gamma), llPow((color.y + 0.055)/1.055, gamma), llPow((color.z + 0.055)/1.055, gamma)>;
    return mix(low, high, step(<0.04045,0.04045,0.04045>, color));
}
 
float max(float x, float y)
{ //Return the higher of 2 given values.
    if( y > x ) return y;
    return x;
}
 
vector mix(vector x, vector y, vector t)
{
    vector ret;
    ret.x = x.x*(1-t.x) + y.x*t.x;
    ret.y = x.y*(1-t.y) + y.y*t.y;
    ret.z = x.z*(1-t.z) + y.z*t.z; 
    return ret;
}
 
vector step(vector edge, vector x)
{
    vector ret = <1,1,1>;
    if(x.x < edge.x) ret.x = 0;
    if(x.y < edge.y) ret.x = 0;
    if(x.z < edge.z) ret.x = 0;
    return ret;
}
</syntaxhighlight>
|examples=<syntaxhighlight lang="lsl2">
vector LampCol = <1,0.74510,0.47451>; //3200 kelvin
llSetLinkPrimitiveParamsFast(LINK_THIS,[PRIM_POINT_LIGHT,1,srgb_eotf(LampCol,2.4),1,20,0,PRIM_GLOW,ALL_SIDES,1,PRIM_COLOR,ALL_SIDES,LampCol,1,PRIM_FULLBRIGHT,ALL_SIDES,1]);
//Set light source colour and prim colour to same colour; despite taking different input values.
</syntaxhighlight>
|cat1=Examples
}}
 
 
= Random Notes =
 
I be a placeholder. At least for now.
 
= Photo Checklist Page Update =
 
This is some text. I need to do something here.
 
== Lens Settings ==
The below contains settings for simulating various real-life lenses within Second Life. These settings will change the camera's Field of View (FoV), as well as [[Depth of field]] (DoF) settings. You may want to play around with some of these settings (for example, the Aperture value) to manipulate the depth-of-field effect.
 
{{KBtip|The default Second Life camera is roughly equivalent to a full frame digital (36x24mm sensor) camera using 35mm lens.}}
 
For reference, the following table describes the debug settings changed, their units, and what the setting does. Default values are not provided as these settings may vary between viewers.
{| class="mw-collapsible mw-collapsed wikitable"
|+ style="white-space:nowrap; border:1px solid; padding:3px;" | Debug Setting Glossary
|-
! scope="col" | Debug Setting
! scope="col" | Units
! scope="col" | Description
|-
| CameraAngle || [[Radians]] || Camera Field-of-View angle, diagonal. Equivalent to Angle of View - diagonal degrees to equate a real lens. This changes the '''visible''' FoV.
|-
| CameraDoFResScale || Linear || Amount to scale down resolution of DoF effect. Manipulating this value may change performance.
|-
| CameraFieldOfView || Degrees || Field-of-View angle used for the DoF effect. Note that this value is the '''vertical''' FoV, NOT diagonal.
|-
| CameraFNumber || F Stop || F Stop (or Aperture) value to be simulated by DoF effect. '''This is the value you should change to adjust the intensity of the DoF effect.'''
|-
| CameraFocalLength || mm || Focal length of the lens to be simulated by the DoF effect.
|-
| CameraMaxCoF || mm*1000 || Lens Circle of Confusion value to be simulated by the DoF effect.
|-
| CameraFocusTransitionTime || Seconds || Time the camera will take to transition between 2 focal planes.
|}
 
{{Enote|The below settings assume that the screen is in the '''''16:9 aspect ratio''''' - These values vary depending on aspect ratio, so if you have a screen of a different ratio, you may need to recalculate these values.}}
 
{| class="mw-collapsible mw-collapsed wikitable"
! colspan="2" style="background-color:#ffffaa"| 8 mm (Fisheye) &nbsp;
|-
! scope="col" style="background-color:#A7C1F2"| Debug Setting
! scope="col" style="background-color:#A7C1F2"| Value
|-
| CameraAngle || 2.403
|-
| CameraFieldOfView || 103.4
|-
| CameraFocalLength || 8
|-
| CameraMaxCoF || 29.0
|}
 
{| class="mw-collapsible mw-collapsed wikitable"
! colspan="2" style="background-color:#ffffaa"| 16 mm &nbsp;
|-
! scope="col" style="background-color:#A7C1F2"| Debug Setting
! scope="col" style="background-color:#A7C1F2"| Value
|-
| CameraAngle || 1.824
|-
| CameraFieldOfView || 64.65
|-
| CameraFocalLength || 16
|-
| CameraMaxCoF || 29.0
|}
 
{| class="mw-collapsible mw-collapsed wikitable"
! colspan="2" style="background-color:#ffffaa"| 24 mm &nbsp;
|-
! scope="col" style="background-color:#A7C1F2"| Debug Setting
! scope="col" style="background-color:#A7C1F2"| Value
|-
| CameraAngle || 1.421
|-
| CameraFieldOfView || 45.75
|-
| CameraFocalLength || 24
|-
| CameraMaxCoF || 29.0
|}
 
{| class="mw-collapsible mw-collapsed wikitable"
! colspan="2" style="background-color:#ffc000"| 35 mm (SL Default) &nbsp;
|-
! scope="col" style="background-color:#A7C1F2"| Debug Setting
! scope="col" style="background-color:#A7C1F2"| Value
|-
| CameraAngle || 1.047
|-
| CameraFieldOfView || 37.85
|-
| CameraFocalLength || 35
|-
| CameraMaxCoF || 29.0
|}
 
{| class="mw-collapsible mw-collapsed wikitable"
! colspan="2" style="background-color:#ffffaa"| 50 mm &nbsp;
|-
! scope="col" style="background-color:#A7C1F2"| Debug Setting
! scope="col" style="background-color:#A7C1F2"| Value
|-
| CameraAngle || 0.783
|-
| CameraFieldOfView || 22.9
|-
| CameraFocalLength || 50
|-
| CameraMaxCoF || 29.0
|}
 
{| class="mw-collapsible mw-collapsed wikitable"
! colspan="2" style="background-color:#ffffaa"| 75 mm &nbsp;
|-
! scope="col" style="background-color:#A7C1F2"| Debug Setting
! scope="col" style="background-color:#A7C1F2"| Value
|-
| CameraAngle || 0.537
|-
| CameraFieldOfView || 15.38
|-
| CameraFocalLength || 75
|-
| CameraMaxCoF || 29.0
|}
 
{| class="mw-collapsible mw-collapsed wikitable"
! colspan="2" style="background-color:#ffffaa"| 100 mm &nbsp;
|-
! scope="col" style="background-color:#A7C1F2"| Debug Setting
! scope="col" style="background-color:#A7C1F2"| Value
|-
| CameraAngle || 0.407
|-
| CameraFieldOfView || 11.56
|-
| CameraFocalLength || 100
|-
| CameraMaxCoF || 29.0
|}

Latest revision as of 03:31, 8 October 2024

Redirect to: