I'd like to replicate the figure below with two cylinders and some rease pencil objects line art. Is there a simple way to do this?
Here is what I have done so far (I'd rather disable the shadows inside the cylinders):
I have one way for you to do this. Although, whether it is simple or not is up for interpretation.
First, let's identify what you want to create. A schematic or scientific schematic is basically known as a Technical Drawing. Rather than being visually illustrative, Technical Drawings are meant to be "constructively informative." That means viewers who "read" these drawings can build, assemble, or model whatever these drawings illustrate. Your schematic has two elements that you want to illustrate, a solid line and a dashed line that is better known as the Hidden Line within this field.
Because Technical Drawings are always drawn orthogonally, our first step is to make sure our drawing renders orthogonally as well. So, set the camera in your scene to Orthographic
view from within the properties tab.
In your blend file, you added two separate grease pencil objects to create your line art. I only needed one grease pencil object with one material to hold your modifiers. For organizational purposes, I created two layers within this grease pencil object for you to handle the line art and the dashed line art.
Since your cylinders are generated through Geometry Nodes, I also consolidated your node trees into one single node tree for both of your meshes.
The Hidden Line is nothing more than an inferred line consisting of many smaller lines. To construct this dashed line with a grease pencil stroke, we need a lot of evenly spaced vertices built into this Hidden Line, so that our modifiers can generate these smaller lines. A quick fix was to increase your cylinder topology by segmenting them horizontally as many times as you segmented them vertically.
The first modifier we will add will be the Line Art
modifier for these smaller lines. Since these lines are hidden from view, we need to select these non-visible lines by going into the Occlusion
parameter of the Line Art
modifier. Since there are actually two sets of faces obscuring the camera view, we will change the Occlusion
Level Start
to 1
and End
to 2
. 1
is for the first set of occluded lines and 2
is for the second set of occluded lines. Make sure the grease pencil object is set to In Front
or the Occlusion
parameter will not be available.
The next modifier to add will be the Dot Dashed
modifier. This modifier will convert our Hidden Line into a proper dashed line. I made sure this modifier would only affect our Hidden Line by including the layer the dashed lines are contained in. The final modifier will be another Line Art
modifier for the solid lines. For this second Line Art
modifier, I selected Use Cache
so that all the line art would be baked together.
Finally, to get rid of your shadows and meshes, I created a simple Transparent shader material. I made sure to link this material to Object
so that I wouldn't have to add it into your node tree. To render in all modes, I "disabled" Blend Mode
and switched Alphas
for all Colors
to 0.000
Hit Render and your schematic should be generated.