Skip to content

Falcor 8.0

Latest
Compare
Choose a tag to compare
@tomas-davidovic tomas-davidovic released this 19 Aug 08:13

8.0

Overview

  • Added base classes to Scene and LightCollection
  • Fixes and additions to differentiable path tracer.
  • Switched to new Slang version with API changes.
  • Support for Scenes larger than 4GB.

Dependencies

  • Update slang to version 2024.1.34
    • Use new slang API for disabling compiler warnings.
    • Disable slang reinterpret size mismatch warning to reduce diagnostic noise.

Python

  • Add UI interface functions to Testbed.
  • Moved the per-frame python callback that allows modifying Scene to Mogwai.
  • Add python interface to Device to query available adapters.
  • Add error check if no GPU is found.
  • Added a convenience camera dump output formatted so it can be directly pasted into .pyscene.

Importers

  • Added a scene importer for Mitsuba 3 XML scene files (based on what @skallweit had a few years ago).
    • The importer supports a subset of the Mitsuba scene descriptions (see README.md).
  • Improvements to make discovery of USD material shaders more robust.
  • Add usdz to list of supported file types.

Passes

  • Refactored the return value of InternalPathTracer's traceRay calls.
  • Added a new "overlayUI" feature to Mogwai which allows users to draw simple primitives over the final rendered image. This is very helpful for debugging and visualizing aspects of various experiments.
  • SceneDebugger can now visualize content of VBuffer, rather than always tracing its primary rays.
  • Enable the pixel debugger for per pixel debug printing in the SceneDebugger pass.
  • Add support for visualizing BSDFProperties in SceneDebugger.

Differentiable path tracer

  • Fix the condition for computeEmissive.
  • Fix a division-by-zero issue (which causes NaNs during bwd_diff) by checking bsdfSample.pdf > 0.
  • Change shape optimization examples with max_bounces=2.
  • Extend SceneGradients to allow more gradient types: MeshPosition, MeshNormal, and MeshTangent.
  • Add custom derivative functions in DiffSceneIO.slang to backprop gradients of mesh vertices.
  • Add an inverse rendering example that optimizes the translation and the rotation angle of the bunny.
  • Add an inverse rendering example that morphs a sphere to a bunny.

Scene

  • Scene now has a base class IScene to allow alternative Scene implementations.
    • Switched RTXDI to use IScene
    • Switched ScreenSpaceReSTIR to use IScene
    • Switched GridVolumeSampler to use IScene
  • LightCollection now has a base class ILightCollection so different alternative implementations are easier to intergrate.
    • EmissiveLightSamplers now operate on ILightCollection instead of on Scene.
  • Changed the setRaytracingShaderData to bindShaderDataForRaytracing to have singature that's more aligned with bindShaderData
    • Removed several unnecessary bindShaderData calls (followed by bindShaderDataForRaytracing that already binds those).
    • Removed several unnecessary bindShaderDataForRaytracing calls (followed by IScene::raytrace that already binds those).
  • Renamed getActiveLights to getActiveAnalyticLights to make it clear which lights are these (in line with useAnalyticLights)
  • Removed the getActiveLightCount and getActiveLight as they are not necessary.
  • Refactored VertexData to a separate file, to not require importing all SceneTypes when using it.
  • Refactored MaterialInstanceHints into its own file, so they can be used in interface without pulling full MaterialInstance in. (Breaks cyclic dependencies down the line)
  • Added unpackHitInfo method on Scene so it is easier to specialize when needed.
  • Scene's HitData now returns PackedHitInfo via a pack() call, putting it in line with other structs returning their packed form via a pack() call. The fact that HitData already contains PackedHitInfo and no work is done should be an implementation detail, not reflected in the method name.
  • Added default argument values to SceneRayQuery calls.
  • Added UpdateFlagsCallback to Scene, that allows having callback called when SceneUpdateFlags are changed, so the update flags are accumulated in the listener rather than Scene. To avoid missing updates when the flags are not acted on right away.
  • Added SplitBuffer type, that handles buffers larger than 4GB, for up to 4 billion items.
    • Top bits of an index are used to select a GPU buffer.
  • Vertex data is no longer uploaded inside AnimationController, but along with Index data it is uploaded when copied into Scene.
  • Changed splitMeshGroupMidpointMeshes behavior in the case where one side of the split ended up empty. This can happen when long skinny triangles make the bbox very imbalanced with respect to the actual triangle centroids. Previously, we would just give up on splitting the group, ending with possible very large groups. New approach just sorts the meshes by their centroids on the axis that was deemed to be the best split axis, and splits the group in half.

Error Handling

  • Add checks in parameter block init for invalid use of arrays of textures on vulkan (which previous failed silenetly)
    • Note: Checked perf in profiler - effect is negligible compared to cost of the rest of the function
  • Turned warning on 4GB buffers into an exception, as it actually affects the renderer's results.
  • Add unit test for nested arrays of textures.
  • Add unit tests for Slang generics in interfaces.
  • Add unit tests for floating-point atomics.

General

  • Structured buffers are now created without a UAV counter by default.
  • Buffer views are now based on byte ranges, not element ranges.
  • Buffer::getSRV() and Buffer::getUAV() now take a byte range instead of element range.
  • Allow USD variant set selection to be overridden through attributes.
  • Moved LightProfile handling to MaterialSystem as it is more (emissive) Material than Scene related.
  • Update the VNDF sampling function to use the latest spherical cap sampling technique (HPG 2023 paper)
  • Make available all imported asset paths and associated material dictionaries
  • Add support for shared resources (CUDA) on Vulkan/Linux.
  • Added support for 16b images.
    • Dropped code that would mistakenly interpret 16b images as Float16.
    • Added a flag for saving EXRs in half floats.
    • If the input texture is 16b EXR, we automatically set the Bitmap::ImportFlags::ConvertToFloat16 to conserve GPU memory.
    • Add Bitmap::ImportFlags to specify import options, and pass import flags through texture loading functions.
    • Add flag for converting HDR images to 16-bit format upon texture load.
  • Remove unused lod parameter to prepareShadingData().
  • Add tracking of texture ownership in TextureManager.
    • Free textures no longer in use when removing materials.
  • Add interface for querying memory usage on Scene and some utility classes.
  • Add TextureManager::getUdimIDs() helper to get list of UDIM IDs for a texture handle.
  • Remove Buffer::MapType enum.
  • Change the script name to run_material_optimization.py for consistency.
  • Added LOD parameter to environment map sampler function.

Bug fixes

  • Fixes a discrepancy between Python and C++ default values when creating grids.
  • Fixed a possible bug where, if the Assimp importer skipped a mesh, the meshMap would get out of sync with the meshes in the actual aiScene.
  • Fixed bug when LightCollection was rebuilt in Scene (on EmissiveMaterialsChanged). LightBVHSampler and EmissionPowerSampler were still operating on the old LightCollection object, which was no longer the same object held by Scene.
  • Fix issue with loading filtered attributes from json
  • MaterialSystem now re-evaluates the Metadata after calling update(), to make sure it reports enough texture slots. Can be removed pending fix to unbounded buffers.
  • Fix PBRT coated and dielectric materials bug.
  • Bitmap::getSize() is now 64b to avoid crashes on 16k textures.
  • BakedTexture calculates sizes in size_t to match the Bitmap::getSize()
  • Fix issue with refinement of left-handed subdivs.
  • Fix 2D multi-sampled texture resolving.

Refactored Attributes and Settings to be more streamlined for the actual usage.

  • Added AttributeFilters, to allow attaching attributes to shapes based on the name regex lookup. The new syntax for a filter is:
    • { "name": "name of the filter", "regex": "shape_name_to_apply_to.*", "attributes": {"attr":"ibutes","applied":"to","all":"matching","names":1}}
    • The name and regex are optional. If regex is not specified, the attributes are applied to all shapes (equal to regex .* )
    • If neither name nor regex are required, the attributes can be unnested like so: {"attr":"ibutes","applied":"to","all":"matching","names":1}
    • This supercedes the previous attribute.filter syntax for assigning attributes to all shapes with matching names or all shapes with not matching names.
    • To attach an attribute to all shapes not matching a name, first create a filter that applies the attribute to all shapes, and then create an attribute that applies the attribute with null value to the shapes that are not supposed to have it. This unsets the attribute for the given shapes.
    • All filters are applied in the order in which they were added, and it is possible to add an array of filters at once.
  • Refactored the Settings class to be streamlined with the new AttributeFilters pattern.
  • Refactored Options handling to match the Attribute handling (except there is no regex )
  • The lookup can now only be done by fully qualified name, e.g. usdImporter:dropPrim