THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 28/05/2003 at 06:33, xxxxxxxx wrote:
Cinema 4D Version: 8.100
Platform: Windows ;
Language(s) : C++ ;
vor my NPR renderer I need viewclipping, that means that the screen coordinates of points from edges they are outside are zero. I do this thinks in camera coordinates and after that I want to transform the camera coordinates in screen coordinates. But for this I need the camera coordinates of the view volume that means that I need the camera coordinates of View 0,0 and view 320,240 (e.g). Have anybody a idea how I can get this coordinates and what are the normales of the viewplanes (top,front,left,right) in camera coordinates, so that I can calculate the Intersection of the object and planes in camera coordinates?
Thanks and I hope you can halp me because I became crazy with this thinks
On 28/05/2003 at 07:18, xxxxxxxx wrote:
You need to acquire the RenderBaseDraw from the videopost document. This depends of course on where in the vp plugin you are executing. I preferred to do it outside of the inner render loop. If you are doing it inside the inner render loop you can use the volume data functions for projecting points into screen space ( I converted all points to a normalized screen space, I think that was easier for clipping. ).
On 28/05/2003 at 08:48, xxxxxxxx wrote:
I must do it with camera coordinates. I toke the RenderBaseDraw but the problem is I can't figure out the sides of the camera volume which is equal to the screen sides. I know the converting functions of RenderBaseDraw but I need the side planes of the camera volume and I have no idea how I can find them?
have you any idea?
On 01/06/2003 at 10:43, xxxxxxxx wrote:
The actual projection code has been posted here in the forum (or in the archive). Perhaps it will help when calculating these sides. (I didn't really understand why you couldn't use the SW(), WC() conversion functions.)
On 02/06/2003 at 08:47, xxxxxxxx wrote:
I will test it with SW(), WC() again maybe there was a bug in my code, but it is really a littlebit tricky. at the moment I do all thinks in 2D that is working ok.