0
$\begingroup$

I want to make the effect of a cube overlaying another object in blender. In the images below, I want the cube to look like an overlay over the head object,enter image description here

enter image description here

I want the wireframe of the cube to be visible, but the planes to be transparent. This is what I am trying to communicate visually:enter image description here I wan to demonstrate how when artists draft, they use a cube as the basic structure to describe more complex forms (like what's demonstrated by DrawaBox/Kim Jung Gi).enter image description here I am not sure how to demonstrate this in blender,

$\endgroup$
1
  • $\begingroup$ Create a cube, parent it to the head, give it the Wireframe (or Skin) modifier? $\endgroup$ Commented Dec 21, 2024 at 10:25

3 Answers 3

3
$\begingroup$

(Using Blender 4.2.5)

Results

For flexibility, a GeometryNodes modifier can be attached to the object to frame. The size, the thickness and the material of the frame can be specified through the modifier input panel.

GN Graph

1. The frame is based on the Bounding Box of the object to which the modifier is attached.
2. The size of this bounding box can be modified using the Scale socket of a Transform Geometry node, and the user defined Inflate parameter recovered through the Group Input node.
3. The frame corners are made of Cube instanced on each vertex of the scaled bounding box. It is to notice that this Cube Size is set to 1. It is adjusted afterwards using the Scale socket of the Instance on Points node, and the user defined Thickness parameter recovered through the Group Input node.
4. The frame bars are made of Cube instanced at the mid point of each edge of the scaled bounding box. It is to notice that this Cube Size is set to 1 also. The mid point position is computed using a Mesh to Points node set in Edges domain. Bars orientation, thickness and length are set through the Rotation and Scale sockets of the Instance on Points node.
5. The orientation and length of an edge are computed as a vector by subtracting the position of its end points. These positions are recovered through an Edge Vertices node.
6. Arbitrarily, the length of a bar is aligned with its local Z axis while its cross section thickness is defined in its local XY plane. Consequently, its local Z axis is aligned with the vector computed at step 5, using an Align Rotation to Vector node. The resulting Rotation attribute must be captured in Edge domain.
7. Because of the corner cubes, a bar is shorter than the associated edge. This edge Length is evaluated using a vector math node from the vector computed at step 5, then the user defined Thickness parameter is subtracted.
8. The anisotropic scale of the unit Cube created at step 4 is assembled using a Combine XYZ node. The user defined Thickness parameter is input in X and Y directions to scale the cross section uniformly, while the value computed at step 7 is input in Z direction to scale the length. The resulting Scale attribute must be captured in Edge domain again.
9. The frame is assembled by joining corners (from step 3) and bars (from step 4).
10. The frame color can be specified independently from the object color using a Set Material node and the user defined Material parameter recovered through the Group Input node.
11. Eventually, the frame is put around the object using a Join Geometry node.
NB: To hide the frame, set the "Thickness" to 0, or deactivate the modifier.

Resources:

(Blender 4.2.5+)

$\endgroup$
3
  • $\begingroup$ I am reading your description of the geometry nodes and viewing the file you have attached, and I would like to know what modification to make in order to have only one Suzanne within the green wire frame - what would I toggle in order to accomplish that? (Also, sincerely, thank you so much for the thorough and comprehensive reply with annotations and ordering of the steps.) $\endgroup$ Commented Dec 21, 2024 at 22:21
  • $\begingroup$ The Blender file is updated to show a single Suzanne with its frame. The previous object is renamed "Many Suzannes". It is made from a UV Sphere, parent of the original Suzanne. Instancing is done through the Object Properties panel of this truncated UV Sphere. $\endgroup$ Commented Dec 22, 2024 at 8:58
  • $\begingroup$ Do not hesitate to ask if you are not familiar about how to add a GN modifier, or how to import it from from a Blender file to your current project. $\endgroup$ Commented Dec 22, 2024 at 9:01
1
$\begingroup$

enter image description here

As we can't use scale for a mesh which has uneven dimensions, the principle here is to prepare the cube overlay on a 1x1x1 cube and shift its vertices to the boundings of the mesh.

From left to right:

Create the bounding box.

Sample its vertices positions onto the cube vertices and keep the offsets as captured attribute.

Extrude (with no move) the cube, scale it to the wanted dimensions and extrude it inside.

Delete the last extruded faces.

Shift the vertices to the captured offsets.

Merge.

(made with Blender 4.3.2)

$\endgroup$
3
  • $\begingroup$ is it possible to add a grid texture to the faces of the bounding box? $\endgroup$ Commented Dec 21, 2024 at 23:02
  • $\begingroup$ @mike, what kind of grid? $\endgroup$ Commented Dec 22, 2024 at 6:35
  • $\begingroup$ @mike: I would recommend to ask about the rendering of the bounding box as an other, separated, question because your original post is explicitly mentioning "the wireframe of the cube"... $\endgroup$ Commented Dec 22, 2024 at 10:08
0
$\begingroup$

There are a variety of ways to accomplish this effect, the easiest I can think of is lowering the alpha in your shader. You could go with a more complex approach using a principaled volume shader, plugging volume into the volume output on material and playing around with the density, or If you just want the edges you can use a wire frame modifier

$\endgroup$
1
  • $\begingroup$ Hi, thanks for the post. This site is not a regular forum, answers should be substantial, stand on their own, and thoroughly explain the solution and required steps. One liners and short tips rarely make for a good answer. If you can, edit your post and provide some more details about the procedure and how it works, perhaps add a few images illustrating some steps and final result. See How to write a good answer?, otherwise it may be converted to a comment. $\endgroup$ Commented Dec 21, 2024 at 4:15

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.