[Closed] Line rendering script help needed
Basically what I’m trying to do is render splines the way they are rendered in the viewport. So that the thickness of the splines is constant no matter how close the camera is to them.
my first attempt was to make a registerTimeCallback script which measures the distance from the camera to each spline in the scene and overwrites the slpine’s thickness based on that. However because the distance is measured from the object’s pivot the distance measurement becomes inaccurate and the thickness is not adjusted when the camera is close to the spline but at the outer edge of the bounding box.
So, does anyone know another method for doing this or maybe there is already a script/plugin available. Any help would be appreciated.
I would make the spline thickness really small and use contour or a toon shader to do the inking. That should make the size uniform.
-Eric
EDIT: That may not work. What about using an orthographic camera instead of perspective?
I actually tried that already (scripting is usually my last resort to solving a problem). the thin line seems to disappear as I zoom out and the ink with it. I think the line becomes so thin that the ink plugin can’t find any pixels to draw the ink around.
there is an example in max script manual on creating a point render what it does is draw a pixel in viewport for every mesh point. i am wondering if I can do something with that for my purposes.