Results 1 to 9 of 9

Thread: Plane planerizer. Another kind of planerizer.

  1. #1
    Newbie Member Tom Winnicki's Avatar
    Join Date
    Feb 2003
    Location
    London, Ontario, Canada
    Posts
    34

    Plane planerizer. Another kind of planerizer.

    This script will attempt to planerize selected polygons (individually) based on their average normal which is calculated based on all 3 point polygon combinations. It works best on non connected polygons. You may use it on connected polygons but be aware that while fixing some polygons it will break others. The smooth tool would be a better solution in that case. Usage is simple, simply select the polygons you want planerized and run the script.

    The file is called "Plane_planerizer_100.ls" located here: http://www3.sympatico.ca/tom.winnick...pt/Planerizer/

  2. #2
    Newbie Member Tom Winnicki's Avatar
    Join Date
    Feb 2003
    Location
    London, Ontario, Canada
    Posts
    34
    Plane_planerizer??? What the hell was I thinking? It doesn't make mathematical sense. Planes are always planar but LW polys don't have to be. It's late (early morning), tired... sleepy... The script was renamed to "Poly_planerizer_100.ls"

  3. #3
    Originally posted by Tom Winnicki
    Plane_planerizer??? What the hell was I thinking? It doesn't make mathematical sense. Planes are always planar but LW polys don't have to be. It's late (early morning), tired... sleepy... The script was renamed to "Poly_planerizer_100.ls"
    "The hardness of God is kinder than the softness of men, and His compulsion is our liberation." - C.S. Lewis


  4. #4
    Defender of Mankind Emmanuel's Avatar
    Join Date
    Feb 2003
    Location
    Germany
    Posts
    1,079
    Thanks a lot, this is really cool !!
    Hey, btw, how difficult would it be to write a plugin that "relaxes" an UV-mesh, for example an unwrapped head-UV-mesh ?


    Greets,
    Emmanuel
    Bye,
    Emmanuel

    ----------------
    For Hire
    Portfolio
    Graveyard Dogs Indie game dev blog, visit and vote for the best RPG of all time !

  5. #5
    Many thanks again

  6. #6
    Newbie Member Tom Winnicki's Avatar
    Join Date
    Feb 2003
    Location
    London, Ontario, Canada
    Posts
    34

    Another small update to those planerizers.

    After some more hacking around I decided to change the filenames once again. This time they correspond to my internal names. Just less headaches later when I update again.

    Poly_planerizer_ave_01.ls will planerize the selected polys based on the average normal which is calculated from all the 3 point polygon combinations of the given poly. The points are projected along that normal. Here is an example 5 point non planar poly.


    After running the script the polygon is planerized. Note however that all of the points were adjusted to fit the 'average' polygon. That behavior may not always be desirable, especially if the rest of the points do in fact form a planar poly, and you want only the offending point adjusted.


    Poly_planerizer_max_01.ls will attempt to fix only the offending points. Basically when it compares the normals of all of the 3 point polygon combinations it keeps track of which normal is repeated the most. If there is one normal that is repeated more than any other then it will planerize all other points to the plane that is formed by those triangles whose normal is repeated the most. Confused yet? If another normal is repeated the same number of times then it will behave exactly like Poly_planerizer_ave_01.ls, because it isn't able to tell which is more important. It will also behave this way if all the combination normals are different.


    Here's a 'very' non-planar poly.

    Both scripts will yield the same result, i.e. planerize to the average polygon.


    These scripts come in extremely handy when you're modeling some mechanical parts that are not aligned with any of the major axes and must still remain flat. If you tweak a point in the perspective view then more than likely you made a polygon non planar. That can mess up the smoothing. So just select the polygon and run the appropriate script.

    I don't know how many times I asked/demanded that NewTek add two more Move/Drag tool modes, one that moves a point along the local plane (and another that moves along the normal of the local surface, but that's another story) I guess this is the next best thing to keep them polys flat.

    By the way, not being able to easily insert images in this new forum like in the old really bites. What gives?

    Emmanuel, I don't know, I'm guessing it will be easy. I haven't had the time yet to go deep into LScirpt's Vmap facilities and all that (wait, actually I did a little bit). Not enough hours in the day but I'll get to it some day. By the way, relaxing a UV mesh sounds familiar to me, maybe there are plugins for that already.

  7. #7
    Does anyone still have this?

  8. #8
    I should have a copy, PM me with an email address and I'll send you a copy.

  9. #9
    Why excellent! PM sent!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •