[Script] Meshfoot OBJ Sequence Manager (revised for Blender 2.76)

jajaja so obvious…
http://www.beeskneesdance.com/bees_knees/wp-content/uploads/2011/01/homer-simpson-doh.gif
I have not read the thread…finally I have it working!!! thanks a lot!!

I have a question… I have a tree sequence with multiple materials. I want to have the mesh animated, but not the material, so that I can apply my own materials, wood, leaf and so on, and it will be the same in all frames, assigned to the proper faces.
Is there a way to do this? Although the .mtl file calls the material “leaf” for example, the script is calling it “leaf32” on frame 32, or something like that. And changing on each frame creating hundreds of materials when there should be only 2 or 3

Since I don’t understand anything about scripts, I can’t see how to do it. I tried deleting all the material part on the script but nothing…

The material “fallout” comes from the Blender OBJ importer itself. So if you have 100 frames of a model with 3 materials the Blender OBJ importer, which is what Meshfoot uses to import the models, will create 300 materials. Yes, I know messy. The materials are associated with the meshes themselves as per-default configuration under User Preferences (Editing TAB) Link Materials To" obData.

You can override this by simply selecting the resulting meshfoot object and switching the material to fetch from the object and not the data. I show how to do this in the example video. How I changed one dancing pixie to red and the other to blue.

Remember, that Meshfoot is a one-shot system for rendering. And by that I mean that you will have to re “PreLoad” your meshes should you close down Blender and reopen the scene. Meshfoot is swapping non-fake data nodes that reside in memory. All those materials and datablocks will be lost when you Save the scene and close Blender. That is why a Meshfoot object becomes a “statue” when you re-open the scene. The Meshfoot object is only linked to a single mesh frame from the sequence and all the other frames are no longer present until you “PreLoad” them again.

I tested your problem using the official 1e release version in post #1 with the hose obj sequence which has multiple materials. I do not see the materials names changing when I change frames, however, they do reside in memory. For instance I see 23 users of the hoof material for my horse. So I did put effort into mapping the first material imported to all the following imported frames. However, I did not put any effort into cleaning up the unused materials left in memory. My advice is to not worry about the unused materials that reside in memory.

If you feel comfortable posting part or all of your OBJ sequence I will take a look and see if I can reproduce what you are experiencing.

Thanks for the quick and thoughtful response.

Yes, I saw the video later, sorry about that. My connection is very very limited and videos are usually a no no for me.
But it did not solve my problem completely. The mesh sequence doesn’t always have all the faces with the different materials (i.e., in the beginning there is only the trunk, with no leaves, so no leaf material is created), so the material ids gets a little random, specially in the beginning. Sometimes loosing one slot and gaining another one. So even if I set the material it might change later on to the default written in the .mtl file.

Nothing I can’t solve scrolling the animation and manually fixing every frame. But this becomes a big problem considering I will have to redo this everytime I change the sequence or I reopen the file.

Wich brings me to the other problem. You said that blender would be very slow to replace the mesh in each frame so you choose to put everything in memory. That is fine for characters or something, but when you get to fluid simulation or, in my case, tree generation, we would gladly accept to wait a few seconds for each frame to load, as having to load everything takes sometimes half an hour. And my animation is using more then 10gigas and it is going to become much bigger later on and I probably won’t be able to use the script anymore.

In this kind of situation (simulations) we usually already have a good idea of the animation from the software we created the meshes in and we only need to go to secific frames, adjust something, go to another frame, adjust something else there and then render. We don’t need to see the animation in real time. Just being able to use blender tools (modifiers, materials and so on) is our need.

I wish I knew anything about scripts to change this. But is there a way to do it?

I am thankfull for your script anyway. It is a great attitude to help people like that. I will state my ideas here but just for future reference if you want to improve the script:

-Create a way of choosing one specific .mtl file for all the sequence, instead of letting the script assign one .mtl for each frame (maybe replacing the contents of all the .mtl with the choosen one? or deleting them and creating links to the choosen one? I don’t know if this ideas are stupid…) That way, if the materials change in any of the files, that would not affect the render.

-Create a way of dynamically deleting the mesh and loading the new frame with each frame. Even if this takes a long time or requires user interaction (although not after the render started), as long as the object properties; material, modifiers, transformation, remain the same.

Feel free to ignore all of this. It is just user input…

we would gladly accept to wait a few seconds for each frame to load,

I recently ported Meshfoot as a Node forBlendgraph and made a change so it does load a new mesh every frame change instead of preloading. The node is new and has little testing, but it did work on my system with a short OBJ sequence. The new node also supports other file types like .3ds and .wrl too.

If you would like to give it a try I’ll field feedback under the Blendgraph thread.

I am trying, but my available time is finished. So far it is very complicated for someone like me who doesn’t even know properly the difference between float and integer.

It seems to be something amazing and really powerful. Can’t wait to see this more refined in the user friendly aspect and then I hope it gets integrated in Blender.

But so far I wasn’t able to make it work =P Of course, it doesn’t help that I could only download half of the video because of my internet. Will let you know as soon as I get to make it work!

I imported an obj’s sequence using meshfoot and it worked perfectly, but my sequence does not have any material asigned.

How can I asign the same material during all meshfoot sequence? Blender let me asign only single frame. Number of vertices is changing, so .mdd export trick is not an option.

Please help.

Hmm…have you watched the video tutorial for the AddOn in post #1? I explain how materials work.

Does your OBJ have materials when you import it a single frame using the built-in OBJ importer? Meshfoot uses the built-in OBJ importer.

Great job, it works perfectly with Blender 2.7 using export of OBJ sequence made with blender.
I would like to test it with different mesh for each frame, renamed correctly to look like a sequence but it load only first one and nothing happen. Have you some advise to succeed this ?

Do you know where I can find the link to this add-on or the custom build?

I have the same question as above! I can see the video and screenshots but can’t see any link to the script!

Thanks, S

First post edited

Last edited by Atom; 15-Oct-14 at 14:28. Reason: Release of Blender 2.66 broke the script.
so could have been removed as it no longer works

Hi there, where is the script???

I’m using it with the 2.72, and tested it today with the 2.75 (test build), and it works fine :confused:

Great tutorial, however I cannot find the Meshfoot script. I am willing to use it since i am not able to load multiple obj files in blender

Hey Atom, sorry for bumping up an old thread, but this looks extremely useful for a client project of mine, involving OBJ sequences from Maya… Whats the latest version of blender that I can expect this to work on? thanks! :slight_smile:

Hi, it seems very useful to me. But the download link doesn’t work. Have there been released anything similar to this script for all these years?

This is a great addon for working with obj sequences. It has a similar functionality. Looking forward to have it in 2.80.

2 Likes

Thanks for the plug, Dan. I wrote Stop Motion OBJ precisely because Meshfoot is no longer available. FYI, it also works with .stl and .ply sequences.

1 Like