View Full Version : Normals direction, information

01-03-2004, 05:29 PM
I would like to know if it's possible to select to polygons and make both of their normals face the same direction. I want both of the normals to be absolutely parallel. I tried the Align tool but that tool informed me that my polygons are already in the same direction, I want them parallel.

Is there a builtin tool or an LScript that can handle this task?

These two polygons are not at the same angle, I would like to make them face the same angle, parallel.

01-03-2004, 07:43 PM
Let me get this straight...you dont want to move the poly but you want to re-align the normal to make it abnormal... is this right???

Im not sure if this is accurate but from what ive seen....normals are calculated from the points that make up the polygon, the only way to adjust the direction (other than invert it) is to adjust the points.

01-03-2004, 07:59 PM
I use the stretch tool w/ -100%. ;)

01-03-2004, 08:04 PM
The align tool doesn't align polys, it is for when you have some polys that have their normals flipped, it tries to fix that problem. Look at the online help for an explanation of it's usage.

01-03-2004, 09:15 PM
The align tool will not help, neither will the stretch tool. The image I posted is just an example. I'm dealing with more polygons.

The two normals that you see are not parallel, so they do not have the same angle. I simply want both normals to be parallel. If one of the normals are redirected then the rotation of the polygon will be affected but not necessarily the position. It can be done by hand and it will not make the polygon abnormal.

These normals are basically vectors, right? I want both vectors to have the same direction. I think that this is probably something more suited for an LScript. I was wondering if anyone knew how to do this, or if there's a function or a combination of function that can do the trick.

01-03-2004, 11:46 PM
My understanding of normals is that they are based off of point position,hence that makes up the poly normal. That is the reason the two normals are not facing the same way in the example you show. the points that make the poly do not have the same orientation so the poly is simply not facing the same way.

You only want the normal rotated and not the poly or points right?
if so. dont think that is possible without moving points or rotating the poly.

01-03-2004, 11:50 PM
oops...yeah like winwalker said. :)

01-04-2004, 02:03 AM
PXLPSH, you're right, if the normal direction is changed then the polygon rotation will definitely change. I already got that.
For instance, if a normal is facing 90 degrees on the X axis and you flip the polygon, the normal will now be facing -90 degrees, rotating the polygon 180 degrees.

Hopefully this image will provide clarity. These two polygons are not facing the same direction because their normals are not parallel. I would like to make the polygon B face the exact direction as polygon A. The more I look at it, it's a simple problem involving rotating the polygon.

Does anyone understand what I am demonstrating and hopefully how to ahieve it?
Any solution will be appreciated LScript, whatever. Note, I know I can do it by hand but I will be dealing with several polygons that I want facing the same direction, meaning their normals must be parallel

BTW thanks Wingwalker. If you change the position of a polygon it's direction (the direction of the normal) remains the same. If you rotate the polygon, the overall direction changes. I want to first, get the direction of one polygon, then make a couple of other polygons face the same direction.

01-04-2004, 07:25 AM
I'm not a scripter - or a mathmatician, but given that you can use cross / dot product or whatever to get the vector of the normal, can't you operate on a 2d normal vector at a time?

Something like this:
Get the 2d data for each normal, so you have info for one plane only.
Rotate first poly by a discreet amount.
Compare vector with target until the 2 match on that plane

Repeat for the 2d data on the other plane.

I'f I'm wrong about the ability of lscript to let you do this - feel free to ignore me, I'm math deficient & probably wouldn't understand an explanation of why this won't work ;)

01-04-2004, 10:08 AM
mkiii -- math deficient and all, you are on to something and I know where and how to look at this problem. I'm not good with vector analysis but I know where to look. If, when I figure it out I'll post my findings here and maybe an LScript, as soon as I figure out how to to extract and manipulate normals information and script polygon transformation.


01-04-2004, 10:56 AM
Since you want the poly to maintain it's shape and only rotate about it's center point, the distance from it's center point to a given vertex will remain constant. You can calculate the angular difference between the reference poly's normal vector and the poly you want to align's normal vector. Knowing the difference in angle and the fixed distance from the center point to the vertex you should have enough to solve for the points new position.

Does that make any sense?

01-04-2004, 01:08 PM
Yeah that makes sense Bloontz. Thanks.
I'm reading through some basic LScript information right now. I found some basic vector and trignometric functions that will help me.

01-04-2004, 01:25 PM
I see said the blind man to the deaf person.
Targeting normals to an axis, or aligning normals? Hmmm.
LW gives the def. of a normal being the average of its surrounding vertices.

01-04-2004, 02:08 PM
If your purpouse is simply to rotate the polygon to align normals, there is a free plugin that does it.
It's "Move & Align", you can find it at this adress


The settings for you should be:
Move: No
Align: Yes
Scope: Polygon


01-04-2004, 03:02 PM
Originally posted by JDaniel
I see said the blind man to the deaf person.
Targeting normals to an axis, or aligning normals? Hmmm.
LW gives the def. of a normal being the average of its surrounding vertices.

Perhaps you are refering to something else but the definition I read is as follows-

A polygon normal is the imaginary line projecting out perpendicular to a surface at any point indicating the direction of the polygon. A polygon surface normal is represented as dashed lines on selected polygons in Modeler. LightWave sees polygons or faces of an object only from the surface normal side. A single-sided polygon (like a piece of paper) with its normal facing away from the camera will be invisible to the camera from that viewpoint (unless the surface is using the Double Sided option).

A vertex normalís direction is the average of the polygon normals it is connected to.

01-04-2004, 03:30 PM
Im watching this thread because i realy would like to see if you can do what you are proposing.

But one of the things that interests me the most is why you would want to change the direction? I cant think of any situation where i have thought "I wish that normal was facing in a different direction".

01-04-2004, 03:41 PM
I don't think he wants to change the direction of the normal per se, I think he wants to pivot the poly(s) around their center points to align the polys in the same direction. Looks like SmEsh
pointed out a plugin that will do that. The normal will always by definition be perpendicular to the poly (assuming it's planar that is).

01-04-2004, 05:27 PM
Assuming that you need a number of similar polys as per your example, why can't you simply duplicate the original poly and place it as required?

Alternatively, if you wish to make a number of polys face in parallel direction you surely need to move the points of said polys. In your example, for instance, the poly which is skewed needs the points for the poly to occupy the same distance from, say the 'z' direction, (-/+) depending on the direction the poly is pointing. This distance can be decided by choosing a point and using the Information tool to read the appropriate position, (x,y,z). Then having decided on the appropriate measurement, select the other three points accordingly, and set them using 'ctrl+v'.

01-04-2004, 08:46 PM
What is the practical use of this?

01-04-2004, 08:55 PM
SmEsh --- you're post has been sent from the 3D heavens. Thanks. I'm reading through the instructions and I see exactly what I'm looking for:
2) Do you wish to align the polygon's normal?
I just tried it out and it works! I had to set the bias to +.
Bloontz, that definition for normal not only applies to LW but it basically applies to several other 3D applications.

WingWalker, the reason why I want to change the direction of a normal to match another is simply because I want to make sure that some polygons are facing the exact same direction. There are many uses in 3D (programming) where the direction of a vector(normal) is involved. Here's a crude example (so excuse me) . . . let's say you've created a car object and you wanted to animated it along a path. If you were going to describe the direction of a car you would be referring to the front of a car. Eventually you will want the car to change direction, like go right (90 degrees along n-axis), left (-90 d along n-axis) and so on.

Stewpot, I don't want to have to duplicate the original poly because the other polys might be completely different in size, number of points and they're not all attached. I don't want to work with or manipulate the points in this particular case because it's not practical. The Move&Align solution is more scalable and the only work it involves is me selecting polygons. Rotating a polygon will automatically re-position its points.

Just to add on to what Bloontz was saying when you're dealing with polygons, you're dealing with normals. In Maya, the faces == LW's polygons, and the normals are more or less implemented the same way.
I think some people thought I was referring to vertex normals, I guess I should have clarified polygon normals.

---- Ranting -----
I just finished watching the free video tutorials--the one on LScripting (on a newtek.com) OK, I'm definitely NOT crazy about LW implementation of a pivot point. It's the the positional focal point of the layerís geometry when animated in Layout. I thought both "cubes" in my .jpgs would each have their own pivot points. I wish there was some more intuitive way to get an object's transformation info (in Modeler) like Maya and other 3D apps. I'm referring to an object's position in relation to the world and local axis. If anyone can shed some light in that area, cool.

In the meantime, I just want to say thanks to everyone for their replies. All the replies helped me get a better understanding of LW. The more I delve LScript the more I'll thoroughly understand LW.

01-04-2004, 09:11 PM
What's the practical use? I can't answer that with a straightforward reply but I will tell you this.
I'm using for an intricate model right now where I have to readjust many polygons of a model.

Knowledge of points, and polygons and their applications govern more or less what you can and can't do with CG, especially cg programming. You're just not going to get around points & polygons in LW. I approach some modelling and animation via the normal. Most newbies aren't aware that the direction of the normal dictates whether or not you actually see the polygon. You can make it double-sided, if necessary or 'flip' the polygon but in essence what you're doing is changing the direction of the polygon normal when you 'flip' the poly. The 'align' aligns polys as close as possible.

In it's simplest terms you're dealing with vectors or normals, the imaginary (but significant) line protruding from polygons.

------------------------- Most animation (point transformations) end up dealing with vector operations. If you use or work with Macromedia Flash, or are interesting in 3D programming, vectors, whatever . . . check out Robert Penner's Programming Macromedia Flash MX.

As far as practical use, I don't know but you can find beautiful solutions to some complex problems with this underlying knowledge.

01-04-2004, 10:50 PM
Ahh... bummer.