mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-10-30 00:17:13 +00:00
feat(ugc): settings for the ray tracer, hidden-face method and denoising
New UGC settings (ugcconfig.ini and the dashboard's settings page):
- ray_backend: builtin (default), embree or hiprt (falls back to embree when
the build or machine can't); the hidden faces' paths and the occlusion rays
- hsr_method: toolbox (default, LU Toolbox's paths) or fast (the renders from
around the model), and hsr_fast_resolution (1024) for the fast one
- denoise: off (default) or oidn (icons; off until a build has it)
UgcProcessOptions (dCommon/UgcKeys.h) names the choices for everything that
passes them on ("embree fast oidn", any order, left out: the setting's).
UgcJobs::ApplyOptions puts a choice over the settings and MadeWith says what a
make used after fallbacks; a made model's stats.json records it (rays,
hsrMethod, denoise). UgcServer --make-model and --make-modular take the
choices after the folder and print the CPU time and what made it.
Check: the defaults make the same files as before; the settings page shows the
four settings under UGC; UgcServer --make-model model.lxfml out embree fast.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -94,6 +94,21 @@ namespace {
|
||||
}
|
||||
|
||||
namespace UgcRender {
|
||||
std::string_view Name(eDenoise denoise) {
|
||||
return denoise == eDenoise::OIDN ? "oidn" : "off";
|
||||
}
|
||||
|
||||
std::optional<eDenoise> ParseDenoise(std::string_view name) {
|
||||
for (const auto denoise : { eDenoise::OFF, eDenoise::OIDN }) {
|
||||
if (Name(denoise) == name) return denoise;
|
||||
}
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
bool Available(eDenoise denoise) {
|
||||
return denoise == eDenoise::OFF;
|
||||
}
|
||||
|
||||
std::vector<glm::vec3> SphereDirections() {
|
||||
const float t = (1.0f + std::sqrt(5.0f)) / 2.0f;
|
||||
const std::vector<glm::vec3> corners = {
|
||||
|
||||
Reference in New Issue
Block a user