Timeline for How To Make Seamless Custom CubeMap?
Current License: CC BY-SA 4.0
9 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Aug 7, 2023 at 0:16 | comment | added | DMGregory♦ | TBN matrices are invertible. You can go back and forth between any two coordinate spaces you like. But the problem here is that different cube faces have different tangent spaces, so getting agreement there is hard, while getting agreement in world space is easier, and mapping from world to tangent space is as easy as mapping between tangent space and world/view space, which you have to do anyway for rendering. | |
| Aug 6, 2023 at 19:57 | comment | added | Miguel Myers | Hi again, I wanted to know if it would be possible to convert a arbitrary tangent Space normal map to world space instead of the world to tangent. so it matches the normals of those produced by the noise derivative? | |
| Jul 31, 2023 at 2:30 | comment | added | DMGregory♦ | Looks like something to post a new question about. I won't have access to a computer until later this week, but other users may be able to help you. | |
| Jul 31, 2023 at 0:45 | comment | added | Miguel Myers | I'm trying your other recommendation to transform the normals from world space to tangent space. But I'm unsure if I'm using my TBN Martix correctly. There seems to be little to no changes between the world space normal and tangent space normal. lines 86-88 is the construction of the TBN and line 151 is where I try to use it to convert the world space normal to tangent space. EXAMPLE | |
| Jul 30, 2023 at 2:46 | vote | accept | Miguel Myers | ||
| Jul 30, 2023 at 2:25 | comment | added | DMGregory♦ |
Don't add 50 to sampleDir as used in normal reconstruction. You can shift the noise location like float3 shiftedSample = sampleDir + shift; float4 noise = noised(shiftedSample);, but you must use the original unshifted sampleDir for the onSphere and normal lines. (It has to be a point on the unit sphere centered at the origin, not a point 50 units to the right of that).
|
|
| Jul 30, 2023 at 0:51 | comment | added | Miguel Myers | Following your recommendation to calculate the normals analytically produces great results. Thank you. However, simply offsetting the sampleDir (world space position) in any direction before passing it to the noise function seems to result in incorrect gradients. I will mark this question as answered and post my second question here. | |
| Jul 24, 2023 at 21:17 | history | edited | DMGregory♦ | CC BY-SA 4.0 |
Simpler but geometrically equivalent code
|
| Jul 24, 2023 at 19:00 | history | answered | DMGregory♦ | CC BY-SA 4.0 |