Timeline for Simulating neon: Find angle between two vectors with shader nodes
Current License: CC BY-SA 4.0
17 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Sep 22, 2021 at 6:00 | history | tweeted | twitter.com/StackBlender/status/1440556493124685824 | ||
Sep 22, 2021 at 0:38 | answer | added | NeverConvex | timeline score: 4 | |
Sep 22, 2021 at 0:31 | history | became hot network question | |||
Sep 21, 2021 at 22:39 | answer | added | Robin Betts♦ | timeline score: 9 | |
Sep 21, 2021 at 19:17 | comment | added | NeverConvex |
A Fresnel node does seem simpler and likely to work, but just to clarify, @TheLabCat: in the expression I wrote, a would be the camera vector, b the normal vector, arccos is the inverse of the usual cosine function (math node has an arccos implementation, I think), || || is the Euclidean norm (or just Length in shader node terms, I believe) and so you could in principle just plug together a few nodes to compute this angle. May need to multiply the camera or normal vectors by -1 , depending on how you're imagining the geometry's orientation, but that was the idea behind the math
|
|
Sep 21, 2021 at 19:03 | vote | accept | TheLabCat | ||
Sep 21, 2021 at 23:06 | |||||
Sep 21, 2021 at 19:01 | answer | added | Ron Jensen | timeline score: 4 | |
Sep 21, 2021 at 18:50 | comment | added | TheLabCat | @RonJensen yes! I knew I had done it before somehow. That will probably give me what I need. :-) | |
Sep 21, 2021 at 18:50 | comment | added | TheLabCat | @NeverConvex I’m not entirely sure what you just said, but I’ll look into if the other guy’s idea doesn’t work. Thx 😊 | |
Sep 21, 2021 at 18:49 | comment | added | Ron Jensen | Try using a Fresnel node and skip the math? | |
Sep 21, 2021 at 18:46 | comment | added | NeverConvex |
I think the angle you want is given by arccos( (a \dot b) / (||a|| ||b||) ) , based on solving the geometric defn of the dot product (en.wikipedia.org/wiki/Dot_product#Geometric_definition) for the angle between the two vectors?
|
|
Sep 21, 2021 at 18:17 | comment | added | TheLabCat | @JachymMichal I tried to clarify, but the neon sign I saw in real life was in the daytime, and of course not many people on the Internet photograph neon in the daytime. | |
Sep 21, 2021 at 18:16 | history | edited | TheLabCat | CC BY-SA 4.0 |
added 1099 characters in body
|
Sep 21, 2021 at 18:03 | comment | added | jachym michal | Cheers for that ;) | |
Sep 21, 2021 at 18:02 | comment | added | TheLabCat | @JachymMichal I don’t think you have a bad imagination, but I will add screenshots and such. | |
Sep 21, 2021 at 18:01 | comment | added | jachym michal | Hi :). Could you please add an image to illustrate the problem and your current node setup? For those of us with bad imagination. Thanks :). | |
Sep 21, 2021 at 16:31 | history | asked | TheLabCat | CC BY-SA 4.0 |