Coder Social home page Coder Social logo

Comments (5)

BachiLi avatar BachiLi commented on July 22, 2024 1

Point light sources introduce extra Dirac delta into the path integrals, and the math in the paper is not really compatible with it since multiplication of Dirac deltas is not a well-defined operation. For similar reason we don't support pure specular BRDFs either.

In practice, the problem is that in a unidirectional path tracing framework, the sharp shadow caused by the point light source has zero probability of being sampled (the chances that you exactly hit the shadow boundary through path tracing is zero).

A possible solution is to use light tracing or bidirectional path tracing: you can trace a path from the point light source to a triangle edge to create a light path. However handling multiple importance sampling and change of measure correctly can be tricky. This is certainly one interesting future research direction. Another possibility is to relax the Dirac delta like people did with photon mapping/photon beams.

Another possible trick is to use shadow map: you can render with point lights using the deferred shading trick ( https://github.com/BachiLi/redner/wiki/Tutorial-4%3A-fast-deferred-rendering ), and also render a depth map from the light source as a shadow map. If you use typical depth test for shadow mapping, this is still not differentiable, because there is a binary step function of hit or not hit. However you can replace the depth test with a soft visibility function (say, sigmoid). I haven't tried this so I would love to hear if anyone implement this.

Sorry for lots of technical jargons. Let me know if this is unclear.

from redner.

swordigo1995 avatar swordigo1995 commented on July 22, 2024 1

Sorry for comming late.. But thanks a lot for your reply and careful explanation about my question! It really helps me !!!
I have another question: if we fix camera & geometry & lighting, only the material is to be optimized. There is probably no discontinuous visibilty problem, because result image varies smoothly in process of optimizing materials, so can we use orignal area sampling without edge sampling technique in this scenario?
BTW, is there a convient way i can on/off edge sampling in the code for testing?
Thanks !!!

from redner.

BachiLi avatar BachiLi commented on July 22, 2024

You are correct. We have a paper on this recently:
https://niessnerlab.org/projects/azinovic2019inverse.html
(also check out works by Gkioulekas, e.g. http://www.cs.cornell.edu/projects/translucency/#acquisition-sa13, and some Cornell people, e.g.
http://www.cs.cornell.edu/projects/ctcloth/#matching-cloth ).
It also depends on your material model: if you have discontinuities in your procedural shader, then you need some kind of edge sampling or prefiltering. Index of refraction of dielectric materials might also cause discontinuities.

To turn off edge sampling, I would add "return;" at these two lines:
https://github.com/BachiLi/redner/blob/master/edge.cpp#L235
https://github.com/BachiLi/redner/blob/master/edge.cpp#L644
I might add a flag to do this in the future.

from redner.

swordigo1995 avatar swordigo1995 commented on July 22, 2024

Wow ! cool !!!

from redner.

BachiLi avatar BachiLi commented on July 22, 2024

Closing this issue. Feel free to reopen if there are more questions.

from redner.

Related Issues (20)

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.