1
$\begingroup$

I wish to subdivide (vertically and/or horizontally) aligned faces but with different dimensions (i.e. I can have 2 or more vertically aligned faces with the same width but each with a different height, or, conversely, 2 or more horizontally aligned faces with the same height and different widths) in order to get a regular face subdivision, with coincident vertices along the common edges of the different faces as well.
In particular I would need this between faces belonging to two different bodies because I want to apply a displacement material. The two bodies are the external (stone) walls of the two floor of a building.
I wish to keep them separated because I also want to mantain the possibility to switch on/off a floor per time.
If I subdivide the two bodies faces without coincident edges vertices, when displacement material is applied, a really bad separation seam between the two floors appears. So I would like to ask:

  • is it possible (natively or with an add-on) to subdivide faces not just by dividing them twice at every step but before specifying the dimension of the subdivision (i.e. the dimension of the side of the faces I will get after subdividing)?
  • is there, alternatively - and much better as it could be used also with non quad faces, an add-on or a way to use the knife tool so that it could make cuts automtically along a direction at specific distance one to another (a sort of sectioning tool such as that you can use in some CAD software - as a reference: the Contour command in Rhino)?

EDIT

As sensibly highlighted by @Nathan, my question could be more understandable with some images.

So, my starting situation is this, where you can see the stone walls of the two floors The stone walls of the two floors

And this is the applied texture

Stone texture

As you can see, when the displacement modifier is not applied, the texture is seamless and with no problem.
When I apply the displacement, I get this: Displaced mesh result

Where you can see what I called a bad seam between the two stone walls. Furthermore, the displacement effect is not very clear because of the subdivisione of the two mesh.
Currently, I have manually subdivide the mesh in order to get some rectangular faces Mesh subdivision I did that because my first guess was to apply a subdivision surface modifier (without some of those cuts, the two mesh were too much distorted by the modifier).
Anyway, this modifier doesn't preserve the coincidence of vertices along the shared edges of the two mesh and I get still worst seams between them when I apply displacement.
What I would be trying to get is a sort of regular subdivided mesh like this one: regular mesh

It is another work I did previously where I had to use the same stone displacement material as in the current one, but it was much smaller and I subdivide it manually (!!!) by the knife tool.
I could verify that such a mesh subdivision worked very well with displacement material, but, as you can imagine, it was time consuming placing manually all those cuts.
So, I was wondering if there is a way to get something similar when you start from a more complicated starting point as my current one.
I am quite new in using blender, so I suppose also that I could have choosen a wrong way to get my result. Anyway, I think that a tool that does something like this:

Rhino contour command

could help to solve issues like this but I don't know (and couldn't find) if it is already possible to do in Blender as well.

Thank you very much!

EDIT n.2

I have realized that the seam issue is due mainly to the fact that the 2 mesh are separated.
After duplicating and properly joining them, the seam is disappeared.
Now I wonder if it is possible to get what i wanted, i.e., 2 seamless separated objects to which a displacement material is applied to.

I can't still figure out a way to regularly subdivide the mesh (faces).

$\endgroup$
1
  • $\begingroup$ I'm having trouble understanding what you're starting with and what you're after. I think this is a situation where a few pictures would of those would help enormously. $\endgroup$
    – Nathan
    Jan 24, 2022 at 23:44

1 Answer 1

1
$\begingroup$

Ok, maybe this is not the most elegant solution, but eventually I figured out how to make it by scripting. The script itself is not very elegant, but i post it here anyway; maybe it could be useful for someone else with my same need

#importing blender python module
import bpy

#making the active selected object the context 
selObjs = bpy.context.active_object

#getting the coordinates of the object bounding box
selObjsBBox = selObjs.bound_box

#storing in variables the limit coordinates of the object bounding box
lowerX = selObjsBBox[0][0]
lowerY = selObjsBBox[0][1]
lowerZ = selObjsBBox[0][2]
higherX = selObjsBBox[6][0]
higherY = selObjsBBox[6][1]
higherZ = selObjsBBox[6][2]

#setting the interval at which the mesh will be cutted. Be aware not to choose a too low value!!!
cutStep = 0.5

#setting the incrementing variables for the cut loops
i = lowerX + cutStep
j = lowerY + cutStep
k = lowerZ + cutStep

#switching to edit mode
bpy.ops.object.editmode_toggle()

#loop no. 1 it slices the object along parallel planes (with a distance equal to that set in the cutStep variable) normal to the X axis
while i < higherX:
    bpy.ops.mesh.select_all(action='SELECT')
    bpy.ops.mesh.bisect(plane_co=(i, 0.0, 0.0), plane_no=(1.0, 0.0, 0.0), use_fill=False, clear_inner=False, clear_outer=False, threshold=0.0001, xstart=0, xend=0, ystart=0, yend=0, flip=False, cursor=5)    
    i = i + cutStep

#loop no. 2 it slices the object along parallel planes (with a distance equal to that set in the cutStep variable) normal to the Y axis

while j < higherY:
    bpy.ops.mesh.select_all(action='SELECT')
    bpy.ops.mesh.bisect(plane_co=(0.0, j, 0.0), plane_no=(0.0, 1.0, 0.0), use_fill=False, clear_inner=False, clear_outer=False, threshold=0.0001, xstart=0, xend=0, ystart=0, yend=0, flip=False, cursor=5)
    j = j + cutStep

#loop no. 3 it slices the object along parallel planes (with a distance equal to that set in the cutStep variable) normal to the Z axis    
while k < higherZ:
    bpy.ops.mesh.select_all(action='SELECT')
    bpy.ops.mesh.bisect(plane_co=(0.0, 0.0, k), plane_no=(0.0, 0.0, 1.0), use_fill=False, clear_inner=False, clear_outer=False, threshold=0.0001, xstart=0, xend=0, ystart=0, yend=0, flip=False, cursor=5)
    k = k + cutStep
$\endgroup$

You must log in to answer this question.

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