Forum: Poser - OFFICIAL


Subject: two side Cloth?

ice-boy opened this issue on Apr 10, 2007 ยท 48 posts


bagginsbill posted Thu, 12 April 2007 at 3:59 PM

No you're dead on. I didn't bring it up because it is somewhat more complicated to explain - I figured rather than go into the math - people should just build the scene around the camera pointing straight north.

However, to be honest, all you need to do is this: You want to know if the dot-product of the normal (N) is aligned with the direction to the camera. To do that, just plug in the x,y,z vector to the camera from the current point on the surface. How you get that is a pain, but a Python script could do it easily. It is one of the features I'm working on with Parmatic (another one of mys cripts), putting the camera position into a node automatically and constantly.

Then you subtract that node from the P node (which gives the coordinate of the currently rendered point) and that gives you a direction. Decompose that into three values and plug into N - which will compute the dot product. If it's positive, then the point is facing the camera.

Several problems exist with this, not the least of which is I'm frequently dealing with people who A) don't know math very well, B) don't know the nodes very well, and C) can't put it together.


Renderosity forum reply notifications are wonky. If I read a follow-up in a thread, but I don't myself reply, then notifications no longer happen AT ALL on that thread. So if I seem to be ignoring a question, that's why. (Updated September 23, 2019)