Skip to main content
11 events
when toggle format what by license comment
Jul 3, 2020 at 0:55 vote accept cppBeginner
Jul 2, 2020 at 17:02 answer added Robin Betts timeline score: 2
Jul 2, 2020 at 8:56 comment added cppBeginner @Robin :: Nice example. Thanks. You can post answer if you want. I don't plan to do. I am too satisfied for now. If you didn't say about dPdu, I couldn't reach this point of knowledge. Your original question is really good too.
Jul 2, 2020 at 8:50 comment added Robin Betts Fantastic. Example here
Jul 2, 2020 at 7:18 comment added cppBeginner @Robin Here is the nutshell : point ps[3]; getmessage("trace","geom:trianglevertices",ps); vector trueNormal= cross(ps[1]-ps[0],ps[2]-ps[0]); I need to test more.
Jul 2, 2020 at 5:47 comment added cppBeginner @Robin I can use clockwise/counter-clockwise check (cross-product). In my simple test, it works. Thanks.
Jul 2, 2020 at 1:43 comment added cppBeginner @Robin :: Thank. It gives me some idea. Perhaps "geom:trianglevertices" might be useful. I am investigating. docs.blender.org/manual/en/2.79/render/cycles/nodes/osl.html ... yea, look like it works.
Jul 1, 2020 at 18:15 comment added Robin Betts I'm stumped. The information we need is backfacing, as determined by the clockwise / anticlockwise order of vertices around the polygon containing the shading point, from the ray's POV. The only way I can find of accessing this information is via the backfacing() function, but that can only be called on the shaded P, not on a P we hit ourselves, with a probing ray. I've tried vertex locations, dPdu,dPdv.. .... all sorts.
Jul 1, 2020 at 11:59 history edited cppBeginner CC BY-SA 4.0
added 228 characters in body
Jul 1, 2020 at 10:16 history edited cppBeginner CC BY-SA 4.0
added 5 characters in body
Jul 1, 2020 at 10:10 history asked cppBeginner CC BY-SA 4.0