Converting line width to screen length?

Wondering how to accomplish a certain animation task? Ask here.

Moderators: Víctor Paredes, Belgarath, slowtiger

Post Reply
User avatar
Peteroid
Posts: 162
Joined: Thu Aug 12, 2010 3:57 am
Location: las vegas, NV
Contact:

Converting line width to screen length?

Post by Peteroid »

I want to make a black rectangle that is EXACTLY of dimensions 2.0 x 2.0.

So, I set the rectangle endpoint coords to (-1,0), (1,0), (-1,-1), (1,1). And then I set the border width to zero.... wait what?... it resets it to .25!!! Apparently you HAVE to have a border of some thickness (why?)...

Now, does this ADD thickness to the rectangle, or is entirely contained in the perimeter I've set?

And obvious a value or .25 for line width is not 1/8 of the height of the screen (since the screen is of height 2.0 using default camera parameters), so how do you convert line width to screen width? In other words, 1.0 screen coord distance is how many border thicknesses?

If the border is entirely contained in the endpoints of the parameters of the rectangle, nothing needs to be done.

If the border is half in and half out, then to get a rectangle the EXACT size and position one has move each endpoint closer to the center by half the border thickness in both directions.

If the border if completely added, then the coords need to be moved by the border thickness in both direction.

Wouldn't it have been easier just to allow a no-border option or a border of zero width? (if this is possible please tell me how)...? :)


EDIT: OK, I'm an idiot. I just have to turn OFF borders.... (DUH!)...
[==Peter==]
User avatar
funksmaname
Posts: 3174
Joined: Tue May 29, 2007 11:31 am
Location: New Zealand

Post by funksmaname »

lol what are you going on about?! and why would you need such pinpoint precision on border size in relation to screen size?? sounds like you need a CAD program, not anime studio ;)
sbtamu
Posts: 1915
Joined: Tue Dec 15, 2009 5:05 am
Location: Texas
Contact:

Post by sbtamu »

There is, when you make the shape make sure stroke is turned off or you can just make the shape then just type in zero when you have the line width tool selected while the points are selected. Also the line width is not part of the shapes size, the points at the corners are the size. If you turn on the grid and make a rectangle you will see that 50% of the border is outside the shape and 50% is inside. So if you want to have a boarder and need it to be exact I suggest turning on the grid and doing some math.
Last edited by sbtamu on Thu Sep 16, 2010 4:42 am, edited 1 time in total.
Sorry for bad animation

http://www.youtube.com/user/sbtamu
sbtamu
Posts: 1915
Joined: Tue Dec 15, 2009 5:05 am
Location: Texas
Contact:

Post by sbtamu »

funksmaname wrote:lol what are you going on about?! and why would you need such pinpoint precision on border size in relation to screen size?? sounds like you need a CAD program, not anime studio ;)
LOL I use CADD so much I have nightmares about it, Blast being an engineer.
Sorry for bad animation

http://www.youtube.com/user/sbtamu
User avatar
Peteroid
Posts: 162
Joined: Thu Aug 12, 2010 3:57 am
Location: las vegas, NV
Contact:

Post by Peteroid »

funksmaname wrote:lol what are you going on about?! and why would you need such pinpoint precision on border size in relation to screen size?? sounds like you need a CAD program, not anime studio ;)
Because it need to be precise or it looks terrible....

I'm trying to think of how to respond to you with accusing you of being sloppy... :)
[==Peter==]
User avatar
funksmaname
Posts: 3174
Joined: Tue May 29, 2007 11:31 am
Location: New Zealand

Post by funksmaname »

:lol: haha! :lol:
I don't know how to respond without making you sound retentive... ;)
User avatar
Peteroid
Posts: 162
Joined: Thu Aug 12, 2010 3:57 am
Location: las vegas, NV
Contact:

Post by Peteroid »

funksmaname wrote::lol: haha! :lol:
I don't know how to respond without making you sound retentive... ;)
You really can't envision a situation where if you aren't precise it will look bad?

There is a line in an old Daniel Boone TV episode, that goes something like this. A Macintosh clan man is asked to move a fence one inch to the North. He asks why, would it really make that much of a difference? The head of the clan answered, 'if that inch were at the end of your nose, would you think it would make a difference then?"

The guy moved the fence one inch to the North... :)

In MY case, I'm trying to bend two rectangles at a perpendicular seamless joint in 3D space. It the rectangles location and/or joint rotation point is off by even the smallest amount, a HUGE very visible crack appears due to the seam SEPARATING. ANY lack of precision magnifies this.

BTW, I'M trying to do something of professional quality here... your mileage may vary...
[==Peter==]
sbtamu
Posts: 1915
Joined: Tue Dec 15, 2009 5:05 am
Location: Texas
Contact:

Post by sbtamu »

There is a pattern to the line widths, I do not really know how to explain it tho. If you turn on the grid and make some rectangles and play with line widths you will see a coalition between the grid and line widths. I think, like you asked, what is 0.25, it is 25% of one grid width you have set.
Sorry for bad animation

http://www.youtube.com/user/sbtamu
User avatar
funksmaname
Posts: 3174
Joined: Tue May 29, 2007 11:31 am
Location: New Zealand

Post by funksmaname »

in your example i suppose precision is important, i just couldn't think of an example... I'm sure there's an aligning script around, but also control+arrow keys nudge points i discovered the other day... dunno if that's useful to you but can help getting two points in the same place :)
User avatar
slowtiger
Posts: 6255
Joined: Thu Feb 16, 2006 6:53 pm
Location: Berlin, Germany
Contact:

Post by slowtiger »

If the gap is your biggest concern, why not go with a line which laps a bit outside the square, nicely covering any gaps?
User avatar
funksmaname
Posts: 3174
Joined: Tue May 29, 2007 11:31 am
Location: New Zealand

Post by funksmaname »

or use a single common central line to both shapes? can't get more precise than a single line ;)
Post Reply