Jump to content

Rotate primitive layers


Dizfoo

Recommended Posts

Hi, 

I'm creating a procedural Igloo. The result is ok for what my intentions are (also because on igloos you don't need to see bricks, as inuits tends to press the snow on it), 
BUT 
during the process of creation I faced this challenge, that I can't solve by myself: I would like to understand how it is possible to rotate different levels of primitives based on their height, due to obtain the typical shapes of igloo, with rotated layers of bricks. 

I built the bricks starting from the primitives of a sphere, and basically I'd like to rotate each face loop of the original sphere. 

post-12416-0-74457400-1445363780_thumb.p

Here I attach my hip file, and of course, if you have critiques or suggestions about the whole process that I adopted to build the igloo, they're super welcome. 

Thank you in advance, 

R

Igloo.hipnc

Link to comment
Share on other sites

  • 2 weeks later...

What you could try is first to isolate each polygon with a facet node set to "cusp polygon" and a value of 0

Then in a for each loop that loopsa set number of times (the amount of layers) use a transform to select a layer of polygons each iteration and rotate them.

 

Assuming you use a normal sphere set to polygon mesh you can use something like this to select each layer

in the group field you can use a similar expression as this.

 

`ch("../sphere1/cols")*(detail("../foreach_begin1_metadata1", "iteration", 0))`-`ch("../sphere1/cols")*(detail("../foreach_begin1_metadata1", "iteration", 0)+1)`

what it comes down to for the first polygon is the number of polygons a row has X the forloop iteration number.

for the last of the selection the the same but the iteration value is increased by 1.

Don't forget to use the ` before and after an expression

 

Then just apply a rotation you want for each layer.

 

 

Igloo posible fix.hipnc

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...