Resources/Reflection/NeedleFxSceneData
NeedleFxSceneData is a reflection template used to edit many of Needle's graphics effects parameters inside of the FxParamManager on a per stage basis. It is used in all of Hedgehog Engine 2 games, as Needle is its graphics engine component. However, the template's contents may vary between each game and some parameters will not work if they are included in the game's graphics settings in the first place.
Additionally, it includes various parameters for heightmap rendering, stage's deathplane and camera draw distance and FOV within the "stageConfig" struct; however, those are not included in the FxParamManager.
FxParamManager parameters[edit | edit source]
sceneConfig[edit | edit source]
Also referred to as "config". Contains parameters that are common to the entirety of the stage and cannot be changed by time/weather cycles or FxCol.
rendertarget[edit | edit source]
- bloomRenderTargetScale (enum) : Only appears in Sonic Forces. Likely a lens fx quality toggle. Choose between one sixteenth, one eighth and one fourth of the current resolution.
- dofRenderTargetScale (enum) : Depth of Field resolution quality. Can be set to the same as the display resolution, a half, or a quarter of it.
- shadowMapWidth and shadowMapHeight (sint32) : Shadow maps resolution. Will not work since those are covered by the game's graphics settings, where the low setting is 2048x2048 and the high setting is 4028x4028.
antialiasing[edit | edit source]
- aaType (enum) : Antialiasing type. Can select no antialiasing, TAA, FXAA or SMAA. However, it will not make a difference as this is included in the graphics settings. Additionally, you can debug your way into using SMAA with DevTools, but the effect will glitch the screen.
- usType (enum) : Determines what FSR upscaling type to use or disables it altogether. Open Zone uses "Easu", while CyberSpace uses "Fast". The latter's sharpening can be edited by fsrSharpness
- fsrSharpness (Float) : Edits FSR's sharpening when the Fast or RCAS types are selected. The lower it is, the greater the effect.
atmopshere[edit | edit source]
- illuminanceScale (Float) : Lighting strength when atmospheric lighting is in use. Makes everything brighter or darker.
lod[edit | edit source]
- enableDebugDrawLayerRange (Boolean) : Presumably renders debug information of all level of detail layers. Does not work.
- layerRange[32] (Float) : A set of 32 float parameters to edit the distance at which the LOD layers load. This does not affect gedit objects draw distance, but only terrain, some density objects and pcmodels. In addition, some objects only seem to be affected by certain layers.
detail[edit | edit source]
- detailDistance (Float) : "Distance at which the detail map stops being used". The referred detail maps are higher quality versions of the terrain's textures. Those are located in the stage's height pack.
- detailFadeRange (Float) : "Blur strength when switching". Determines how long the transition between the detailed texture and the original texture is.
dynamicResolution[edit | edit source]
- mode (enum) : Enables resolution scaling, with the option to choose whether to use it dynamically or not. Only the "Fixed resolution" option works.
- fixedResolutionRatio (Float) : The current scale of the display's resolution. Controlled by the graphics settings to choose between 0.75 and 0.5.
timeProgress[edit | edit source]
Enables TimeService's time cycle in the islands. When enabled, the next parameters are used to decide the rotation of the sun and moon's properties, as well as the exact moment where the game thinks nighttime starts and ends. It will also make use of the RFL's timeItems. When timeProgress is disabled, these parameters will be ignored and the parameters of items[0] will be used instead, unless stated to use other parameters in the game's stagedata.lua file.
- solarRadiusScale (Float) : The size of the sun.
- azimuthAngle (Float) : An offset to move the sun's position horizontally, without altering its vertical movement.
- latitude / longitude (Float) and month / day (sint32) : Four parameters that indicate the stage's coordinates on Earth and the exact date the player is in. The sun's rotation will change to simulate how it would be in real life at the same time and place.
- time (Float) : The current time of the day. Does not work.
- hourlyTime (Float) : "Basic time progress rate/seconds per hour". Does not work as the speed of the sun and moon are set in the timeservice.rfl file in
raw/misc/gameparam/
. - night : A TimeService struct containing the exact moment at which the nighttime starts and finishes.
- beginTime > hour / minute (sint32) : The moment when nighttime begins.
- endTime > hour / minute (sint32) : The moment when nighttime ends.
- overrideSpeeds[8] : "Overwrite time progress speed". A series of structs that might be able to change the speed at which the sun and moon move during specific times of the day. Those are unused and may or may not work.
weatherProgress[edit | edit source]
Enables the WeatherService's weather cycle. If enabled, the game will periodically use the RFL's weatherItems parameters.
terrain[edit | edit source]
"Heightmap terrain settings". Only features an enableDrawGrid boolean. Likely a debugging tool.
model[edit | edit source]
- zprepass / ditherAsBlueNoize (Boolean) : Unknown purpose.
decalModelParam[edit | edit source]
- cullingRange (Float) : Unknown purpose.
performance[edit | edit source]
- smallCullingThreshold (float) : "Small stuff culling threshold"
items[16][edit | edit source]
A series of structs containing parameters that do not change over time. In most games they are the main way of creating the graphics of a stage. However, in Sonic Frontiers' Starfall Islands, only a few are used for technical elements and for interiors like caves and ruins. It's important to mention that stages do not use only one of those items: The main parameters do tend to be in items[0], but more are frequently used in different spots with the help of FxCol. For example, in Sonic Frontiers' islands, usually utilize static parameters located in either items[3] or items[4]; the Supreme fight in Final Horizon, uses lighting parameters from items[5]; in Shadow Generations' ARK, interiors use items[1]; in the upside down gravitational platforms from Act 1 use items[2] to get the green tinted lighting on Shadow... There are plenty of examples in Sonic Forces and Shadow Generations, but in Sonic Frontiers the usage of more items is quite rare.
hdrOption[edit | edit source]
Only included in Sonic Forces. However, it does not work. It was likely an unfinished implementation of HDR meant to be used in future games, but was probably ditched in favour of using the current generation and past generation refreshed consoles' HDR.
renderOption[edit | edit source]
Contains many parameters to toggle debug rendering and for various lighting and shading technical details. Parameters that don't work, don't seem to make a difference or are used for debug rendering will not be documented.
- globalLight : Parameters for global lighting. When disabled, there will not be any direct lighting, but everything will look like it's covered by a big shadow.
- limit : Contains parameters for shadow angle limits.
- type (enum) : Choose between disabling the angle limit, enable it for shadows or for shadows and distant lighting
- minLightElevationAngle : The angle limit in degrees.
- limit : Contains parameters for shadow angle limits.
- enablePointLight (Boolean) : Enable or disable point lights lighting
- enablePreMergeIBL (Boolean) : Enable or disable certain Image Based Lighting instances. Used for inexpensive global illumination. Also has an effect on some PBR and cubemap reflections.
- shadowIBLAttenuation (Float) : A slider between 0 and 1 to indicate how dark IBL reflections (similar to cubemaps) will be, 0 being completely dark. Seems to make the biggest difference in Sonic Frontiers.
- maxCubeProbe (sint32) : "Maximum number of IBLProbes used for drawing". Seems to affect the overall definition of shaded areas, 24 being the maximum.
sggi[edit | edit source]
Parameters for miscellaneous global illumination concepts.
- sgStartSmoothness / sgEndSmothness (Float) : General smoothness of the baked global illumination around the environment.
- doStartSmoothness / doEndSmoothness (Float) : Described the same as the above, but don't seem to make a difference anywhere. Likely related to directional occlusion?
- doOffset (Float) : Unknown.
- aoOffset (Float) : In Sonic Frontiers' islands, it makes shadowed faces darker or clearer, but does not affect shadow maps.
rlr[edit | edit source]
Screen Space Reflections. Largely used in Sonic Frontiers and Shadow Generations. Most of these are not included in Sonic Forces.
- traceSky (Boolean) : Traces reflections on occluded areas. Most noticeable difference is the reflection of Sonic's shoes on water or reflective platforms
- useTrans (Boolean) : Enable reflections on translucent materials.
- usePenet (Boolean) : Enable reflections that penetrate around other meshes' reflections' outlines.
- useQuat (Boolean) : Enable quarter resolution reflections.
- useNormal (Boolean) : Enable small deformations with normal maps.
- rayMarchingCount (Float) : The number of rays used to create reflections. Effectively affects quality.
- planeNormalDist (Float) : Affects how much reflections are deformed by normal maps.
- traceThreshold (Float) : If larger, more reflections will be attempted to be drawn with the available information.
- resolveReproj (Float) : Reduces flickering by applying ghosting.
- overrideRatio (Float) : "Blending ratio with IBL". When higher and above 1, PBR and cubemaps (referred to as IBL by the game) will become darker, as they blend with the SSR. Has the secondary effect of, when put lower and below 1, the edges of reflections will be blurred.
- maxRoughness (Float) : Maximum roughness that a reflection will be drawn at.
- roughnessLevel (Float) : Reflection blurring to reduce roughness.
- uvOffsetScale (Float) : Determines how much UV animations can deform the reflections. Although, will move those up or down for some reason.
Sonic Forces' rlr[edit | edit source]
All of those are float variables. Editing those will not make a big difference, as Sonic Forces relies more on planar reflections and cubemaps than it does on screen space reflections.
- num : Sample count?
- travelFadeStart / travelFadeEnd : Unknown.
- borderFadeStart / borderFadeEnd : Fading out on the edges of the screen.
- hizStartLevel : Seems to have a similar effect to roughnessLevel and uvOffsetScale combined.
ssgi[edit | edit source]
Screen Space Global Illumination. Used for small patches of light that would otherwise be too expensive with the use of point lights or too tedious to add with baked global illumination. Only properly used in Sonic Frontiers' Chemical Plant, but ancient ruins like bridges and CyberSpace portals do feature those even if the effect is disabled.
- intensity (Float) : Self explanatory.
- useAlbedo (Boolean) : Blends the effect and the textures that it's around.
- useParameter (Boolean) : Blends the effect with the prm textures that it's around.
- debugParam : A struct containing more parameters that are still very important, but are under this for some reason.
- useDenoise (Boolean) : Enables blurring of the effect. If disabled, only coloured points will be rendered.
- rayLength (Float) : How much the effect is spread.
planarReflection[edit | edit source]
bloom[edit | edit source]
Very limited customization in Sonic Frontiers and on.
- fast (Boolean) : Enables bloom of lower quality.
- bloomScale (Float) : Bloom general intensity.
- sampleRadiusScale (Float) : Adds low transparency (ghost) copies of the illuminated objects. The variable affects how far away these are from the source element, 0 making the hide completely. Gives the illusion of a more spread bloom effect.
- blurQuality (sint32) : Affects how much the bloom is blurred, spreading the effect more without changing its intensity. Can't be edited since it's controlled by the game's graphics settings.
In Sonic Forces this also includes lens FX parameters and other scale variables.
- bloomThreshold (Float) : Effectively puts a limit on darker pixels to determine how bright something has to be to cast any bloom.
- bloomMax (Float) : How bright something has to be to cast the brightest bloom. If lower, objects that were already casting bloom will have the effect buffed.
- starScale (Float) : Lens FX. Adds further intensity to the brightest bloom spots. Affected by bloomMax and camera distance.
- ghostCount (sint32) : Ghost lens FX samples?
- ghostScale (Float) : Ghost lens FX instensity.
- haloScale (Float) : Lens flare FX intensity.
- glareType (Boolean) : Unsure, but choosing either camera or natural will disable lens FX.
cameraControl[edit | edit source]
Includes everything related to exposure. This struct only really exists in Sonic Frontiers and Shadow Generations, but its contents are still included, just under different structs. In Sonic Forces, the exposureType boolean is named tonemapType, and the auto exposure parameters are under the tonemap struct.
- exposureType (enum) : Change between manual exposure and auto exposure.
- manualExposure > exposureValue (Float) : Manual exposure brightness.
- autoExposure : Includes many parameters. You can choose which to use.
- middleGray (Float) : An exposure offset. Makes everything either darker or brighter while keeping the expected behaviour.
- lumMax (Float) : How dark exposure is allowed to become. The higher, the darker.
- lumMin (Float) : How bright exposure is allowed to become. The lower, the brighter.
- cutMax (Float) : Cuts off how dark the exposure can get from lumMax in a way that if the screen shows too much brightness, it will not be darkened. The lower the parameter is, to earlier this happens.
- cutMin (Float) : Cuts off how bright the exposure can get from lumMin in a way that if the screen shows too much darkness, it will not be brightened. The higher the parameter is, the earlier this happens.
- pctMax (Float) : Determines the percentage of the screen taken into consideration by lumMax. The lower, the more screen space brightness has to take to get a darker exposure.
- pctMin (Float) : Determines the percentage of the screen taken into consideration by lumMin. The higher, the more screen space darkness has to take to get brighter.
- adaptedRatio (Float) : Auto exposure speed. The lower, the faster. 0 being immediate response and 1 being static.
- luminanceRangeType (enum) : Determines which parameters are used. Clamp will only use middleGray, lumMax, lumMin and adaptedRatio; Cutoff will add cutMax and cutMin; and CutoffPCTRate and CutoffPCTArea will add pctMax and pctMin. It is not clear what the difference is between the last two.
Additionally, you can make auto exposure static by disabling "updateLuminance" under tonemap. This is not the same as manual exposure.
tonemap[edit | edit source]
- tonemapType (enum) : Choose the tone mapping. Pick between "Disney", "Filmic", "Aces" and "GT". Only GT and Filmic have editable parameters. Disney and Aces look the same.
- tonemapParamFilmic : A struct containing Filmic tone mapping parameters.
- whitePoint (Float) : White level.
- toeStrength (Float) : "Strength of dark areas".
- linearAngle (Float) : Behaves like a gamma slider.
- linearStrength (Float) : "Strength in the middle section". The lower it is, the more contrasted the image will be. If the analogy is useful, think of it as removing middle frequencies from an audio file: it will sound ""clearer"" - it will look ""clearer"". If higher, it will sound more ""muffled"" - it will look less contrasted or ""homogeneous"".
- shoulderStrength (Float) : "Strength of bright areas".
- tonemapParamGT : A struct containing GT tone mapping parameters. This is the tone mapping used throughout the entirety of Sonic Frontiers and Shadow Generations.
- maxDisplayBrightness (Float) : How bright pixels are able to get. Also works as a white level slider starting at 2. The higher the value, the more contrasted the image will get to sell the effect.
- contrast (Float) : Contrast.
- linearSectionStart (Float) : Black level threshold, it seems. The higher it is, the earlier things will be affected by the black level parameter.
- linearSectionLength (Float) : When negative, it also affects the black level threshold. If positive, when it's higher, it will expose the brightest areas more. Most notable example in the ARK on the Earth's atmosphere, Shadow's jump ball and generally noticeable on areas with bloom.
- black (Float) : Black level. Will glitch when above 10.
- updateLuminance (Boolean) : Enable or disable auto exposure updates. If disabled, the exposure will stay where it was. If you disabled it in a dark place, where exposure got brighter, it will be locked to that brightness.
colorContrast[edit | edit source]
Contains parameters related to colour correction. Includes: LUT settings, HLS correction settings and a contrast struct.
- enable (Boolean) : ONLY enables the contrast part of the struct
- contrast (Float) : Increases performance. Only works with values between 0 and 1. Its effect will vary according to the tonemap settings, so in Sonic Forces its effect is very intuitive, but in Sonic Frontiers and Shadow Generations it only affects bright areas, leaving the darker areas to the tone mapping.
- dynamicRange / crushShadows (Float) : Don't seem to work, but theoretically they should reduce contrast and make darker areas brighter, respectively.
- crushHilights (Float) : If lower, bright areas will be darker. The "normal" setting should be 1.
- useLut (Boolean) : Enable the use of Lookup Tables.
- lutIndex0 / lutIndex1 (enum) : Choose the LUT file that will be used. Default (an LUT with no colour correction) and WB (black and white) are present in the NeedleShader.pac file. LUTs 0, 1, 2, 3, 4 and 5 (custom) must be placed in the stage's trr_cmn.pac file if used. If you choose an LUT that can't be found in the files, the screen will turn black.
- blendRatio (Float) : Interpolates between the LUTs selected in lutIndex0 and lutIndex1. If the value is 0, only the one selected in lutIndex0 will be used, and if it is 1, the one in lutIndex1 will be used. Values in between will combine both.
- lutRatio (Float) : How much the LUTs will affect the image. Choose a value between 0 and 1.
- useHlsCorrection (Boolean) : Enables HLS colour correction.
- hlsHueOffset (Float) : Shifts hue.
- hlsLightnessOffset (Float) : Shifts lightness. Worth noting that this will reduce the dynamic range as it is no more than a simple filter.
- hlsSaturationOffset (Float) : Shifts saturation. Seems to work better on colours that are not purely red, green or blue. This is especially noticeable when decreasing it.
- (It is more recommendable to use LUTs instead of the parameters above, unless under the limitation of not adding files)
- hlsColorOffset[3] : A struct containing parameters to shift RGB colour values.
- hlsColorOffset[0] (sint32) : Adds or takes away "redness" from the screen.
- hlsColorOffset[1] (sint32) : Adds or takes away "greenness" from the screen.
- hlsColorOffset[2] (sint32) : Adds or takes away "blueness" from the screen.
- hlsColorizeRate (Float) : Adds a "sepia filter". Control its intensity.
- hlsColorizeHue (Float) : Controls said sepia filter hue. Going negative will result in a blown out pink filter.
lightscattering[edit | edit source]
An effect where light is added onto the scene to create a better sense of depth and more immersive and credible atmospherics. Only affects models, terrains and other meshes, but not the skybox. It is meant to act as a sort of haze.
- color (vector3d) : Light scattering base colour in RGB.
- inScatteringScale (Float) : Light scattering strength. It could also be used as a brightness parameter, in conjunction with depthScale. If this is brought down, the maximum light scattering brightness will be darker.
- depthScale (Float) : Light scattering intensity. Affects how quickly the light will get to its maximum strength or thickness. If brought up, in conjunction with reducing the inScatteringScale in the same proportions, the light scattering will be darker, but equally as strong or thick.
- betaRayleigh (vector3d) / rayleigh (Float) : Atmospheric influence. betaRayleigh can shift in colouring in RGB. Basically an extra layer for the light scattering where it will interpolate from the colours in color to the ones in betaRayleigh when closer to the sun instance.
- betaMie (Float) : An influence setting for the normal color parameters. At 0, only the colours in betaRayleigh will be used. The higher it is, the closer the light scattering colouring is to the one in color. However, the interpolation to betaRayleigh colours will still be done, just with shifted colours.
- g (Float) : Determines how close to the sun instance the betaRayleigh colours will be.
- znear (Float) : Distance relative to the camera in meters in which light scattering will start.
- zfar (Float) : Distance relative to the camera in meters in which light scattering reaches its maximum point.
fog[edit | edit source]
Not to be confused with atmosphere's height fog. This one works when atmosphere is disabled and appears only in Shadow Generations. Similar to light scattering, does not affect the skybox.
- color (vector3d) : The colour of fog in RGB. If negative, will look near pitch black.
- intensity (Float) : Fog brightness. If negative, will cause the color parameters to work inversely. Another way to put it: if the colours are negative with a positive intensity, the fog will look the same as if the colours were positive, but the intensity was negative.
- skyBlend (Float) : Works between 0 and 1. Determines the influence of the lighting in the fog colour. If 0, only the colour set in the color parameters will show up; if 1, only the lighting will affect the fog colour and intensity. (Probably a combination of the sun instance and IBL?)
- skyMips (Float) : "Celestial blur coefficient". Only works when skyBlend is above 0. Only works between 0 and 1. Blends the fog colouring from the lighting of the sun instance with the colouring from IBL.
- distanceFog : A struct containing one of the two layers available for fog. Both can be used at the same time.
- nearDist (Float) : The distance from the camera at which distanceFog starts being rendered.
- farDist (Float) : The distance from the camera at which distanceFog gets to the maximum strength or thickness.
- influence (Float) : Works between 0 to 1. distanceFog transparency.
- heightFog : A struct containing the other layer available for fog. Both can be used at the same time. Not to be confused with atmosphere's height fog.
- minHeight (Float) : The Y coordinate (height) at which heightFog starts fading out.
- maxHeight (Float) : The Y coordinate at which heightFog has completely faded out. If minHeight is greater than maxHeight, fog will look like it comes from above. If lower, it will look like it comes from below.
- nearDist (Float) : The distance from the camera at which heightFog starts being rendered.
- farDist (Float) : The distance from the camera at which heightFog gets to the maximum strength or thickness.
- influence (Float) : Works between 0 to 1. heightFog transparency
dof[edit | edit source]
Depth of Field. Blurring to the scene using distance as the basis.
- useFocusLookAt (Boolean) : Alters strength at certain points according to what the camera is focusing.
- foregroundBokehMaxDepth (Float) : Set the distance at which DOF reaches its maximum strength. Used for close distances.
- foregroundBokehStartDepth (Float) : Set the distance at which DOF starts fading in. Used for close distances.
- backgroundBokehMaxDepth (Float) : Set the distance at which DOF reaches its maximum strength. Used for far distances.
- backgroundBokehStartDepth (Float) : Set the distance at which DOF starts fading in. Used for far distances.
- enableCircleDOF (Boolean) : "CircleDOF" works by adding ghost-like images around objects.
- cocMaxRadius (Float) : How spread those ghost-like images are.
- bokehRadiusScale (Float) : Does not seem to do anything "
- bokehSampleCount (sint32) : D".OF samples. This does not change the quality. Seems to work better with CircleDOF disabled.
- skyFocusDistance (Float) : "Focus distance of the celestial sphere [0.0 will be blurry]". At anything other than 0.0, DOF will disappear.
- bokehBias (Float) : DOF intensity. Works between 0 and 1.
- drawFocalPlane (Boolean) : Debug rendering. Only works in Shadow Generations. Red symbolizes the background DOF strength, blue symbolizes the foreground DOF strength.
The following parameters only exist in Shadow Generations. Those are used as an alternative way to render depth of field. However, you can still use the old method.
- lensMode (enum) : DISTANCE uses the old parameters. LENS uses the new ones that are exclusive to Shadow Generations. When using the LENS mode, it is heavily recommended to use drawFocalPlane.
- quality (enum) : DOF quality. Seems to replace "dofRenderTargetScale". Works in both modes.
shadowmap[edit | edit source]
- partitionType (enum) : Change between PSSM and manual cascade split layouts.
- sceneRange (float) : Shadow draw distance. Does not drop performance. The higher it is, the lower quality the shadow maps will be.
- pssmLambda (float) : When using PSSM, the cascade splits will be distributed by using this parameter. With a lambda of 0 and 4 splits, the splits will be evenly distributed to cover ranges. With a lambda of 1; the splits will be exponentially distributed to cover ranges, based on the assumption that further away splits require less quality than close splits. Use this to get a good middle ground.
- cascadeSplits[4] (floats) : Set the distance at which the cascades are split. The last cascade should be set to 1 to take advantage of the draw distance. Remember that the further the shadows are drawn, the lower quality they will be; this also affects the cascades.
ssao[edit | edit source]
Ambient occlusion.
- postType (enum) : Choose between SSAO, HBAO, HBAO + Screen Space Shadows and Screen Space Shadows alone. Sonic Frontiers and Shadow Generations use HBAO+SSS, but Sonic Forces only features SSAO (which is largely unused, but functional).
- renderTargetSize (enum) : Choose between rendering ambient occlusion at a quarter of the display resolution, a half, or at full resolution. It is recommended to stay at half resolution, like most games with HBAO.
- blurStep (enum) : Gaussian blur intensity.
SSAO Parameters[edit | edit source]
- intensity (float) : Self explanatory.
- radius (float) : How spread the shadows are.
- fadeoutDistance / fadeoutRadius (floats) : Draw distance? Does not affect performance
- power (float) : Intensity, but does not affect darkness as much?
- bias (float) : Makes the shadow of close areas darker if negative, brighter if positive.
- occlusionDistance (float) : How far away the ambient occlusion of objects is projected.
HBAO Parameters[edit | edit source]
- hbaoPower (float) : Intensity.
- hbaoBias (float) : Makes the AO more intense if lower.
- hbaoRadius (float) : How spread the samples are.
- hbaoFalloff (float) : Similar to occlusion distance, but also similar to draw distance. The higher it is, the closer the AO will stop being rendered.
- hbaoRaycount (sint32) : Sample count.
shlightfield[edit | edit source]
- multiplyColorUp / multiplyColorDown (vector3d) : Change how objects are lit. Change the colours of objects facing up or down.