Open archibate opened 4 years ago
That's an interesting idea. I think it's entirely possible.
How would your mesh data be formatted? According to this stack exchange post, Blender can create a mesh from an array of vertex positions (formatted like this: [(0.0, 0.0, 0.0), (1.0, 0.0, 0.0), (0.0, 1.0, 0.0)]
) and an array of faces (formatted as arrays of vertex indices like this: [[0, 1, 2]]
). If the mesh data is formatted like this, I think it would be fairly straightforward to add the desired API.
(formatted like this: [(0.0, 0.0, 0.0), (1.0, 0.0, 0.0), (0.0, 1.0, 0.0)]) and an array of faces (formatted as arrays of vertex indices like this: [[0, 1, 2]])
Exactly! I will create the meshes first according to that post, and fed the meshes to the API here.
Ok, I'll see what I can do. I can't promise a timeline, though.
And what's more, can we use the streaming mechanism, to only generate a frame when requested? Something like:
def on_request_frame(frame):
mesh = ... # generate a mesh via Taichi
return mesh
object.mesh_sequence_settings.set_frame_callback(on_request_frame, mode='streaming')
That sounds a little more tricky but still probably possible.
On Thu, Aug 20, 2020 at 8:44 PM 彭于斌 notifications@github.com wrote:
And what's more, can we use the streaming mechanism, to only generate a frame when requested? Something like:
def my_frame_generator(frame): mesh = ... return mesh object.mesh_sequence_settings.hook_streaming(my_frame_generator)
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/neverhood311/Stop-motion-OBJ/issues/104#issuecomment-678006793, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABDGYARMOSX3H4UIR3MZUALSBXNRXANCNFSM4QGA3BAA .
-- Justin
@archibate Are you still working on TaiChi-Blender integration? I'm finally getting around to some Stop Motion OBJ development. I'm working on a feature that lets you create an empty mesh sequence then add new frames to the sequence on-the-fly. Did you still want to integrate with this addon or have you taken a different route?
@archibate Are you still working on TaiChi-Blender integration? I'm finally getting around to some Stop Motion OBJ development. I'm working on a feature that lets you create an empty mesh sequence then add new frames to the sequence on-the-fly. Did you still want to integrate with this addon or have you taken a different route?
Yes, thank for the great project! I studied your addon source code carefully and succeed to support mesh sequence on my own by hooking frame_change_pre
. But I have some trouble when saving the mesh sequence (only the mesh at current frame is saved), though.
Is your feature request related to a problem? Please describe. Hi, I'm freshman to both Blender and Stop-motion-OBJ. Recently I'm working on integrating Taichi into Blender. So that people could make use their own physics engines based on Taichi in Blender. And it's usually the case that Taichi + Blender users don't want to import a mesh sequence from disk, but generate a mesh sequence via Taichi instead. So I'd like to add a possibility to create a mesh sequence from Python scripting module.
Describe the solution you'd like Add an API like this:
Describe alternatives you've considered We may do them in pure end-user Python script manipulating
mesh_sequence_settings
members.Additional context For now I use an external script to generate a series of PLY file for creating empty meshes:
and import them into Blender for creating a mesh sequence of length 250.