java.lang.Object
de.grogra.graph.impl.Edge
de.grogra.graph.impl.Node
de.grogra.imp3d.objects.Null
de.grogra.imp3d.objects.SkyDome
de.grogra.imp3d.objects.PerezSunSky
de.grogra.gpuflux.imp3d.objects.SpectralPerezSunSky
- All Implemented Interfaces:
Transformation,Pickable,Renderable,Manageable,PersistenceCapable,Shareable,UserFields,XObject,Map,Serializable
A
PerezSunSky node with user-defined spectral power distributions.
Two independent SPDs can be set: one for the 72 diffuse sky-element
lights and one for the direct sun light. If only setSpectrum(de.grogra.gpuflux.imp3d.spectral.SpectralCurve) is
called, the same curve is used for both. The power values (DHI / DNI)
inherited from PerezSunSky continue to control the radiometric
quantities; the SPD shapes define the spectral composition.
Defaults: CIE D65 for the diffuse sky (standard daylight, CCT ≈ 6504 K) and a blackbody at 5778 K for the direct sun beam (solar photosphere temperature).
Usage example in RGG:
SpectralPerezSunSky pss = new SpectralPerezSunSky(
52f, 170, 12, 0, 200f, 800f, 15f, 0f);
// defaults already apply; override if needed:
pss.setSunSpectrum(new BlackbodySpectralCurve(6000f));
- Author:
- MH at YNL 2026
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class de.grogra.imp3d.objects.SkyDome
SkyDome.LightEntryNested classes/interfaces inherited from class de.grogra.graph.impl.Node
Node.AccessorBridge, Node.FieldAttributeAccessor, Node.NType -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Node.NTypestatic final Node.NType.Fieldstatic final Node.NType.Fieldstatic final Node.NType.FieldFields inherited from class de.grogra.imp3d.objects.PerezSunSky
dayOfYear, dayOfYear$FIELD, dhi, dhi$FIELD, dni, dni$FIELD, hourOfDay, hourOfDay$FIELD, latitude, latitude$FIELD, minuteOfHour, minuteOfHour$FIELDFields inherited from class de.grogra.imp3d.objects.SkyDome
colour, distance, distance$FIELD, jitter, jitter$FIELD, N_LIGHTS, totalPower, totalPower$FIELD, visualizeDome, visualizeDome$FIELDFields inherited from class de.grogra.imp3d.objects.Null
transform, transform$FIELD, TRANSFORMING_MASK, transforming$FIELD, USED_BITSFields inherited from class de.grogra.graph.impl.Node
ADDITIONAL_FIELDS, bits, DELETED, EXPLICIT_EXTENT_INDEX, explicitExtentIndex$FIELD, EXTENT_BIT, EXTENT_MASK, extentIndex$FIELD, extentTail$FIELD, HAS_OBSERVERS, IMPORT_NODE_EXTENT_INDEX, IS_INTERPRETIVE, isInterpretive$FIELD, LAST_EXTENT_INDEX, LAST_VISIBLE_EXTENT_INDEX, layer$FIELD, MARK, mark$FIELD, MAX_RESOLUTION, MIME_TYPE, MIN_RESOLUTION, MIN_UNUSED_SPECIAL_OF_SOURCE, MIN_UNUSED_SPECIAL_OF_TARGET, name$FIELD, RESOLUTION_BIT, RESOLUTION_MASK, resolution$FIELD, TYPE_EXTENT_INDEXFields inherited from interface de.grogra.util.Map
DEFAULT_VALUE, EMPTY_MAP -
Constructor Summary
ConstructorsConstructorDescriptionCreates a spectral Perez sun+sky node with default parameters.SpectralPerezSunSky(float latitude, int dayOfYear, int hourOfDay, int minuteOfHour, float dhi, float dni, float distance, float jitter) -
Method Summary
Modifier and TypeMethodDescriptionOverridesPerezSunSky.buildLightEntries()so thatwrapLight(de.grogra.imp3d.objects.DirectionalLight)uses the correct SPD for sky elements (indices 0–71) vs. the direct sun light (index ).protected Node.NTypeThis method returns theNode.NTypewhich describes the managed fields of the class of this node.Returns the sky-dome SPD.booleanprotected NodeThis method returns a new instance of the class of this node.voidsetSkySpectrum(SpectralLightMap value) voidsetSkySpectrum(SPDIF spd) sets the spectral distribution of the skyvoidsetSkySpectrum(SpectralCurve curve) sets the spectral distribution of the skyvoidsetSpectrum(SpectralCurve curve) Sets the same SPD for both the sky dome elements and the direct sun light.voidsetSunSpectrum(SpectralLightMap value) voidsetSunSpectrum(SPDIF spd) sets the spectral distribution of the sunvoidsetSunSpectrum(SpectralCurve curve) sets the spectral distribution of the sunvoidsetWrappingSun(boolean value) protected LightCalled byPerezSunSky.buildLightEntries()for every directional light.Methods inherited from class de.grogra.imp3d.objects.PerezSunSky
getDayOfYear, getDhi, getDni, getHourOfDay, getLatitude, getMinuteOfHour, setDayOfYear, setDhi, setDni, setFromCIEType, setFromCloudCover, setFromTurbidity, setHourOfDay, setLatitude, setMinuteOfHour, update, update, updateMethods inherited from class de.grogra.imp3d.objects.SkyDome
calcDirection, draw, getColour, getDistance, getJitter, getTotalPower, isVisualizeDome, pick, setColour, setColour, setDistance, setJitter, setTotalPower, setVisualizeDome, update, updateMethods inherited from class de.grogra.imp3d.objects.Null
getLocalTransformation, getTransform, getTransformMatrix, getTranslation, isTransforming, postTransform, preTransform, setRotation, setScale, setTransform, setTransform, setTransform, setTransform, setTransform, setTransform, setTransform, setTransform, setTransforming, setTranslationMethods inherited from class de.grogra.graph.impl.Node
addEdgeBitsTo, addReference, appendBranchNode, appendBranchNode, appendReferencesTo, clone, clone, cloneGraph, dump, dumpTree, dup, dup, dupFrom, dupnew, dupUnmanagedFields, edgeChanged, fieldModified, findAdjacent, findRefinementType, get, getAccessor, getAccessor, getAttributes, getAxisParent, getBoolean, getBranch, getBranchLength, getBranchNode, getBranchTail, getByte, getChar, getCommonAncestor, getCurrentGraphState, getDirectChildCount, getDouble, getEdgeAttributeAccessor, getEdgeAttributes, getEdgeBitsTo, getEdgeTo, getExtentIndex, getFirst, getFirstEdge, getFloat, getGraph, getId, getIgnored, getIndex, getInstantiator, getInt, getLayer, getLong, getManageableType, getName, getNeighbor, getNext, getNType, getObject, getOrCreateEdgeTo, getOrNull, getPersistenceManager, getPredecessor, getProvider, getResolution, getShort, getSource, getStamp, getSuccessor, getSymbol, getSymbolColor, getTarget, getTransaction, getUserField, getUserFieldCount, getXClass, getXData, hasName, initProvider, initXClass, insertBranchNode, insertBranchNode, instantiateGraph, isAncestorOf, isDirection, isEncoarseOf, isExplicitExtentIndex, isManagingInstance, isMarked, isRoot, isSource, isTarget, manageableReadResolve, manageableWriteReplace, paramString, removeAll, removeEdgeBitsTo, removeFromChain, removeFromChain, removeReference, setBranch, setBranch, setExplicitExtentIndex, setExtentIndex, setGraphForDeserialization, setIgnored, setLayer, setMark, setName, setResolution, setSuccessor, setSuccessor, specialEdgeAdded, specialEdgeRefModified, specialEdgeRemoved, toString, writeReplaceMethods inherited from class de.grogra.graph.impl.Edge
addEdgeBits, getBitMark, getEdgeBits, getEdgeKeys, getObjectMark, getSpecialEdgeDescriptor, parseEdgeKeys, remove, removeEdgeBits, setBitMark, setEdgeBits, setObjectMark, testEdgeBitsMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface de.grogra.persistence.PersistenceCapable
getBitMark, getObjectMark, setBitMark, setObjectMark
-
Field Details
-
$TYPE
-
skySpectrum$FIELD
-
sunSpectrum$FIELD
-
wrappingSun$FIELD
-
-
Constructor Details
-
SpectralPerezSunSky
public SpectralPerezSunSky()Creates a spectral Perez sun+sky node with default parameters. -
SpectralPerezSunSky
public SpectralPerezSunSky(float latitude, int dayOfYear, int hourOfDay, int minuteOfHour, float dhi, float dni, float distance, float jitter) - Parameters:
latitude- geographic latitude [degrees]dayOfYear- day of year [1..365]hourOfDay- hour [0..23]minuteOfHour- minute [0..59]dhi- diffuse horizontal irradiance [W m⁻²]dni- direct normal irradiance [W m⁻²]distance- hemisphere radius [m]jitter- azimuth jitter [degrees, 0–15]
-
-
Method Details
-
setSpectrum
Sets the same SPD for both the sky dome elements and the direct sun light. To give the sun a different spectrum, callsetSunSpectrum(de.grogra.gpuflux.imp3d.shading.SPDIF)afterwards.- Parameters:
curve- spectral curve (nullresets both to flat white)
-
getSpectrum
Returns the sky-dome SPD. -
setSkySpectrum
sets the spectral distribution of the sky- Parameters:
curve- is the spectral distribution
-
setSkySpectrum
sets the spectral distribution of the sky- Parameters:
curve- is the spectral distribution
-
setSunSpectrum
sets the spectral distribution of the sun- Parameters:
curve- is the spectral distribution
-
setSunSpectrum
sets the spectral distribution of the sun- Parameters:
curve- is the spectral distribution
-
wrapLight
Called byPerezSunSky.buildLightEntries()for every directional light. Selects sky or sun SPD via thewrappingSunflag. -
buildLightEntries
OverridesPerezSunSky.buildLightEntries()so thatwrapLight(de.grogra.imp3d.objects.DirectionalLight)uses the correct SPD for sky elements (indices 0–71) vs. the direct sun light (index ).The sun entry is built last via a second pass with
wrappingSunset totrue.- Overrides:
buildLightEntriesin classPerezSunSky- Returns:
- array of 72
SkyDome.LightEntryobjects
-
getNTypeImpl
Description copied from class:NodeThis method returns theNode.NTypewhich describes the managed fields of the class of this node. This method has to be implemented in every concrete subclass.- Overrides:
getNTypeImplin classPerezSunSky- Returns:
- type describing the managed fields of the class of this node
-
newInstance
Description copied from class:NodeThis method returns a new instance of the class of this node. This method has to be implemented in every concrete subclass.- Overrides:
newInstancein classPerezSunSky- Returns:
- new instance of class of this node
-
isWrappingSun
public boolean isWrappingSun() -
setWrappingSun
public void setWrappingSun(boolean value) -
getSkySpectrum
-
setSkySpectrum
-
getSunSpectrum
-
setSunSpectrum
-