Lofting: can I copy a Shape-Keyed mesh for each frame of its animation?



.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty margin-bottom:0;







up vote
4
down vote

favorite
1












  • I have made a simple profile mesh (an edge loop) which I've animated along a path
    using 'Follow Path'.

  • It has a number of Shape Keys, and as it moves along the path,
    it changes shape.

  • I would like to capture a copy of the full state of the mesh, in place, at each
    frame of its animation.

This would be, if you like, a sort of 'physical onion skinning'. Dupliframes capture the transformations of the mesh at each frame, including tilts and scales derived from the path, varying those along the path, so come very close. But they don't capture the Shape Keys. If I alter the shape, it changes in all the duplicates,irrespective of keyed frames.



I'm attempting this in the hope of modeling with the resulting copies: creating a mechanism for lofting between varying profiles along a curve with a reasonable degree of accuracy, and ease of workflow.. so if there's an alternative route to that, please comment.










share|improve this question























  • Think I have something similar re this question A follow path constraint gives an easy way to put shape at either end, and fill in the "ribs". Be simple enough to convert from offsets to frames .Could you provide a small sample file?
    – batFINGER
    Nov 8 at 11:03
















up vote
4
down vote

favorite
1












  • I have made a simple profile mesh (an edge loop) which I've animated along a path
    using 'Follow Path'.

  • It has a number of Shape Keys, and as it moves along the path,
    it changes shape.

  • I would like to capture a copy of the full state of the mesh, in place, at each
    frame of its animation.

This would be, if you like, a sort of 'physical onion skinning'. Dupliframes capture the transformations of the mesh at each frame, including tilts and scales derived from the path, varying those along the path, so come very close. But they don't capture the Shape Keys. If I alter the shape, it changes in all the duplicates,irrespective of keyed frames.



I'm attempting this in the hope of modeling with the resulting copies: creating a mechanism for lofting between varying profiles along a curve with a reasonable degree of accuracy, and ease of workflow.. so if there's an alternative route to that, please comment.










share|improve this question























  • Think I have something similar re this question A follow path constraint gives an easy way to put shape at either end, and fill in the "ribs". Be simple enough to convert from offsets to frames .Could you provide a small sample file?
    – batFINGER
    Nov 8 at 11:03












up vote
4
down vote

favorite
1









up vote
4
down vote

favorite
1






1





  • I have made a simple profile mesh (an edge loop) which I've animated along a path
    using 'Follow Path'.

  • It has a number of Shape Keys, and as it moves along the path,
    it changes shape.

  • I would like to capture a copy of the full state of the mesh, in place, at each
    frame of its animation.

This would be, if you like, a sort of 'physical onion skinning'. Dupliframes capture the transformations of the mesh at each frame, including tilts and scales derived from the path, varying those along the path, so come very close. But they don't capture the Shape Keys. If I alter the shape, it changes in all the duplicates,irrespective of keyed frames.



I'm attempting this in the hope of modeling with the resulting copies: creating a mechanism for lofting between varying profiles along a curve with a reasonable degree of accuracy, and ease of workflow.. so if there's an alternative route to that, please comment.










share|improve this question















  • I have made a simple profile mesh (an edge loop) which I've animated along a path
    using 'Follow Path'.

  • It has a number of Shape Keys, and as it moves along the path,
    it changes shape.

  • I would like to capture a copy of the full state of the mesh, in place, at each
    frame of its animation.

This would be, if you like, a sort of 'physical onion skinning'. Dupliframes capture the transformations of the mesh at each frame, including tilts and scales derived from the path, varying those along the path, so come very close. But they don't capture the Shape Keys. If I alter the shape, it changes in all the duplicates,irrespective of keyed frames.



I'm attempting this in the hope of modeling with the resulting copies: creating a mechanism for lofting between varying profiles along a curve with a reasonable degree of accuracy, and ease of workflow.. so if there's an alternative route to that, please comment.







modeling animation shape-keys






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 8 at 18:05

























asked Nov 8 at 10:21









Robin Betts

5,0401627




5,0401627











  • Think I have something similar re this question A follow path constraint gives an easy way to put shape at either end, and fill in the "ribs". Be simple enough to convert from offsets to frames .Could you provide a small sample file?
    – batFINGER
    Nov 8 at 11:03
















  • Think I have something similar re this question A follow path constraint gives an easy way to put shape at either end, and fill in the "ribs". Be simple enough to convert from offsets to frames .Could you provide a small sample file?
    – batFINGER
    Nov 8 at 11:03















Think I have something similar re this question A follow path constraint gives an easy way to put shape at either end, and fill in the "ribs". Be simple enough to convert from offsets to frames .Could you provide a small sample file?
– batFINGER
Nov 8 at 11:03




Think I have something similar re this question A follow path constraint gives an easy way to put shape at either end, and fill in the "ribs". Be simple enough to convert from offsets to frames .Could you provide a small sample file?
– batFINGER
Nov 8 at 11:03










1 Answer
1






active

oldest

votes

















up vote
5
down vote



accepted










Bmesh script



Select the profile mesh, run script. Creates a copy for each frame from scene frame start to scene frame end.



enter image description hereA simple edge loop animated with follow path constraint, scale, and a mix of two shape keys. BMesh.from_object gives a mesh snapshot at that frame (Apologies for low quality gif)



import bpy
import bmesh
from mathutils import Vector, Matrix
from math import radians, degrees
context = bpy.context
scene = context.scene
ob = context.object
me = ob.data
bm = bmesh.new()
f = scene.frame_start
step = 1
while f <= scene.frame_end:
scene.frame_set(f)
bm.from_object(ob, scene)
rme = bpy.data.meshes.new("Rib")
bm.to_mesh(rme)

copy = bpy.data.objects.new("Rib", rme)
copy.matrix_world = ob.matrix_world
scene.objects.link(copy)
bm.clear() # interesting without.
f += step


Skinning the thing.



Rather than having an object per rib, could also make one object. Taking advantage of the order each rib ring is added, can bridge these edgeloops with bmesh.ops.bridge_loops Could be done on a lower level by creating faces.



enter image description here



import bpy
import bmesh
from mathutils import Vector, Matrix
from math import radians, degrees
context = bpy.context
scene = context.scene
ob = context.object
mw = ob.matrix_world.copy()
me = ob.data
nverts = len(me.vertices)
nedges = len(me.edges)
bm = bmesh.new()
f = scene.frame_start
step = 1
rings =
while f <= scene.frame_end:
scene.frame_set(f)
bm.from_object(ob, scene)
bmesh.ops.transform(bm, verts=bm.verts[-nverts:], matrix=ob.matrix_world)

rings.append(bm.edges[-nedges:])
f += step

# build from rings
next = rings.pop()
while rings:
ring = rings.pop()
bmesh.ops.bridge_loops(bm, edges=ring + next)
next = ring

rme = bpy.data.meshes.new("Rib")
bm.to_mesh(rme)
copy = bpy.data.objects.new("Rib", rme)
#copy.matrix_world = mw
scene.objects.link(copy)





share|improve this answer






















  • That works very nicely ...You're ahead of me!.. I was going to explore the API and try out my inexperienced Python to attempt just what you've done in your edit. It would have taken me a long time. There'll be plenty more to play with :)
    – Robin Betts
    Nov 8 at 17:55











  • @RobinBetts Using what is prob a better fill method here
    – batFINGER
    Nov 9 at 15:11










Your Answer





StackExchange.ifUsing("editor", function ()
return StackExchange.using("mathjaxEditing", function ()
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix)
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
);
);
, "mathjax-editing");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "502"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fblender.stackexchange.com%2fquestions%2f122230%2flofting-can-i-copy-a-shape-keyed-mesh-for-each-frame-of-its-animation%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
5
down vote



accepted










Bmesh script



Select the profile mesh, run script. Creates a copy for each frame from scene frame start to scene frame end.



enter image description hereA simple edge loop animated with follow path constraint, scale, and a mix of two shape keys. BMesh.from_object gives a mesh snapshot at that frame (Apologies for low quality gif)



import bpy
import bmesh
from mathutils import Vector, Matrix
from math import radians, degrees
context = bpy.context
scene = context.scene
ob = context.object
me = ob.data
bm = bmesh.new()
f = scene.frame_start
step = 1
while f <= scene.frame_end:
scene.frame_set(f)
bm.from_object(ob, scene)
rme = bpy.data.meshes.new("Rib")
bm.to_mesh(rme)

copy = bpy.data.objects.new("Rib", rme)
copy.matrix_world = ob.matrix_world
scene.objects.link(copy)
bm.clear() # interesting without.
f += step


Skinning the thing.



Rather than having an object per rib, could also make one object. Taking advantage of the order each rib ring is added, can bridge these edgeloops with bmesh.ops.bridge_loops Could be done on a lower level by creating faces.



enter image description here



import bpy
import bmesh
from mathutils import Vector, Matrix
from math import radians, degrees
context = bpy.context
scene = context.scene
ob = context.object
mw = ob.matrix_world.copy()
me = ob.data
nverts = len(me.vertices)
nedges = len(me.edges)
bm = bmesh.new()
f = scene.frame_start
step = 1
rings =
while f <= scene.frame_end:
scene.frame_set(f)
bm.from_object(ob, scene)
bmesh.ops.transform(bm, verts=bm.verts[-nverts:], matrix=ob.matrix_world)

rings.append(bm.edges[-nedges:])
f += step

# build from rings
next = rings.pop()
while rings:
ring = rings.pop()
bmesh.ops.bridge_loops(bm, edges=ring + next)
next = ring

rme = bpy.data.meshes.new("Rib")
bm.to_mesh(rme)
copy = bpy.data.objects.new("Rib", rme)
#copy.matrix_world = mw
scene.objects.link(copy)





share|improve this answer






















  • That works very nicely ...You're ahead of me!.. I was going to explore the API and try out my inexperienced Python to attempt just what you've done in your edit. It would have taken me a long time. There'll be plenty more to play with :)
    – Robin Betts
    Nov 8 at 17:55











  • @RobinBetts Using what is prob a better fill method here
    – batFINGER
    Nov 9 at 15:11














up vote
5
down vote



accepted










Bmesh script



Select the profile mesh, run script. Creates a copy for each frame from scene frame start to scene frame end.



enter image description hereA simple edge loop animated with follow path constraint, scale, and a mix of two shape keys. BMesh.from_object gives a mesh snapshot at that frame (Apologies for low quality gif)



import bpy
import bmesh
from mathutils import Vector, Matrix
from math import radians, degrees
context = bpy.context
scene = context.scene
ob = context.object
me = ob.data
bm = bmesh.new()
f = scene.frame_start
step = 1
while f <= scene.frame_end:
scene.frame_set(f)
bm.from_object(ob, scene)
rme = bpy.data.meshes.new("Rib")
bm.to_mesh(rme)

copy = bpy.data.objects.new("Rib", rme)
copy.matrix_world = ob.matrix_world
scene.objects.link(copy)
bm.clear() # interesting without.
f += step


Skinning the thing.



Rather than having an object per rib, could also make one object. Taking advantage of the order each rib ring is added, can bridge these edgeloops with bmesh.ops.bridge_loops Could be done on a lower level by creating faces.



enter image description here



import bpy
import bmesh
from mathutils import Vector, Matrix
from math import radians, degrees
context = bpy.context
scene = context.scene
ob = context.object
mw = ob.matrix_world.copy()
me = ob.data
nverts = len(me.vertices)
nedges = len(me.edges)
bm = bmesh.new()
f = scene.frame_start
step = 1
rings =
while f <= scene.frame_end:
scene.frame_set(f)
bm.from_object(ob, scene)
bmesh.ops.transform(bm, verts=bm.verts[-nverts:], matrix=ob.matrix_world)

rings.append(bm.edges[-nedges:])
f += step

# build from rings
next = rings.pop()
while rings:
ring = rings.pop()
bmesh.ops.bridge_loops(bm, edges=ring + next)
next = ring

rme = bpy.data.meshes.new("Rib")
bm.to_mesh(rme)
copy = bpy.data.objects.new("Rib", rme)
#copy.matrix_world = mw
scene.objects.link(copy)





share|improve this answer






















  • That works very nicely ...You're ahead of me!.. I was going to explore the API and try out my inexperienced Python to attempt just what you've done in your edit. It would have taken me a long time. There'll be plenty more to play with :)
    – Robin Betts
    Nov 8 at 17:55











  • @RobinBetts Using what is prob a better fill method here
    – batFINGER
    Nov 9 at 15:11












up vote
5
down vote



accepted







up vote
5
down vote



accepted






Bmesh script



Select the profile mesh, run script. Creates a copy for each frame from scene frame start to scene frame end.



enter image description hereA simple edge loop animated with follow path constraint, scale, and a mix of two shape keys. BMesh.from_object gives a mesh snapshot at that frame (Apologies for low quality gif)



import bpy
import bmesh
from mathutils import Vector, Matrix
from math import radians, degrees
context = bpy.context
scene = context.scene
ob = context.object
me = ob.data
bm = bmesh.new()
f = scene.frame_start
step = 1
while f <= scene.frame_end:
scene.frame_set(f)
bm.from_object(ob, scene)
rme = bpy.data.meshes.new("Rib")
bm.to_mesh(rme)

copy = bpy.data.objects.new("Rib", rme)
copy.matrix_world = ob.matrix_world
scene.objects.link(copy)
bm.clear() # interesting without.
f += step


Skinning the thing.



Rather than having an object per rib, could also make one object. Taking advantage of the order each rib ring is added, can bridge these edgeloops with bmesh.ops.bridge_loops Could be done on a lower level by creating faces.



enter image description here



import bpy
import bmesh
from mathutils import Vector, Matrix
from math import radians, degrees
context = bpy.context
scene = context.scene
ob = context.object
mw = ob.matrix_world.copy()
me = ob.data
nverts = len(me.vertices)
nedges = len(me.edges)
bm = bmesh.new()
f = scene.frame_start
step = 1
rings =
while f <= scene.frame_end:
scene.frame_set(f)
bm.from_object(ob, scene)
bmesh.ops.transform(bm, verts=bm.verts[-nverts:], matrix=ob.matrix_world)

rings.append(bm.edges[-nedges:])
f += step

# build from rings
next = rings.pop()
while rings:
ring = rings.pop()
bmesh.ops.bridge_loops(bm, edges=ring + next)
next = ring

rme = bpy.data.meshes.new("Rib")
bm.to_mesh(rme)
copy = bpy.data.objects.new("Rib", rme)
#copy.matrix_world = mw
scene.objects.link(copy)





share|improve this answer














Bmesh script



Select the profile mesh, run script. Creates a copy for each frame from scene frame start to scene frame end.



enter image description hereA simple edge loop animated with follow path constraint, scale, and a mix of two shape keys. BMesh.from_object gives a mesh snapshot at that frame (Apologies for low quality gif)



import bpy
import bmesh
from mathutils import Vector, Matrix
from math import radians, degrees
context = bpy.context
scene = context.scene
ob = context.object
me = ob.data
bm = bmesh.new()
f = scene.frame_start
step = 1
while f <= scene.frame_end:
scene.frame_set(f)
bm.from_object(ob, scene)
rme = bpy.data.meshes.new("Rib")
bm.to_mesh(rme)

copy = bpy.data.objects.new("Rib", rme)
copy.matrix_world = ob.matrix_world
scene.objects.link(copy)
bm.clear() # interesting without.
f += step


Skinning the thing.



Rather than having an object per rib, could also make one object. Taking advantage of the order each rib ring is added, can bridge these edgeloops with bmesh.ops.bridge_loops Could be done on a lower level by creating faces.



enter image description here



import bpy
import bmesh
from mathutils import Vector, Matrix
from math import radians, degrees
context = bpy.context
scene = context.scene
ob = context.object
mw = ob.matrix_world.copy()
me = ob.data
nverts = len(me.vertices)
nedges = len(me.edges)
bm = bmesh.new()
f = scene.frame_start
step = 1
rings =
while f <= scene.frame_end:
scene.frame_set(f)
bm.from_object(ob, scene)
bmesh.ops.transform(bm, verts=bm.verts[-nverts:], matrix=ob.matrix_world)

rings.append(bm.edges[-nedges:])
f += step

# build from rings
next = rings.pop()
while rings:
ring = rings.pop()
bmesh.ops.bridge_loops(bm, edges=ring + next)
next = ring

rme = bpy.data.meshes.new("Rib")
bm.to_mesh(rme)
copy = bpy.data.objects.new("Rib", rme)
#copy.matrix_world = mw
scene.objects.link(copy)






share|improve this answer














share|improve this answer



share|improve this answer








edited Nov 8 at 13:35

























answered Nov 8 at 12:06









batFINGER

21.3k42463




21.3k42463











  • That works very nicely ...You're ahead of me!.. I was going to explore the API and try out my inexperienced Python to attempt just what you've done in your edit. It would have taken me a long time. There'll be plenty more to play with :)
    – Robin Betts
    Nov 8 at 17:55











  • @RobinBetts Using what is prob a better fill method here
    – batFINGER
    Nov 9 at 15:11
















  • That works very nicely ...You're ahead of me!.. I was going to explore the API and try out my inexperienced Python to attempt just what you've done in your edit. It would have taken me a long time. There'll be plenty more to play with :)
    – Robin Betts
    Nov 8 at 17:55











  • @RobinBetts Using what is prob a better fill method here
    – batFINGER
    Nov 9 at 15:11















That works very nicely ...You're ahead of me!.. I was going to explore the API and try out my inexperienced Python to attempt just what you've done in your edit. It would have taken me a long time. There'll be plenty more to play with :)
– Robin Betts
Nov 8 at 17:55





That works very nicely ...You're ahead of me!.. I was going to explore the API and try out my inexperienced Python to attempt just what you've done in your edit. It would have taken me a long time. There'll be plenty more to play with :)
– Robin Betts
Nov 8 at 17:55













@RobinBetts Using what is prob a better fill method here
– batFINGER
Nov 9 at 15:11




@RobinBetts Using what is prob a better fill method here
– batFINGER
Nov 9 at 15:11

















 

draft saved


draft discarded















































 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fblender.stackexchange.com%2fquestions%2f122230%2flofting-can-i-copy-a-shape-keyed-mesh-for-each-frame-of-its-animation%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

𛂒𛀶,𛀽𛀑𛂀𛃧𛂓𛀙𛃆𛃑𛃷𛂟𛁡𛀢𛀟𛁤𛂽𛁕𛁪𛂟𛂯,𛁞𛂧𛀴𛁄𛁠𛁼𛂿𛀤 𛂘,𛁺𛂾𛃭𛃭𛃵𛀺,𛂣𛃍𛂖𛃶 𛀸𛃀𛂖𛁶𛁏𛁚 𛂢𛂞 𛁰𛂆𛀔,𛁸𛀽𛁓𛃋𛂇𛃧𛀧𛃣𛂐𛃇,𛂂𛃻𛃲𛁬𛃞𛀧𛃃𛀅 𛂭𛁠𛁡𛃇𛀷𛃓𛁥,𛁙𛁘𛁞𛃸𛁸𛃣𛁜,𛂛,𛃿,𛁯𛂘𛂌𛃛𛁱𛃌𛂈𛂇 𛁊𛃲,𛀕𛃴𛀜 𛀶𛂆𛀶𛃟𛂉𛀣,𛂐𛁞𛁾 𛁷𛂑𛁳𛂯𛀬𛃅,𛃶𛁼

Crossroads (UK TV series)

ữḛḳṊẴ ẋ,Ẩṙ,ỹḛẪẠứụỿṞṦ,Ṉẍừ,ứ Ị,Ḵ,ṏ ṇỪḎḰṰọửḊ ṾḨḮữẑỶṑỗḮṣṉẃ Ữẩụ,ṓ,ḹẕḪḫỞṿḭ ỒṱṨẁṋṜ ḅẈ ṉ ứṀḱṑỒḵ,ḏ,ḊḖỹẊ Ẻḷổ,ṥ ẔḲẪụḣể Ṱ ḭỏựẶ Ồ Ṩ,ẂḿṡḾồ ỗṗṡịṞẤḵṽẃ ṸḒẄẘ,ủẞẵṦṟầṓế