I’m surprised there are over a 100 views and no contributed ideas from anyone other than Denis. We wont bite, I’m sure you guys have ideas, your artists!
come on now.
-Could you subdivide each polygon so that as the polygon flips it’s subdivisions are also flipping? Almost like a Tron res-in effect?
-What about like some kind of bend control per polygon to simulate a paper page or thin film effect? The poly would have to be divided though I guess.
That’s all I can think of at the moment
- OR! How about a “bounce” on impact control? Like when the poly flips closed you have an ease-in amount, you could also have a parameter for a secondary bounce amount like if you let a basement hatch slam shut it bounces up before it settles. Maybe randomize that amount for a chaotic domino-like feel.
Been there!
http://vimeo.com/channels/gencept/17407088
Unfortunately we had to remove the other videos which are the ones I worked on, we had one where there was a horse running and the triangles unfolded across the body (the last Horse in this sequence)
I had to make a script which unfolded the triangles and animated with the mesh, all this was driven by an animated bitmap based unfolding map to trigger the unfolding happening where we wanted it to. We did a really nice extended long version where you could really see this happening but the client kept speeding it up to the point where you could hardly see the triangles actually unfolding…
Very cool idea! I will check it out sometime this week maybe and see what it’s doing.
Great work Dave. That is a very interesting spot. I like the animation, its to bad that clients tend to ruin the final product by making the ‘artistic’ decisions of things. Great job though.
I should have a build here a little later today with a UI and whatnot for people to play around with and test.
The actual Horse animation looked a lot nicer, but sadly clients don’t allow us to show most of our work!
I’ve added a few things here. I didn’t get much time to mess with it today.
Added:
- Start Time
- Flip Duration
- Age (controls object visibility after flip is completed)
- Scaling (scales object from 0 – 100 as it flips)
- Bounce Shut Option
- Center Pivot Option
Things to add:
- Offset (time paused between each flipping object, if negative then the next objects begins to flip before the previous object’s flip is completed – still trying to figure how to get this implemented)
- Swinging Shut Option (completed code just not implemented yet)
Known Issues:
- Object Elements: If an objects element doesn’t have a polygon selected as a starter, the element then gets removed entirely from the animation.
- Optimization where ever possible
Anyone is welcome to dive in an add whatever or implement stuff. I appreciate you guys who have supplied ideas. Great stuff. It’s coming together.
centerThePivot = true
fn sharedEdge node f1 f2 =
(
ee = (polyop.getedgesusingface node f1)*(polyop.getedgesusingface node f2)
(ee as array)[1]
)
fn setPivotRotation obj point =
(
worldAlignPivot obj
local rot = inverse point.rotationpart
animate off in coordsys local obj.rotation *= rot
obj.objectoffsetrot *= rot
obj.objectoffsetpos *= rot
obj.objecttransform
if centerThePivot do obj.pivot = obj.center
)
fn getFlipTM node face edge flipnode: =
(
vv = polyop.getedgeverts node edge
normal = polyop.getfacenormal node face
center = (polyop.getvert node vv[1] + polyop.getvert node vv[2])/2
side = normalize (polyop.getvert node vv[2] - polyop.getvert node vv[1])
front = normalize (cross side normal)
tm = matrix3 front side normal center
if isvalidnode flipnode do
(
flipnode.pivot = center
setPivotRotation flipnode tm
)
tm
)
fn getFaceGrowing node = if iskindof node Editable_Poly do
(
fn getNeighbours node face exclude:#{} shareEdges:on =
(
ee = polyop.getedgesusingface node face
ff = (polyop.getfacesusingedge node ee) - exclude
if shareEdges do
(
for f in ff where (ee*(polyop.getedgesusingface node f)).isempty do ff[f] = off
)
ff
)
faces = #()
done = #{}
ff = node.selectedfaces as bitarray
done = copy ff
group_id = 0
while not ff.isempty do
(
old = copy done
group_id += 1
for f in ff do
(
neighbours = getNeighbours node f exclude:done
nn = #(f, neighbours, group_id)
--format "%
" nn
join done neighbours
append faces nn
)
ff = done - old
)
faces
)
fn getAngleBetween up1 up2 side =
(
ang = acos (dot up1 up2)
act = (dot (cross up1 side) (cross up2 side)) <= 0
if not act then 180-ang else 360-ang
)
delete objects
p = converttopoly (torus isselected:on)
--p = converttopoly (plane lengthsegs:5 widthsegs:5 isselected:on)
seed 0
max select all
p = $
p.selectedfaces = #{random 1 p.numfaces,random 1 p.numfaces,random 1 p.numfaces}
--p.selectedfaces = #{1}
flips = getFaceGrowing p
startTime = 10.0 -- working
flipDuration = 12.0 -- workingz
offset = 10.0
age = 6.0 --working
ageEnabled = false --working
scaleEnabled = false --working
bounceShut = false --working
s = 4.0
tt = [startTime,startTime+flipDuration]-- start time / end time for each flap
by_group = off
max create mode
slidertime = 0 --move slide to frame 0
nodes = #()
clearlistener()
for ff in flips do
(
delay = 0
for f in ff[2] do
(
t = if by_group then (tt + ff[3]*10) else (tt += ff[3]*10)
--t = (tt += .5 + ff[3])
e = sharedEdge p ff[1] f
polyop.detachFaces p f name:("f" + formattedprint f format:"03d") delete:off asNode:on
n = objects[objects.count]
ptm = getFlipTM p ff[1] e
tm = getFlipTM p f e flipnode:n
c = n.rotation.controller = Rotation_List()
a = c.available.controller = Euler_XYZ()
c.active = c.count
/*---- Rotation Animation ----*/
addnewkey a[2].controller t[1]
addnewkey a[2].controller t[2]
ang = getAngleBetween ptm[3] tm[3] tm[2]
act = dot (cross (polyop.getfacecenter p f - polyop.getfacecenter p ff[1]) tm[3]) tm[2] < 0
ang = if act then ang-360 else 360-ang
a[2].controller.keys[1].value = ang
/*---- Bounce Shut Animation ----*/
if bounceShut do (
(addnewkey a[2].controller (t[2]+6)).value = 0
bVal = if act then -1.0 else 1.0
a[2].keys[2].outTangent = bVal
a[2].keys[3].inTangent = bVal
)
/*---- Visibility Animation ----*/
n.visibility = Boolean_Float()
v = n.visibility.controller
(addnewkey v (t[1]-1)).value = 0
(addnewkey v t[1]).value = 1
if ageEnabled do (
(addnewkey v (t[2]+age)).value = 1 --last visible key
(addnewkey v (t[2]+age+1)).value = 0 --invisible key
)
/*---- Scale Animation ----*/
if scaleEnabled do (
scl = n.scale.controller = Bezier_Scale()
(addnewkey scl t[1]).value = [0,0,0]
(addnewkey scl t[2]).value = [1,1,1]
)
)
)
polyop.deletefaces p (p.faces as bitarray - p.selectedfaces as bitarray)
update p
Go on, Martini: it will be a very nice script! Congratulations.
off topic: Any news about KeyTransfer 2.0?! Did you give up to release it?
Sorry again for the off topic, Joker Martini, but just now i saw the teasers of theKey Transfer 2.0 (didnt yet understood why it will be called “ATK”):
https://vimeo.com/51005373
https://vimeo.com/51018897
Any chance to release this as a Christmas gift?!
Thanks for the great work!