 |
 |
|
 |
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"jr" <cre### [at] gmail com> wrote:
> hi,
>
> "Chris R" <car### [at] comcast net> wrote:
> > For a new project, I wanted to model pieces of paper with curled edges, ...
>
> v nice.
>
>
> > I'd also
> > like to work on some transformations that could "wrinkle" the paper in
> > interesting ways as well.
>
> or "fold", am thinking origami. (I'd be interested in the corresponding code
> :-))
>
>
> regards, jr.
I added a primitive "folding" capability to the code. Right now it really only
works for one fold at a time in a given region. I need to play around with it
so you can fold already folded regions.
As you can see, the smaller the bending radius, the more points you need in the
mesh2 grid to avoid jagged edges along the fold. I need to explore a more
efficient representation of the mesh and some code for sub-dividing the faces in
just those regions to avoid having a million faces in a single sheet of paper.
-- Chris R.
Post a reply to this message
Attachments:
Download 'meshtest.png' (445 KB)
Preview of image 'meshtest.png'

|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"Chris R" <car### [at] comcast net> wrote:
> > > I'd also
> > > like to work on some transformations that could "wrinkle" the paper in
> > > interesting ways as well.
Certainly you could experiment with applying some of the native pattern
perturbations like crackle or ... wrinkles.
> I added a primitive "folding" capability to the code. Right now it really only
> works for one fold at a time in a given region. I need to play around with it
> so you can fold already folded regions.
>
> As you can see, the smaller the bending radius, the more points you need in the
> mesh2 grid to avoid jagged edges along the fold. I need to explore a more
> efficient representation of the mesh and some code for sub-dividing the faces in
> just those regions to avoid having a million faces in a single sheet of paper.
I see where you're going with this, and it is indeed challenging.
Perhaps you could define your sheet in terms of bezier patches.
Then you could determine what patches are crossed by folds, and subdivide those
patches to give more localized control if you have multiple folds.
I think some of this may be headed straight for NURBS territory.
I also recall seeing a lot of interesting computer graphics origami work that I
just didn't have the time or energy to dive into. That might be the way to go
since the heavy lifting has already been done.
https://langorigami.com/article/computational-origami/
https://graphics.stanford.edu/~niloy/research/folding/paper_docs/folding_sig_08.pdf
https://news.mit.edu/2017/algorithm-origami-patterns-any-3-D-structure-0622
https://origami.c.u-tokyo.ac.jp/~tachi/software/
http://masc.cs.gmu.edu/wiki/Origami
https://dam-prod.media.mit.edu/x/files/thesis/2013/ysterman-ms.pdf
.... and it goes on and on
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"Chris R" <car### [at] comcast net> wrote:
> "jr" <cre### [at] gmail com> wrote:
> > hi,
> >
> > "Chris R" <car### [at] comcast net> wrote:
> > > For a new project, I wanted to model pieces of paper with curled edges, ...
> >
> > v nice.
> >
> >
> > > I'd also
> > > like to work on some transformations that could "wrinkle" the paper in
> > > interesting ways as well.
> >
> > or "fold", am thinking origami. (I'd be interested in the corresponding code
> > :-))
> >
> >
> > regards, jr.
>
> I added a primitive "folding" capability to the code. Right now it really only
> works for one fold at a time in a given region. I need to play around with it
> so you can fold already folded regions.
>
> As you can see, the smaller the bending radius, the more points you need in the
> mesh2 grid to avoid jagged edges along the fold. I need to explore a more
> efficient representation of the mesh and some code for sub-dividing the faces in
> just those regions to avoid having a million faces in a single sheet of paper.
>
> -- Chris R.
One last update and I'll stop for the holiday weekend. I created a Perlin noise
generator and applied it to the paper's grid of vertices before applying the
curling functions.
-- Chris R.
Post a reply to this message
Attachments:
Download 'meshtest.png' (555 KB)
Preview of image 'meshtest.png'

|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"Bald Eagle" <cre### [at] netscape net> wrote:
> "Chris R" <car### [at] comcast net> wrote:
>
> > > > I'd also
> > > > like to work on some transformations that could "wrinkle" the paper in
> > > > interesting ways as well.
>
> Certainly you could experiment with applying some of the native pattern
> perturbations like crackle or ... wrinkles.
>
> > I added a primitive "folding" capability to the code. Right now it really only
> > works for one fold at a time in a given region. I need to play around with it
> > so you can fold already folded regions.
> >
> > As you can see, the smaller the bending radius, the more points you need in the
> > mesh2 grid to avoid jagged edges along the fold. I need to explore a more
> > efficient representation of the mesh and some code for sub-dividing the faces in
> > just those regions to avoid having a million faces in a single sheet of paper.
>
> I see where you're going with this, and it is indeed challenging.
>
> Perhaps you could define your sheet in terms of bezier patches.
> Then you could determine what patches are crossed by folds, and subdivide those
> patches to give more localized control if you have multiple folds.
>
> I think some of this may be headed straight for NURBS territory.
>
> I also recall seeing a lot of interesting computer graphics origami work that I
> just didn't have the time or energy to dive into. That might be the way to go
> since the heavy lifting has already been done.
>
> https://langorigami.com/article/computational-origami/
>
> https://graphics.stanford.edu/~niloy/research/folding/paper_docs/folding_sig_08.pdf
>
> https://news.mit.edu/2017/algorithm-origami-patterns-any-3-D-structure-0622
> https://origami.c.u-tokyo.ac.jp/~tachi/software/
>
> http://masc.cs.gmu.edu/wiki/Origami
>
> https://dam-prod.media.mit.edu/x/files/thesis/2013/ysterman-ms.pdf
>
> .... and it goes on and on
With some minor tweaks I got some rudimentary folding of folds to work, but you
still have to deal with the resolution of the faces.
Thanks for the links to the computational origami papers. That looks exactly
like the kind of rabbit hole I could find myself diving into for weeks on end.
:-)
For now, with the addition of the noise generation functions I probably have
enough to work on the scene. If I can get the code cleaned up enough afterwards
I'll post it for any Java-heads who would be interested.
-- Chris R.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Paolo Gibellini <p.g### [at] gmail com> wrote:
> Il 29/06/2022 22:50, Chris R ha scritto:
>
> >> The code isn't completely done yet. The example cheats in that the
> paper never
> >> curls around into a spiral. I need to figure out how to do that
> effectively,
> >> and then I could have some nice partially open scrolls for my scene.
> I'd also
> >> like to work on some transformations that could "wrinkle" the paper in
> >> interesting ways as well.
> >>
> >> -- Chris R.
> >
> > I figured out the code to spiral for longer curls...
> >
> > -- Chris R.
>
> Both the images are interesting, with a few work you can also generate
> parchment scrolls.
>
> Paolo
A very simple version of parchment. I also added the ability to create bends in
the paper that are only partial, (i.e. not completely folded over). With the
noise function added in, and a texture overlay that adds the aging, it looks
pretty good.
Still need to work on subdividing faces in the smaller creases...
-- Chris R.
Post a reply to this message
Attachments:
Download 'meshtest.png' (408 KB)
Preview of image 'meshtest.png'

|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
This is fascinating! As far as I can tell, the curls/folds retain the same
radius along the length of the curl - how about varying the radius?
Thanks for sharing the details of your project and explaining what you're doing.
This is good stuff!
Kind regards,
Dave Blandston
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
hi,
that first fold/crease looked v respectable :-). fascinating.
"Chris R" <car### [at] comcast net> wrote:
> ...
> With the
> noise function added in, and a texture overlay that adds the aging, it looks
> pretty good.
agree with the pretty good, minor nit, end of the first stave, where curled, the
lines don't quite look right (see attached).
regards, jr.
Post a reply to this message
Attachments:
Download 'chrisr.png' (62 KB)
Preview of image 'chrisr.png'

|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"jr" <cre### [at] gmail com> wrote:
> hi,
>
> that first fold/crease looked v respectable :-). fascinating.
>
> "Chris R" <car### [at] comcast net> wrote:
> > ...
> > With the
> > noise function added in, and a texture overlay that adds the aging, it looks
> > pretty good.
>
> agree with the pretty good, minor nit, end of the first stave, where curled, the
> lines don't quite look right (see attached).
>
>
> regards, jr.
Yes, I noticed that, too. After adding in the ability to subdivide the faces,
this went away. It was an issue of a face getting stretched during the fold.
With the subdivisions the stretching is minimized.
-- Chris R.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"Dave Blandston" <IsN### [at] protonmail ch> wrote:
> This is fascinating! As far as I can tell, the curls/folds retain the same
> radius along the length of the curl - how about varying the radius?
>
> Thanks for sharing the details of your project and explaining what you're doing.
> This is good stuff!
>
> Kind regards,
> Dave Blandston
Thanks. I added some new code today to perform other types of morphs on the
paper and then was thinking the same thing about being able to vary the radius
for several of them. I'll probably add that in as well.
I also want to play with some code to bend the paper along a spline so I can
show an unrolled scroll laying across a table and falling over the edge of a
table.
-- Chris R.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
> A very simple version of parchment. I also added the ability to
create bends in
> the paper that are only partial, (i.e. not completely folded over).
With the
> noise function added in, and a texture overlay that adds the aging,
it looks
> pretty good.
>
> Still need to work on subdividing faces in the smaller creases...
>
>
> -- Chris R.
Really nice!
Paolo
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |