2
$\begingroup$

I have an array of subdivided cubes, which follow a bezier-curve through a curve modifier. The individual meshes of the array are merged. The issue: Ordering the modifier stack like this (right):

  • Array
  • Subdiv
  • Curve

Provides the desired, smooth result.

Ordering the Stack like this (left):

  • Array
  • Curve
  • Subdiv

Does not correctly work. The subdiv-modifier seems to "skip" the sections, in which the individual array-elements were merged.

Now, the core issue is, that I do not want to apply the subdiv-modifier bevore the curve and array modifier, as I need to add to the mesh after applying these two. Subdividing beforehand would make a mess.

Screenshot: enter image description here

Demo file to reproduce the phenomenon: https://blend-exchange.com/b/kMJGPQGk

$\endgroup$
3
  • 1
    $\begingroup$ The problem is caused by internal faces which stop subdivision from smoothing the mesh. No smoothing is needed where the internal faces exist before the curve modifier, so using subdivision before curve yields a smooth result. $\endgroup$ Dec 13, 2021 at 17:09
  • $\begingroup$ @MarkusvonBroady After checking again, I can confirm, that that is indeed the cause of the problem. After deleting the faces in question, everything is as desired. Now, this begs the question, as to what is causing this. Applying the mofifier stack in the (right) order, I still found the internal faces to be present. The difference is, that they have been "catmarked" correctly, whereas the ones in the other stack were not. Why is that the case? $\endgroup$
    – NameKhan72
    Dec 13, 2021 at 17:24
  • 1
    $\begingroup$ The internal face works like a holding loop, stopping the subdivision from interpolating between them. See what happens when you put an internal face diagonally, it then also stops the interpolation where the face connects: i.imgur.com/sAcPfAp.png $\endgroup$ Dec 13, 2021 at 17:33

3 Answers 3

4
$\begingroup$

If you want smooth shading, set it now (otherwise remember to set it on the object and caps), duplicate it, remove modifiers from it and name it Start, duplicate it again and name it End. Go to the original object's Array modifier and set the caps accordingly. Edit the mesh and remove the faces where the instances connect. Edit the End mesh and remove everything except the face that connects. You will need to flip its normals AltN, F. Do the same for the Start - keep in mind that there it's the opposite face. If you got it wrong, just rename the objects and swap them in the Array modifier.

$\endgroup$
4
$\begingroup$

As you have noted in your comments, internal faces create an anomaly in the normals of the external surface, in both cases. It's less apparent where the Subdiv is before the Curve.

The Curve deforms the array of elements. In a polygonal modelling system, it can do this only by moving vertices to conform to the curve. If the displacement is made before the subdivision, only the ends of the box-elements are available to be deformed, and so the curve is approximated by element-length straight-line segments. The Subdiv. then subdivides those.

If the Subdiv comes first, there are more vertices available for Curve to deform. Now the curve is approximated by [element-subdivided] length straight-line segments, which are shorter, and approximate the curve more closely. In particular, the normals at the ends of adjacent elements are more alike, and so the joins look smoother.

Some options:

  • Get rid of the internal faces: you can cap the ends after applying the Array and Curve modifiers, or set caps on the array as suggested by MVB
  • Manually subdivide the box in its length before deforming, or just make the elements shorter.
  • Use a profile: (a rectangular curve,) as a Bevel Object for the sweep curve itself, (in its own Data tab, Geometry panel,) rather than arraying a mesh down it.

BTW, you may save yourself a lot of trouble by Ctrl A applying the scales of your curve and box, before going further. (You would also then have to reset the radius of the curve to 1.) While modelling, always scale the mesh in Edit Mode, rather than the object in Object Mode, (or apply the scale as soon as possible.)

$\endgroup$
1
  • $\begingroup$ This provides great inside into the workings of the modifiers! Thanks! $\endgroup$
    – NameKhan72
    Dec 13, 2021 at 18:20
2
$\begingroup$

Geometry Nodes

The size of the node tree is somewhat ridiculous, but it was my first try at geo nodes. Other than some clever optimizations like the concise dimension coming from the bounding box that I learned from Robin Betts, I might be missing some idiomatic solutions like using an instance index instead of doing multiplications and comparisons on face indices.

This recreates the array modifier and removes internal faces based on normals. The Normal > Separate XYZ > Greater/Less Than node chains could be replaced with a comparison with a material number for example. Weld modifier is required afterwards to get correct subdivision and shading.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .