diff options
author | Kristoffer Skau <[email protected]> | 2025-03-25 14:57:36 +0100 |
---|---|---|
committer | Jonas Karlsson <[email protected]> | 2025-05-28 13:43:37 +0200 |
commit | 497c9dae189676db896ab7519d549a5dac4e5232 (patch) | |
tree | 2cde6c960dc85d0b10eb4fe6760ae17012a2285a /src/runtimerender/graphobjects | |
parent | bf5ed50c5cc73ea046ef4a504febb617a2b7de20 (diff) |
Currently pretty hard to gauge how far along the baking is, especially
the indirect computation can take a long time.
This change improves the progress tracking by adding proper stage
progress and estimated time remaining when baking. Only the indirect
computation utilizes the time remaining, as it's not really possible
to know before getting there how long it's going to take, and the
other stages are relatively quick in comparison.
Cleans up certaing logs as they were too spammy and unecessary info to
the end user, and formats the times outputted to the console properly.
The lightmap baking callback has been changed to a QVariantMap holding
the payload data. This makes it easier for us to change what we send
later without breaking anything.
The following data is part of the payload:
Payload {
"status": int, // maps to the enum
QQuick3DLightmapBaker::BakingStatus
"message": QString // might be empty
"totalTimeRemaining": qint64 // in ms, -1 if not yet
computed
"totalProgress": double // in range [0, 1]
"totalElapsed": qint64 // in ms
}
Status is always present as it's necessary to know when complete,
cancelled etc.
Message is used for progress reports, warnings and errors. This might be
empty.
totalTimeRemaining, totalProgress and totalElapsed will always be
present, but totalTimeRemaining is not actually calculated prior to
indirect computation as already stated and is -1 prior to this.
An example of working around this is the DebugView bake UI.
It just outputs "Estimating..." while time remaining is < 0.
totalProgress rogress is 0 - 1 so that it can be easily passed to a
Progress Bar item.
Change-Id: Idb69901d767af2602b194fdb1a012bb630b1b3ac
Reviewed-by: Jonas Karlsson <[email protected]>
Diffstat (limited to 'src/runtimerender/graphobjects')
0 files changed, 0 insertions, 0 deletions