Giter Site home page Giter Site logo

dspbr-pt's Introduction

Enterprise PBR Sample Renderer (Demo Viewer)

A WebGL2 GPU path-tracer that runs in your browser.
Features physical materials by implementing the Enterprise PBR Shading Model (DSPBR)

Demo Viewer (glTF drag&drop)

Minimal Demo [ Code ]

Features

Development

# yarn is mandatory as this project uses yarn workspaces
yarn install

# Builds all packages
yarn build

# Launch the demo viewer with HMR enabled -> auto update on code change during development
yarn run dev

License

  • Source code license info in LICENSE

dspbr-pt's People

Contributors

bsdorra avatar dependabot[bot] avatar proog128 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dspbr-pt's Issues

Denoising

Your project is fantastic, quite a achievement! I saw another project which is similar to yours, they talk about denoising here in this issue:
hoverinc/ray-tracing-renderer#2
I thought you might have experience in denoising techniques and want to add to the discussion. It would be cool to also see denoising ending up in your project.

transmission is dark

It seems like the attenuation color ends up considerably darker than in any of our rasterizers as a general rule, and I can't think of a path-tracer reason for that. It's especially clear here. Interestingly, khronos-AttenuationTest also shows a disparity between the first row and the others that I don't quite understand. Possibly related?

iridescenceThicknessTexture ignored?

iridescenceThicknessTexture seems to be ignored when rendering a glTF material with KHR_materials_iridescence in the online renderer. There should be a noisy perturbation of the thickness, as seen on the right:

2022-06-08 10_34_32-glTF Sample Viewer

Example model:
iridescent_bubble_gltf.zip

    "materials": [
        {
            "name": "bubble",
            "pbrMetallicRoughness": {
                "baseColorFactor": [
                    1,
                    1,
                    1,
                    1
                ],
                "metallicFactor": 0.3,
                "roughnessFactor": 0.0
            },
            "doubleSided": true,
            "extensions": {
                "KHR_materials_transmission": {
                    "transmissionFactor": 1
                },
                "KHR_materials_ior": {
                    "ior": 1.0
                },
                "KHR_materials_iridescence": {
                    "iridescenceFactor": 1,
                    "iridescenceThicknessTexture": {
                        "index": 0
                    },
                    "iridescenceThicknessMinimum": 450,
                    "iridescenceThicknessMaximum": 550,
                    "iridescenceIor": 1.6
                }
            }
        }
    ],
    "textures": [
        {
            "sampler": 0,
            "source": 0,
            "name": "bubble_thickness.png"
        }
    ],
    "images": [
        {
            "uri": "bubble_thickness.png"
        }
    ],

Thanks!

Singular events should not count as bounce

Singular bounce events as for mirror reflections (refractions) currently count as bounce. When rendering with low bounce depth, this results in black shading of very reflective parts of the scene.
Not counting these event should fix this, as the path continues until a light or non-singular surface is found where light contribution can be gathered by direct light sampling.

Support for non-indexed and interleaved geometry

The renderer currently fails silently if given the following types of input geometry:

  • non-indexed (or mixed index and non-indexed?)
  • interleaved attributes
  • mixed component types (e.g. some positions uint8, others uint16)

The error seems to be related to the mergeBufferGeometries step, which displays an error in the console. I'm not sure if it's possible to proceed without merging? three.js does have a mergeVertices utility that can help with creating an index. The other two (de-quantizing, de-interleaving) would require some custom code here.

I'm wondering if it would be an option to pre-process the input glTF file with gltf-transform, to normalize the structure for the path tracer, like:

import { WebIO, VertexLayout } from '@gltf-transform/core';
import { ALL_EXTENSIONS } from '@gltf-transform/extensions';
import { weld, dequantize } from '@gltf-transform/functions';

const io = new WebIO()
  .registerExtensions(ALL_EXTENSIONS)
  .setVertexLayout(VertexLayout.SEPARATE);

// Read.
const document = io.readBinary(inputGLB /* ArrayBuffer */);

// Process.
await document.transform(
  weld(),
  dequantize()
);

// Write.
const outputGLB = io.writeBinary(document);

^the dequantize function doesn't yet exist, but I could add it if that's of interest.

Markdeep Spec is not rendering

I clicked the links in the README but I see markdown source rather than rendered output. Looks like a 404 on the markdeep library:

Screen Shot 2020-08-28 at 2 52 56 PM

ThinWalled vs. IOR?

I am seeing odd results in DSPBR when a glTF model uses Transmission without Volume (thin-walled) and no IOR is specified. (third image below)

However when KHR-materials_ior is added at 1.0 for the air inside the bubble, then the iridescence looks correct. (fourth image below)

Shouldn't the absence of the KHR-materials_volume extension cause thin-walled rendering, which assume air is behind/inside the mesh surface?

2022-06-09 11_42_59-Enterprise PBR Sample Renderer

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.