MoI discussion forum
MoI discussion forum

Full Version: Cross Hatching experiment

Show messages:  1-5  6-25  26-45  46-62

From: Frenchy Pilou (PILOU)
16 Jul 2022   [#26] In reply to [#25]
Ok! :)
these hatching must also following the lighting of the object or must be isotropic ?
(from your examples seems isotropic)
From: Michael Gibson
16 Jul 2022   [#27] In reply to [#26]
Hi Pilou,

re:
> these hatching must also following the lighting of the object or must be isotropic ?
> (from your examples seems isotropic)

It's possible to do either.

The ones here adapt to lighting and have denser lines (smaller spacing) where the lighting is dark:
http://moi3d.com/forum/index.php?webtag=MOI&msg=10774.2

This one does not respond to lighting:
http://moi3d.com/forum/index.php?webtag=MOI&msg=10774.19

That will be an option that you will be able to set.

- Michael
From: Frenchy Pilou (PILOU)
16 Jul 2022   [#28] In reply to [#27]
ok...

Else in theory Flow function can't be used ?


From: Michael Gibson
16 Jul 2022   [#29] In reply to [#28]
Hi Pilou,

re:
> Else in theory Flow function can't be used ?

Not if you want it to look like real hatching - the pattern flowed on a sphere will be compressed at the pole areas and wider at the equator.

- Michael
From: Frenchy Pilou (PILOU)
16 Jul 2022   [#30] In reply to [#29]
Yes but you can make some Flow after a rotation of the sphere!
Sure the hatching will be not ultra regular but...



From: Michael Gibson
16 Jul 2022   [#31] In reply to [#30]
Hi Pilou, that's too dense with too many lines crossing each other. It should only have 2 lines crossing each other at any single point like this:



- Michael

Image Attachments:
pilou_sphere_hatching.png 


From: BurrMan
16 Jul 2022   [#32] In reply to [#15]
Hi Michael,
Congrats!!
Maybe look at a "max length" type of value that can get rid of the "tidbits"... the little "outlying flyers"....


From: Michael Gibson
16 Jul 2022   [#33] In reply to [#32]
Thanks Burr! Yup I was also thinking of a minimum cutoff size parameter to cull stubby pieces.

- Michael
From: BurrMan
16 Jul 2022   [#34] In reply to [#33]
Righteous!

I feel your excitement! Like it's a long lost pal...

I wish you more of those to come this year!
From: Michael Gibson
16 Jul 2022   [#35] In reply to [#34]
Thanks Burr, yup it's true I'm pretty excited!!

- Michael
From: Michael Gibson
16 Jul 2022   [#36]
Failed test



- Michael

Image Attachments:
hatching_failed_test.png 


From: Michael Gibson
20 Jul 2022   [#37]
Getting more under control. Here with shading aware spacing and breaks at specular highlights.







- Michael

Image Attachments:
more_hatching1.png  more_hatching2.png  more_hatching3.png 


From: mkdm
20 Jul 2022   [#38] In reply to [#37]
Hi Michael!

...very interesting!
Keep it rolling :)
From: Frenchy Pilou (PILOU)
21 Jul 2022   [#39]
Have you a ready made Hatching repository ?
From: Michael Gibson
21 Jul 2022   [#40] In reply to [#39]
Hi Pilou,

re:
> Have you a ready made Hatching repository ?

There will be some parameters you can adjust. Not a whole lot, probably for spacing, whether spacing varies with shading, hatching direction both, min curvature, or max curvature and whether to screen out small curves.

- Michael
From: Frenchy Pilou (PILOU)
21 Jul 2022   [#41] In reply to [#40]
Cool!
Can we apply this on several faces of volumes and not only on the full volumes ?
From: Michael Gibson
21 Jul 2022   [#42] In reply to [#41]
Hi Pilou,

re:
> Can we apply this on several faces of volumes and not only on the full volumes ?

No, probably not.

- Michael
From: Frenchy Pilou (PILOU)
21 Jul 2022   [#43] In reply to [#42]
Not a big deal, just select the face(s) unwanted and make any erase/replace you want! :)
From: pressure (PEER)
22 Jul 2022   [#44] In reply to [#13]
Michael,

I was excited about this all week and am happy to see you made some progress. See attached PDF for my comments.
From: Michael Gibson
22 Jul 2022   [#45] In reply to [#44]
Hi Peer, I've always admired these types of illustrations but have not ever really deeply researched them so your docs are very informative and helpful for me, thanks.

Unfortunately I can't really spend a huge amount of time developing every detail of this area. Probably the cutoff point at least for now will be on things that require supplementary object selections or guiding strokes. With those sorts of things it will probably require some kind of interactive preview along with it and although that would definitely be cool it overall adds up to a pretty large package of work.

re:
> In case I wasn’t clear before: I don’t want to either render min curvature lines OR max
> curvature lines; I want both to be rendered but in separate groups or line styles so that I can
> choose which ones I want on a patch-by-patch basis.

Yeah I didn't realize that. When generating both directions I can put them inside groups for AI and SVG format exports. PDF format does not have a grouping operator in it for graphics content streams so it may not be viable to do it for PDF format.


Question - is there a specific rule for these types of breaks like should they always occur nearby a line that has been terminated because it is entering a brightly lit area?



re:
> I want still more accurate curvature lines. I know you can do this since your N-gon mesher
> makes quads with vertices that lie exactly along curvature lines

Well not quite exactly - the N-gon mesher makes quads in the UV parameter space of the NURBS surface. For conic sections they are the same but for more general surfaces it won't be.


> Any visible squiggle will spoil the effect, as will errors in line orientation, such as min curvature
> lines on a cone that are erroneously parallel in image space when they should in fact converge
> to the point:

Yeah I noticed that on the cone. So what happens there is that there is a conflict between tracing an accurate curvature line and simultaneously keeping regular spacing in image/page space. Basically the min curvature cone line wants to travel towards the point but previous lines have already taken claim to that area and so the new one can't quite follow the accurate line of curvature that it would like to.

One thing that I've tinkered with to mitigate that somewhat is to generate lines more sparsely instead of being tightly packed one after another, that gives a result like this instead (at the expense of having more shorter pieces):






I think I could get more accuracy on the curvature lines if they were allowed to approach closer to each other instead of maintaining even spacing...

Do you have some examples on what cones should look like?


re:
> I would like an option to choose whether lines are spaced evenly in image space or whether
> they're spaced evenly in object space.

The mechanism is currently pretty heavily based on image space but I'll try some experiments for this.


re:
> For example, where 3 fillets meet at a
> spherical corner I’d probably want the drawn curvature lines to be continuous with lines of min
> curvature on the fillets:

Hmmm, I'm pretty doubtful that I could get it to do that.


re:
> If there’s an option to use lines of curvature to show both shape and shading then I would like to
> be able to select whether shading is accomplished by line spacing or whether it’s accomplished
> with variable line weight. <...>

This might be feasible... I didn't realize that these were done using just one heavier line weight I kind of thought they were gradually increasing and decreasing like one long paint brush stroke.

Would you expect for the lightweight line to run the full length underneath the heavier segment or should it be trimmed out where the heavier one starts and ends?

Thanks, - Michael

Image Attachments:
hatching_additional_breaks.png  sparser_filling1.png  sparser_filling2.png 


Show messages:  1-5  6-25  26-45  46-62