Comments (7)
We moved to LinearFilter
recently just to get rid of the pixelation yes.
Make sure you're using the latest RGBE/HDR loaders.
from three.js-pathtracing-renderer.
@mrdoob
Thank you Ricardo! Ok I will grab the latest RGBE/HDR loader from three.js and update my filter to LinearFilter.
Thanks again for the quick response! :-)
from three.js-pathtracing-renderer.
WOW! @erichlof I just got up. it's 5:45 am in Beijing.
from three.js-pathtracing-renderer.
@q750831855
Hello, I'm sorry but I don't quite understand - is the top rendering using LinearEncoding, and the bottom render with the flower circled in red using RGBEEncoding? THREE.js only uses RGBEEncoding on all their examples/demos that use HDR images, so that's what I used too - I was just following their example. In my matching HDRI fragment shader for this demo, I use THREE.js's utility function RGBEToLinear() : https://github.com/erichlof/THREE.js-PathTracing-Renderer/blob/gh-pages/shaders/HDRI_Environment_Fragment.glsl#L288-L291
So I'm assuming that this utility function handles the necessary data encoding correctly. One more thing that could be causing the 'pixelating' of the flowers in the bottom image is that I was using NearestFilter and it appears you are using LinearFilter, which smooths out the pixels a little? And where are you actually using THREE.FloatType? It appears that it is commented out. I have used that on both of the DataTextures: AABBTexture, and TriangleTexture that contain float data about the model geometry, but I wasn't aware if I could use that with RGBE maps.
I might have to ask mrdoob about this: what is the preferred way to load in an HDR file, RGBE encoding, or LinearEncoding? And does filtering effect path tracing, should we use LinearFilter? or is NearestFilter ok to use? (and possibly faster?)
Thank you for bringing this to my attention - I will try to learn more about it and see what mrdoob thinks.
from three.js-pathtracing-renderer.
pinging @mrdoob
Hi Ricardo, sorry to bother you - what is the preferred way to load an HDR environment map in three.js? If you look at the code picture in the original post above, my way is commented out and the op's way is highlighted. I was following the three.js examples of how to display rgbe-encoded HDR maps. I was telling the op that it might not even matter how it is loaded in on these .js lines of code because in the actual glsl path tracer, I use your RGBEToLinear() function to look up the texture using the CartesianToSpherical uv coordinates. Then once the texture color is in linear color space, I perform regular math operations on it, and then gamma correct the final output before it is displayed on the screen.
The op also claims that the image pixelation (red circle on the flowering bushes) could be corrected if FloatType is used somehow, but I think it is due to the fact that I was using a NearestFilter while he was using a LinearFilter (which may help blur the pixels a little?).
Any thoughts or insights would be greatly appreciated.
Thank you,
-Erich
from three.js-pathtracing-renderer.
@q750831855
I will go update my RGBE loader per mrdoob's suggestion and change the filter like you have in your snapshot: LinearFilter. Hopefully that combination will take care of the pixelization issue. I'll let you know when I've updated everything.
from three.js-pathtracing-renderer.
@q750831855
Ok I now have the latest RGBE loader from three.js and I also updated the .js file for this demo to follow your Linear example. The only thing I couldn't do was assign FloatType to the texture.type - it may be because I'm on an old laptop and my weak integrated graphics card can't handle that kind of data precision/amount.
But hopefully the HDR image looks a little smoother in the background for everyone.
from three.js-pathtracing-renderer.
Related Issues (20)
- muti material not supported
- WebGPU port HOT 3
- More abstractions HOT 9
- Using more information from earlier samples HOT 3
- More samples per frame option HOT 63
- More compatibility with three js APIs HOT 2
- Stop a caustic ray if it crosses a surface HOT 3
- Just wondering how you handled something HOT 14
- Blue noise HOT 8
- GLTF viewer textures HOT 3
- sampler2D array HOT 14
- How to use this pathtracer in Freeciv 3D version? HOT 2
- [question] how to debug glsl in chrome? HOT 2
- GLTF_Model_Viewer didn't get the right result? HOT 6
- How to incorporate it into project? HOT 9
- statistical tool: bootstrapping
- Shadow Catcher HOT 1
- Support for a THREE.ParametricGeometry HOT 1
- GLTF_Viewer is not able to load textures HOT 1
- image stretched for BHV point light source HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from three.js-pathtracing-renderer.