|
 |
I was working on a 2025 Holiday scene, (which will probably be done in February
now...) and decided to add a gift wrapped in a patterned wrapping paper. After
several other attempts, I went back to my paper manipulation java libraries and
started working on getting folding to work correctly so I could create the
wrapping paper just as you would fold real paper.
I ended up rewriting a bunch of code that was just wrong from my earlier scenes
using the paper libraries, (which did not show up because I was curling paper,
not folding it at right angles). There are still a few glitches in how the
final fold of the two flaps on the front and back sides lay, but it's getting
close.
The attached image is a composite of the 13 steps (one is omitted since you
can't see the back corner anyway). I chose the default bozo pigment for the
exterior and gray for the interior_texture to better show that the uv-mapping is
working.
The box has a very slight rounding to it, rather than perfect 90-degree corners,
which is emulated in the folding code, as is the overlapping of paper and
doubling over of the valley folds at the corners. To get relatively smooth
edges on the folds, those sections of the paper are subdivided into very small
triangles, while the flat sections are fairly large. In total, there are 174K
vertices, and 322K faces.
Just thought it might be of interest. The code is still a bit messy and not
well commented, so I won't point you to the GitHub repo for it yet.
-- Chris R
Post a reply to this message
Attachments:
Download 'folding.png' (313 KB)
Preview of image 'folding.png'

|
 |