MoI discussion forum
MoI discussion forum

Full Version: Cross Hatching experiment

Show messages:  1-15  16-35  36-55  56-62

From: pressure (PEER)
29 Jul 2022   [#56] In reply to [#55]
OSTexo,

Thank you for talking more about your process. I don't understand what you're using MarkCurveStart for. I would have thought that 2 abutting faces always share an edge and so the intersections of the shade lines and the edge could be used to transfer line spacing between faces. I guess I haven't run into the problem that MarkCurveStart solves, but I'm glad you brought it up so that I'll know about it when I need it.
From: pressure (PEER)
2 Aug 2022   [#57] In reply to [#47]
Michael,

I've been doing some manual experiments and have changed my mind about hatch spacing. You are right: for a surface having a uniform tone the hatch pitch should be uniform in image space. The thing that had me thinking otherwise was hatching with min curvature lines on a cylinder where uniform pitch in object space gives an illusion of curvature while uniform pitch in image space looks like a flat cutout:



But, I played around with some other shapes and am now pretty sure that all that's happening here is that uniform pitch in object space just happens to emulate the shading that results from a headlight in this one case. In other words, uniform pitch in object space is bad for other shapes.

Here's the most challenging sort of shape / viewpoint that I've tried to get uniform tone on:



It's bad because the shape is smooth and so I've found that breaking the hatch lines acts like a rough texture, because there are no natural locations at which to decimate the hatch lines in a discrete way, and aliasing + moire wreak havoc at the front and back.

Would you run this ring through your system and see how it comes out? Model and ViewManager file are attached. Please omit raster shading.

Sorry for being glib about accuracy. I've come to realize that integrating a direction field is a hard problem. I'm impressed by how well the examples have turned out if this integration is taking place in image space. I do believe that integrating in object space could have major advantages because the direction field would remain continuous at silhouettes, because face symmetries could be used as a hard cue for growing curvature lines, and for artistic flexibility. But, I don't have anything really useful to say on this at the moment so will keep working on the idea.

Regarding cones, I don't think there's a perfect solution for min curvature lines converging to the vertex. Here are the solutions that I know of, with max curvature lines being a clear winner:

Attachments:
ring_1049_.views.json
ring_1049_080222.3dm

Image Attachments:
cone_matrix.png  cylinder_hatch.png  ring.png 


From: Michael Gibson
4 Aug 2022   [#58] In reply to [#57]
Hi Peer,

re:
> But, I played around with some other shapes and am now pretty sure that all that's happening here
> is that uniform pitch in object space just happens to emulate the shading that results from a headlight
> in this one case.

Yes that makes sense. I guess that's a general problem that any locations with lines getting close together can get interpreted as a low illumination area from shading.

And then if you are actually doing shading aware spacing that might be even worse because then you'll have some areas with higher density from shading and some with higher density that is not from shading.

re:
> Would you run this ring through your system and see how it comes out?

Here are a couple of results, first with "tightly packed" lines where it tries to insert a new one as close as it can to existing ones, and the last 2 with sparser filling:









- Michael

Image Attachments:
peer_ring1.png  peer_ring2.png  peer_ring3.png  peer_ring4.png 


From: OSTexo
4 Aug 2022   [#59]
Hello,

I us the curve start and end marking so I can keep continuity of the shading curves across surfaces. If a pronounced separation between surfaces is desired then I wouldn't use the mark start/end.

In the image example I started at one end equally spacing points around the end using array curve, then iso at points, then for every subsequent surface I marked the generated curves with mark at start/end depending on the curve direction and repeated the iso at points command.

That left me with a whole set of lines which I then exported with a raster background to .ai using the default lighting in MoI. I then trimmed the excess transparent raster data from the background image so the bounding box of the vector curves matched the background image.

At that point there are multiple ways to post process the file to get the look and application you use, but they all usually involve adjusting the levels of the background image, converting the background to a limited color vector image and then using that background vector to perform automatic or manual operations to the set of vector shading curves.

I may be mistaken but the operations developed by Michael are getting you much further ahead in MoI itself. Getting contiguous shading curves out of MoI cleanly trimmed by using lighting in MoI just leaves having to specify curve width and/or vector brush stroke type. That leaves you with limitless aesthetic options when you have a clean set of vector curves. Being able to add/tune things like dash/dot and stroke style is something done easily enough outside of MoI in nearly every vector illustration program, this hatching feature can save a bunch of work in the middle of the process.

Image Attachments:
pipe.jpg 


From: pressure (PEER)
6 Aug 2022   [#60]
Michael,

Thank you for trying a couple of methods on the ring. I prefer the sparse version because it gives fewer radial fragments on the top of the ring. I'm surprised by how even the tone is on the top of the ring in ring2 and ring4 while also looking smooth. I'll try some more experiments to see if I could live with the deviations between the line trajectories and the UV direction field.

OSTexo,

Nice pipe! Thank you for explaining. I now understand how you're using start and end markings. That's a great trick that I'll definitely use.
From: pressure (PEER)
11 Sep 2022   [#61]
In anticipation of the release of cross hatching here's a script that allows the hatch direction to be changed on planar faces of solids.


Attachments:
UVchanger-plane.js

Image Attachments:
UVchanger-plane.gif 


From: Frenchy Pilou (PILOU)
11 Sep 2022   [#62]
UVchanger-plane
Works like a charm!


Show messages:  1-15  16-35  36-55  56-62