How to have line thickness remain same when zooming into it?


#1

I have a line (spline) on a plane which indicates a border, but it is only being used for illustrative purposes. Upon zooming into the box in an animation, I would like to have the line remain a constant thickness relative to the camera view, much like when you zoom into google maps, the roads remain the same thickness after refresh. I’m not sure what this effect is called in max, any ideas on what terms i should be looking up? thanks!


#2

Well…unless you have ‘Rendering> Enable In Viewport’ on, the spline should always be 1 pixel wide in your viewport


#3

Sorry, i meant i would like this to happen in the render, not in the viewport.


#4

I’d be interested to know, too. I think you have to go with a specialised toon renderer, (Final Toon, Illustrate, etc.) to get good antialiased lines drawn into 2D, after perspective. You can get somewhere in scanline by making your spline a boundary between smoothing groups or material IDs, and using that to kick Ink’n’Paint into drawing a line, but I can’t get the quality very high.


#5

i guess this aught to be possible using a script or reaction manager.

so when you move the camera closer or something… the radius of the line is scale´ing relative to the camera zooming - moving or whatever

Thats the only “easy” thing i can think of

Regards


#6

a wire parameter, to attach the camera location or another camera parameter,
to the width of the line, where the line is a renderable line.

or, just playing with the width of the renderable line, to get it to look right.

for the wire parameter

select camera
right click, wire parameters
this brings up menu with choice of “transform” and “object (target camera)”
pick one or the other, depending on whether you tie camera location or
…object properties to line width

if you pick ‘object’, then next selection is “FOV” (field of view)
pick line, which is already set to “renderable”
this brings up menu with choice of “transform” and “object (line)”
then pick “render thickness”

^ i think it’s worth learning to do it this way. there may be
some complex multi-variate expression which will make the
line look right.

but, whether you’re moving the camera or changing its FOV, that doesn’t
just change the appearance of the line. it changes a lot of things in
the render output.

just keying the render thickness of the line, “manually”, so that it has the
constant width appearance you’re looking for … my guess is, this will
take less time.

there might be a way to do it with materials & maps, also.


#7

The trouble with using line render thickness, is that you’re doing it before the perspective transform. Trivially, if the line isn’t all in a plane parallel to the viewport, it will vary in rendered (pixel) thickness along its own length, whatever you do to it.

I think you have to use a shader/renderer which gets the knife in after the transform: i.e. paints on the 2D screen.


#8

Go to www.mrmaterials.com
Go to max materials.
Go to FX Materials.
Download the only material there. Hey, look the author is me! LOL
You can change the width of the line in the standard material to fit your needs.


#9

easiest way under mental ray:
go to your spline material; open the mental ray connection tab and assign a ‘simple contour’ as contour shader. this should keep the same thickness no matter where your camera is.

enable ‘contours’ in your render scene window/render tab.
voila.


#10

From what I recal, the wireframe option in the standard shader, has the option of the thickness being defined by scene units or pixels. One of those two should do the trick for you. And its very fast to render.

Cheers


#11

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.