Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

class Enlighten::IBakeInputSystem

    └>Geo::IGeoSerialisable
        └>Geo::IGeoReleasable

A triangle list and GBuffer of the incoming system.

Functions

NameDescription
AddMesh(const BakeInputMeshInfo &)

Call this for each mesh you want added, ensuring that the invisible meshes are not included in the standard lightmap, and that non-target meshes are not included in the Enlighten lightmap.

ComputeBoundingBox()

Lightmap UV debugging helpers.

Create()

Create a new IBakeInputSystem.

DilateTexture(Geo::GeoFp16Texture *)

Expand and dilate a provided albedo/emissive texture.

DumpPixelUVLayoutStats()

Various debugging helpers (can these be extracted into another API?)

DumpTriangleUVs(Geo::s32)

Various debugging helpers (can these be extracted into another API?)

Finalise()

Create GBuffers after all geometry is added.

GetBakePropertiesGuid()

Retrieves the GUID of the IBakeInputProperties passed into one of this class's methods.

GetBarycentricWeights(Geo::BaryWeights &, Geo::s32, Geo::v128)

Lightmap UV debugging helpers.

GetFaceIndex(const Geo::GeoGuid &, const Geo::s32 &, const Geo::s32 &, Geo::s32)

Map a mesh face index to a global bakesystem index.

GetFullName()

Get the full name.

GetHeight()

Returns the width and height of the internal GBuffer.

GetId()

The Guid for the IBakeInputSystem.

GetInstance(Geo::s32, Geo::GeoGuid &, Geo::s32 &, Geo::s32 &, Geo::s32 &, Geo::s32 &)

Get the geometry instances information.

GetIsUserLightmap()

Is this BakeSystem a user-defined lightmap (if not then it is an Enlighten system, used only for sampling indirect light).

GetLightmapUVs(Geo::s32)

Get the packed lightmap UVs for a geometry instance.

GetNumInstances()

Get the geometry instances information.

GetOutputIsIntensity()

Is this BakeSystem stores output as intensity value of the average light direction.

GetOutputType()

The output type for the system.

GetPixelBarycentricWeights(Geo::s32, Geo::s32, PixelBarycentricWeights &)

Extract barycentric weights for the pixel at this location.

GetPixelIndexForTriangle(Geo::s32 &, Geo::s32, const Geo::BaryWeights &)

Lightmap UV debugging helpers.

GetTriangleForUVCoordinate(float, float)

Lightmap UV debugging helpers.

GetUVCoordinateForTriangle(Geo::GeoPoint2 &, Geo::s32, const Geo::BaryWeights &)

Lightmap UV debugging helpers.

GetWidth()

Returns the width and height of the internal GBuffer.

LightMapHasBadUVFaces()

Lightmap UV debugging helpers.

Load(IGeoInputStream &, Geo::u32)

Load an instance of this class from an IGeoInputStream.

Release()

Free this object that was created within the Enlighten libraries.

Save(IGeoStream &, Geo::u32)

Save an instance of this class to an IGeoStream.

SaveChartUVLayoutEps(const char *, Geo::s32, Geo::s32)

Various debugging helpers (can these be extracted into another API?)

SaveLightmapUVDebuggingRaySets(const char *, const Geo::v128 &, const Geo::v128 &)

Various debugging helpers (can these be extracted into another API?)

SavePixelTrianglesEps(const char *, Geo::s32)

Various debugging helpers (can these be extracted into another API?)

SavePixelTrianglesRaySet(const char *, Geo::s32, const Geo::v128 &, const Geo::v128 &)

Various debugging helpers (can these be extracted into another API?)

SaveTrianglePixelsEps(const char *, Geo::s32)

Various debugging helpers (can these be extracted into another API?)

SaveTrianglePixelsRaySet(const char *, Geo::s32, const Geo::v128 &, const Geo::v128 &)

Various debugging helpers (can these be extracted into another API?)

SaveUVDebuggingRaySet(const char *, const Geo::v128 &, const Geo::v128 &)

Various debugging helpers (can these be extracted into another API?)

SaveUVLayoutEps(const char *, Geo::s32, Geo::s32)

Various debugging helpers (can these be extracted into another API?)

SetBakeProperties(const IBakeInputProperties *)

Set the baking properties for this system.

SetFullName(const char *)

Set a globally unique name.

SetId(Geo::GeoGuid)

The Guid for the IBakeInputSystem.

SetIsUserLightmap(bool)

Is this BakeSystem a user-defined lightmap (if not then it is an Enlighten system, used only for sampling indirect light).


Anchor
aaa05178ba613aac9740b7b808b5271cf
aaa05178ba613aac9740b7b808b5271cf

virtual bool Enlighten::IBakeInputSystem::AddMesh

...

public: bool AddMesh
(
    const BakeInputMeshInfo & pMeshInfo
)

...

Call this for each mesh you want added, ensuring that the invisible meshes are not included in the standard lightmap, and that non-target meshes are not included in the Enlighten lightmap.

In order to use this method the bake properties must be set first.

Parameters
[in]pMeshInfo

Contains properties of the mesh to be added


Anchor
ad5911711093c82ebf36f9a3dd68e50c4
ad5911711093c82ebf36f9a3dd68e50c4

virtual Geo::GeoBoundingBox Enlighten::IBakeInputSystem::ComputeBoundingBox

...

public: Geo::GeoBoundingBox ComputeBoundingBox() const

...

Lightmap UV debugging helpers.


Anchor
a041a3b1b57b36c30854c65118339c64c
a041a3b1b57b36c30854c65118339c64c

static IBakeInputSystem* Enlighten::IBakeInputSystem::Create

...

public: IBakeInputSystem * Create()

...

Create a new IBakeInputSystem.


Anchor
a550691d7f9081b4ecf36708944904bb7
a550691d7f9081b4ecf36708944904bb7

virtual Geo::v128* Enlighten::IBakeInputSystem::DilateTexture

...

public: Geo::v128 * DilateTexture
(
    Geo::GeoFp16Texture * texture
) const

...

Expand and dilate a provided albedo/emissive texture.

This should be done to the albedo and emissive textures used in UpdateRuntimeLighting to ensure that the texture sampling handles border pixels well.


Anchor
ae080e61446440b909df6248d27f0aa3e
ae080e61446440b909df6248d27f0aa3e

virtual bool Enlighten::IBakeInputSystem::DumpPixelUVLayoutStats

...

public: bool DumpPixelUVLayoutStats() const

...

Various debugging helpers (can these be extracted into another API?)


Anchor
a42c0eaf8744da8a6d6ab50bbc6f77c66
a42c0eaf8744da8a6d6ab50bbc6f77c66

virtual bool Enlighten::IBakeInputSystem::DumpTriangleUVs

...

public: bool DumpTriangleUVs
(
    Geo::s32 debugFaceIndex
) const

...

Various debugging helpers (can these be extracted into another API?)


Anchor
abf14540e8c46e6aaaaa21885a9fcef86
abf14540e8c46e6aaaaa21885a9fcef86

virtual bool Enlighten::IBakeInputSystem::Finalise

...

public: bool Finalise()

...

Create GBuffers after all geometry is added.


Anchor
a561b05cfe09d565e4930cc1d6d2c25cb
a561b05cfe09d565e4930cc1d6d2c25cb

virtual Geo::GeoGuid Enlighten::IBakeInputSystem::GetBakePropertiesGuid

...

public: Geo::GeoGuid GetBakePropertiesGuid()

...

Retrieves the GUID of the IBakeInputProperties passed into one of this class's methods.

Return the Invalid GUID if hasn't been set yet.


Anchor
a1f077a49af210242eb3442eb0099704c
a1f077a49af210242eb3442eb0099704c

virtual bool Enlighten::IBakeInputSystem::GetBarycentricWeights

...

public: bool GetBarycentricWeights
(
    Geo::BaryWeights & triangleBarycentricWeights,
    Geo::s32 faceIndex,
    Geo::v128 position
) const

...

Lightmap UV debugging helpers.


Anchor
a76f922d361d64d683b7d6a18e430e9ba
a76f922d361d64d683b7d6a18e430e9ba

virtual Geo::s32 Enlighten::IBakeInputSystem::GetFaceIndex

...

public: Geo::s32 GetFaceIndex
(
    const Geo::GeoGuid & sys,
    const Geo::s32 & instIdx,
    const Geo::s32 & meshIdx,
    Geo::s32 meshFaceIndex
) const

...

Map a mesh face index to a global bakesystem index.


Anchor
ab619035948a834b4a9c9d87dec0c6a50
ab619035948a834b4a9c9d87dec0c6a50

virtual const char* Enlighten::IBakeInputSystem::GetFullName

...

public: const char * GetFullName() const

...

Get the full name.


Anchor
a1d33af3ea5d0b34e9f1117fe0ff75cf6
a1d33af3ea5d0b34e9f1117fe0ff75cf6

virtual Geo::s32 Enlighten::IBakeInputSystem::GetHeight

...

public: Geo::s32 GetHeight() const

...

Returns the width and height of the internal GBuffer.

Note that this value is derived from the properties passed into the Finalise() method.


Anchor
a714bd3339d1b2dd1d0931762fcc47238
a714bd3339d1b2dd1d0931762fcc47238

virtual Geo::GeoGuid Enlighten::IBakeInputSystem::GetId

...

public: Geo::GeoGuid GetId() const

...

The Guid for the IBakeInputSystem.


Anchor
a29a336941c347060b4985435aa07920e
a29a336941c347060b4985435aa07920e

virtual bool Enlighten::IBakeInputSystem::GetInstance

...

public: bool GetInstance
(
    Geo::s32 idx,
    Geo::GeoGuid & oSys,
    Geo::s32 & oInstIdx,
    Geo::s32 & oMeshIdx,
    Geo::s32 & oNumFaces,
    Geo::s32 & oNumVerts
) const

...

Get the geometry instances information.


Anchor
af8227629569e679cc2e7dc26e8d5881a
af8227629569e679cc2e7dc26e8d5881a

virtual bool Enlighten::IBakeInputSystem::GetIsUserLightmap

...

public: bool GetIsUserLightmap() const

...

Is this BakeSystem a user-defined lightmap (if not then it is an Enlighten system, used only for sampling indirect light).


Anchor
aa7eb2e56224a7c12875a60e0af6e2178
aa7eb2e56224a7c12875a60e0af6e2178

virtual const Geo::GeoPoint2* Enlighten::IBakeInputSystem::GetLightmapUVs

...

public: const Geo::GeoPoint2 * GetLightmapUVs
(
    Geo::s32 bakeInstanceIdx
) const

...

Get the packed lightmap UVs for a geometry instance.


Anchor
a460221ea9d3d271e3ca6e85c6b283e4f
a460221ea9d3d271e3ca6e85c6b283e4f

virtual Geo::s32 Enlighten::IBakeInputSystem::GetNumInstances

...

public: Geo::s32 GetNumInstances() const

...

Get the geometry instances information.


Anchor
aedd9f90fa0002d41b59607bb93dc0f0e
aedd9f90fa0002d41b59607bb93dc0f0e

virtual bool Enlighten::IBakeInputSystem::GetOutputIsIntensity

...

public: bool GetOutputIsIntensity() const

...

Is this BakeSystem stores output as intensity value of the average light direction.


Anchor
a05d094bef7d6773f0ab6d4c820b58150
a05d094bef7d6773f0ab6d4c820b58150

virtual EBakeType Enlighten::IBakeInputSystem::GetOutputType

...

public: EBakeType GetOutputType() const

...

The output type for the system.


Anchor
ab397ecea8078a8ff5f0be7e5ef2a6e17
ab397ecea8078a8ff5f0be7e5ef2a6e17

virtual bool Enlighten::IBakeInputSystem::GetPixelBarycentricWeights

...

public: bool GetPixelBarycentricWeights
(
    Geo::s32 x,
    Geo::s32 y,
    PixelBarycentricWeights & out
) const

...

Extract barycentric weights for the pixel at this location.

Parameters
[in]x

X Coordinate.

[in]y

Y Coordinate.

[out]out

Mesh/Triangle identifier and the barycentric weights of the pixel center.

Note
titleNote

Enlighten converts all incoming meshes to CCW winding order; this means that the Barycentric coordinates created here may require reinterpretation when applied back to the source mesh. Unity and Unreal are examples of engines that would require flipping the order of weights, as they store meshes in CW winding order.


Anchor
ac760d658ba0b33204d8c8d5fb381ced2
ac760d658ba0b33204d8c8d5fb381ced2

virtual bool Enlighten::IBakeInputSystem::GetPixelIndexForTriangle

...

public: bool GetPixelIndexForTriangle
(
    Geo::s32 & pixelIndex,
    Geo::s32 triangleIndex,
    const Geo::BaryWeights & barycentricWeights
) const

...

Lightmap UV debugging helpers.


Anchor
af318c9dd2a2d41ef11a362529f1ad995
af318c9dd2a2d41ef11a362529f1ad995

virtual Geo::s32 Enlighten::IBakeInputSystem::GetTriangleForUVCoordinate

...

public: Geo::s32 GetTriangleForUVCoordinate
(
    float u,
    float v
) const

...

Lightmap UV debugging helpers.


Anchor
ae06c2664205ebb86286817519b6996c1
ae06c2664205ebb86286817519b6996c1

virtual bool Enlighten::IBakeInputSystem::GetUVCoordinateForTriangle

...

public: bool GetUVCoordinateForTriangle
(
    Geo::GeoPoint2 & uv,
    Geo::s32 triangleIndex,
    const Geo::BaryWeights & barycentricWeights
) const

...

Lightmap UV debugging helpers.


Anchor
a576e607824b290e141105aad4499cba6
a576e607824b290e141105aad4499cba6

virtual Geo::s32 Enlighten::IBakeInputSystem::GetWidth

...

public: Geo::s32 GetWidth() const

...

Returns the width and height of the internal GBuffer.

Note that this value is derived from the properties passed into the Finalise() method.


Anchor
aa5702580d26f327353abbee39686d2da
aa5702580d26f327353abbee39686d2da

virtual bool Enlighten::IBakeInputSystem::LightMapHasBadUVFaces

...

public: bool LightMapHasBadUVFaces() const

...

Lightmap UV debugging helpers.


Anchor
ae5fb810c8f4470cb3c9fcb16c6f7f7fe
ae5fb810c8f4470cb3c9fcb16c6f7f7fe

virtual bool Geo::IGeoSerialisable::Load

...

public: bool Load
(
    IGeoInputStream & stream,
    Geo::u32 section
)

...

Load an instance of this class from an IGeoInputStream.

The stream must be ready to read from. You can load sections of an object by passing a bitmask representing the desired sections rather than Iff::AllSectionsMask, which will load all sections. It is also safe to call this method on an object multiple times with different section arguments to load multiple parts.


Anchor
af6bdf30b42adde386c428e9dc2821eb9
af6bdf30b42adde386c428e9dc2821eb9

virtual void Geo::IGeoReleasable::Release

...

public: void Release()

...

Free this object that was created within the Enlighten libraries.

Expect this to behave in a similar way to calling 'delete(this)'


Anchor
a5b03439626a3dac9b9c27feb1a3978d3
a5b03439626a3dac9b9c27feb1a3978d3

virtual bool Geo::IGeoSerialisable::Save

...

public: bool Save
(
    IGeoStream & stream,
    Geo::u32 section
) const

...

Save an instance of this class to an IGeoStream.

The stream must be ready to write to. You can save sections of an object by passing a bitmask representing the desired sections rather than Iff::AllSectionsMask, which will save all sections that are available.


Anchor
aa8a49a6bb4479b2e9aa082a38a31e332
aa8a49a6bb4479b2e9aa082a38a31e332

virtual bool Enlighten::IBakeInputSystem::SaveChartUVLayoutEps

...

public: bool SaveChartUVLayoutEps
(
    const char * filename,
    Geo::s32 triangleIndex,
    Geo::s32 pixelIndex
) const

...

Various debugging helpers (can these be extracted into another API?)


Anchor
a706db3927a7fb0ee54ec12a813d42595
a706db3927a7fb0ee54ec12a813d42595

virtual bool Enlighten::IBakeInputSystem::SaveLightmapUVDebuggingRaySets

...

public: bool SaveLightmapUVDebuggingRaySets
(
    const char * filenamePrefix,
    const Geo::v128 & scale,
    const Geo::v128 & offset
) const

...

Various debugging helpers (can these be extracted into another API?)


Anchor
a52599758af26bf5a9faeea2d35a9165f
a52599758af26bf5a9faeea2d35a9165f

virtual bool Enlighten::IBakeInputSystem::SavePixelTrianglesEps

...

public: bool SavePixelTrianglesEps
(
    const char * filename,
    Geo::s32 pixelIndex
) const

...

Various debugging helpers (can these be extracted into another API?)


Anchor
a79d344ea00ee6e0eb4e0d99cb7f83be7
a79d344ea00ee6e0eb4e0d99cb7f83be7

virtual bool Enlighten::IBakeInputSystem::SavePixelTrianglesRaySet

...

public: bool SavePixelTrianglesRaySet
(
    const char * filename,
    Geo::s32 pixelIndex,
    const Geo::v128 & scale,
    const Geo::v128 & offset
) const

...

Various debugging helpers (can these be extracted into another API?)


Anchor
ae061e89f093838bf9e52b4999285c6f8
ae061e89f093838bf9e52b4999285c6f8

virtual bool Enlighten::IBakeInputSystem::SaveTrianglePixelsEps

...

public: bool SaveTrianglePixelsEps
(
    const char * filename,
    Geo::s32 triangleIndex
) const

...

Various debugging helpers (can these be extracted into another API?)


Anchor
afe171b5da9150f8b596c02eb3ecc83aa
afe171b5da9150f8b596c02eb3ecc83aa

virtual bool Enlighten::IBakeInputSystem::SaveTrianglePixelsRaySet

...

public: bool SaveTrianglePixelsRaySet
(
    const char * filename,
    Geo::s32 triangleIndex,
    const Geo::v128 & scale,
    const Geo::v128 & offset
) const

...

Various debugging helpers (can these be extracted into another API?)


Anchor
a80f323eb66759f6e1b9492b6b78ef776
a80f323eb66759f6e1b9492b6b78ef776

virtual bool Enlighten::IBakeInputSystem::SaveUVDebuggingRaySet

...

public: bool SaveUVDebuggingRaySet
(
    const char * filename,
    const Geo::v128 & scale,
    const Geo::v128 & offset
) const

...

Various debugging helpers (can these be extracted into another API?)


Anchor
af596f403602e5b6324fd3ee7d20cecc7
af596f403602e5b6324fd3ee7d20cecc7

virtual bool Enlighten::IBakeInputSystem::SaveUVLayoutEps

...

public: bool SaveUVLayoutEps
(
    const char * filename,
    Geo::s32 triangleIndex,
    Geo::s32 pixelIndex
) const

...

Various debugging helpers (can these be extracted into another API?)


Anchor
acb14a04549274fbf635e7d828dfed246
acb14a04549274fbf635e7d828dfed246

virtual bool Enlighten::IBakeInputSystem::SetBakeProperties

...

public: bool SetBakeProperties
(
    const IBakeInputProperties * pProps
)

...

Set the baking properties for this system.

This properties should be set in order to add meshes to this system.

Parameters
[in]pProps

Baking properties to use.

Returns

True if passed in valid properties, False if pProps is NULL or has an invalid Guid


Anchor
ac7d5746b88694395a6a74938d27fd32a
ac7d5746b88694395a6a74938d27fd32a

virtual void Enlighten::IBakeInputSystem::SetFullName

...

public: void SetFullName
(
    const char * name
)

...

Set a globally unique name.


Anchor
a9d9a26f1bf9505b5cf3c048c29e4053c
a9d9a26f1bf9505b5cf3c048c29e4053c

virtual void Enlighten::IBakeInputSystem::SetId

...

public: void SetId
(
    Geo::GeoGuid id
)

...

The Guid for the IBakeInputSystem.


Anchor
a84d3f5eda0077611d7b62ba61f204a86
a84d3f5eda0077611d7b62ba61f204a86

virtual void Enlighten::IBakeInputSystem::SetIsUserLightmap

...

public: void SetIsUserLightmap
(
    bool v
)

...

Is this BakeSystem a user-defined lightmap (if not then it is an Enlighten system, used only for sampling indirect light).