Home Technical Talk

Zbrush Array in a circle - Math Question

I am trying to array copies of a mesh in a circle. I can do that fine by finding the COS and SIN but I am running into an issue.

Now I am pretty terrible at math and it's been years since I touched trig... so it may be a problem with my math. I need someone smarter than me too look at this. As I increase the number of copies the size of the circle increases. I want the size of the circle to stay the same.

array_error.jpg

What I am doing is dividing the rotation (360) by the copies (12) to get the interior angle (30). Then I am finding the cos/sin and then multiplying by the radius (distance slider - 100). Then I move the mesh X then Y to that point. This is looped by the number of copies and to find the next point I am multiplying the interior angle by how many times it loops .

I here is the script if anyone wants to look at it. Array

Replies

  • Butthair
    Options
    Offline / Send Message
    Butthair polycounter lvl 11
    I'm not great with this stuff either, math was fine and all, but once sin and cos came it, it was game over.

    Lemme point out, though, that the sphere in question being duplicated is the same size, and you may need to take into account the size of the object to array and if the scale needs to be changed in order to preserve the same size relevant to the distance.

    Looking at the 24 copies, the size is twice as big, because there is twice as many, yet the same size. They might need to be reduced in scale by half as the amount has doubled. (It might not be half, it could be some strange fraction as your dealing with radians.)

    And speaking from someone who uses modelling tools frequently, I favor 3Ds Max as it has realtime feedback which you confirm when it's at a desired point.
  • cryrid
    Options
    Offline / Send Message
    cryrid interpolator
    If you didn't need a precise distance, radial sym + insert brush would let you pick the general size of the circle while controlling the scale of the meshes.
  • cw
    Options
    Offline / Send Message
    cw polycounter lvl 17
    if you have double the number, they will not really be visible, just bear that in mind! They will overlap perfectly!
  • nyx702
    Options
    Offline / Send Message
    I'm not great with this stuff either, math was fine and all, but once sin and cos came it, it was game over.

    Lemme point out, though, that the sphere in question being duplicated is the same size, and you may need to take into account the size of the object to array and if the scale needs to be changed in order to preserve the same size relevant to the distance.

    Looking at the 24 copies, the size is twice as big, because there is twice as many, yet the same size. They might need to be reduced in scale by half as the amount has doubled. (It might not be half, it could be some strange fraction as your dealing with radians.)

    And speaking from someone who uses modelling tools frequently, I favor 3Ds Max as it has realtime feedback which you confirm when it's at a desired point.
    Yea the Max Array is great. I am trying to make something similar in Zbrush. It wont be in real time or nearly as good but I would like to try.

    Hmm... I am not sure if scale is the issue or not? I am not getting the scale anywhere in the equation? I just want them spaced differently along the same sized circle.

    if you have double the number, they will not really be visible, just bear that in mind! They will overlap perfectly!

    I am not sure what you are saying. I did double the number and it made the circle larger. They didnt overlap at all. It would be great if they did! That would mean the circle wasn't getting larger.
  • cw
    Options
    Offline / Send Message
    cw polycounter lvl 17
    nyx702 wrote: »
    Yea the Max Array is great. I am trying to make something similar in Zbrush. It wont be in real time or nearly as good but I would like to try.

    Hmm... I am not sure if scale is the issue or not? I am not getting the scale anywhere in the equation? I just want them spaced differently along the same sized circle.




    I am not sure what you are saying. I did double the number and it made the circle larger. They didnt overlap at all. It would be great if they did! That would mean the circle wasn't getting larger.


    ok on closer examination - you just iterate based on the number of steps chosen somehow. If you want to be able to choose 8 iterations over 360 degress - reulting in a ball every 45 degrees (8 balls worth), you need to take 360 divided by the number of steps, and use that angle with your iterator as the offset to the new balls' position.

    Right now, if i pick distance 50, angle 45, number 8, i get 8x a small offset in angle - a little worm looking thingy. I have had some vino, so maybe I'm totally off target, but take a closer look! Also, I have no real idea about zscript, I'm a maxscript chap, but this sort of thing is pretty universal. Hopefully you can find a solution.

    good luck! :D
Sign In or Register to comment.