Pbrt v4 importer#307
Merged
Merged
Conversation
getFloat3 returned a spectrum's raw (wavelength, value) floats as an RGB triple. Route reflectance lookups through the same resolver used for emission so spectrum-pair, blackbody, and named-spectrum qualifiers resolve to real colours.
Operands were parsed in the wrong order vs the PBRT v4 spec. Apply whichever side is non-empty, so inside-out meshes (obj2pbrt output or ReverseOrientation) that name their medium as the exterior keep it.
The importer caps dielectric IOR at 2.5 (kMaxDielectricIor) and KHR_materials_volume models a single transmission, so neither the high-IOR total-internal-reflection path length nor a multi-bounce spectral absorption lengthens the in-medium path. The authored sigma_a then reads too faint; scale attenuationDistance down by an empirical factor of 5 to compensate.
- Filename-less / load-failed infinite lights bake emission into a 1x1 radiance pixel so the hdri light carries the spec-required radiance array. - ANARI hdri basis uses right = -normalize(direction) (VisRTX HDRI.cpp, OSPRay HDRILight.cpp); pass the negated CTM +X column or the map yaws 180 degrees.
type=nanovdb media become transferFunction1D volumes (field cached per medium, linear opacity ramp, sigma_s/(sigma_a+sigma_s) albedo); the bounding surface is suppressed. Skipped inside ObjectInstance templates -- Volume objects can't be shared across instances the way Surface refs are.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
More PBRT importer fixes to try and align PBRT scenes with ANARI semantics