Home Technical Talk

pivot not moving with Bend

Sett
polycounter lvl 18
Offline / Send Message
Sett polycounter lvl 18
Max 5
I have a line of Omni lights in a row.

I apply a bend modifier to all of them.

The lights move to the new loc. but their respective pivot points stay in the original pos.

I need the pp to centre to the light.Yes I could move them individually but there are hundreds of them.

I've tried:
-making them unique
-centre to Object
-Align to Object
-collapsing the stack

Replies

  • FatAssasin
    Options
    Offline / Send Message
    FatAssasin polycounter lvl 18
    I couldn't make it work either. Seems that the bend modifier doesn't affect the transform matrix of the objects directly.

    So I wrote a quick script that will place an instanced light at every point in a spline. Don't know if that's really what you're looking for, but it might come in handy.

    Create a spline with two points, add a normalize spline modifier to add points, add the bend modifier to bend it, collapse the stack to an editable spline, make sure it's selected, and run the script:

    n = numknots $
    o = undefined
    for i = 1 to n do (
    p = getKnotPoint $ 1 i
    if i == 1 then (
    o = omnilight pos:p
    )
    else (
    io = instance o
    io.pos = p
    )
    )


    Hope that helps.
  • Eric Chadwick
    Options
    Offline / Send Message
    Why not just use the Spacing Tool? Same idea, spline-based instancing, right?
  • Cubik
    Options
    Offline / Send Message
    Cubik polycounter lvl 18
    Yeah, that's what I would try...
  • Eric Chadwick
    Options
    Offline / Send Message
    BTW, didn't mean to rain on your script. That kind of help is invaluable, and much appreciated.
  • Sett
    Options
    Offline / Send Message
    Sett polycounter lvl 18
    Thank you very much FatAssasin that did the trick. You've saved me hours of bs work.

    I also tried the Spacing Tool method but that resulted in the same pp problem as above.
  • FatAssasin
    Options
    Offline / Send Message
    FatAssasin polycounter lvl 18
    Glad I could help. That script, with a little tweaking, is the basis of many fake GI scripts where you create a hemisphere and place a light at every vertex. Fun stuff.

    About the Spacing Tool, I just never really got the hand of it. It's very possible I'm not using it right, but it always seems kind of cumbersome to use and I can never quit get what I'm after.
  • Eric Chadwick
    Options
    Offline / Send Message
    The Spacing Tool is really helpful, I use it a lot. Try this...

    1. Create a spline.
    2. Create an Omni.
    3. With the Omni selected, go to the menu Tools > Spacing Tool.
    4. Pick Path, select the spline.
    5. Spin the Count spinner.
    6. Uncheck Count, check Spacing, spin the Spacing spinner.
    7. Uncheck Spacing, check Count, check Start Offset, spin it.
    8. Turn on the checkbox Follow.

    What a cool little utility.
Sign In or Register to comment.