Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Material update #169

Open
digimolecules opened this issue Sep 29, 2022 · 4 comments
Open

Material update #169

digimolecules opened this issue Sep 29, 2022 · 4 comments

Comments

@digimolecules
Copy link

Hi,
First of all, great add-on! I've been playing with it for my molecular dynamics simulations and it works great event data uploaded is heavy (using Blender 3.2). I have several objects and one mtl file for the materials.

The main issue I see is that if I import with Material per frame enable, it imports correctly the materials assigned, but instead of having a single material for each type of atom and all the frames (let's say blue for all the carbons in the different frames, red for oxygens, ...) it creates a copy of the atom material for each frame (carbon, carbon_001, carbon_002, ...). So if I want to modify it, I need to reassign the material frame by frame (talking about hundreds) and then change it.

If the option is disabled, it works in the sense it assigns the same material for all the frames, but then all the atoms are assigned with the same material (carbon and oxygen have the same material as blue). And I cannot change it.

I don't know if I explained it well. Sorry. Any suggestion?

@neverhood311
Copy link
Owner

Yes, I understand. I encountered the exact same problem with one of my projects. If you're willing to try out a beta version, there's a feature in v2.2.0.beta.0 that solves this problem. Note that it's only enabled for Cached Sequences. It will not work for Streaming Sequences.

Here's the process:

  • Import your sequence normally with Material per Frame enabled and as a Cached sequence
  • Select the sequence and go to the Stop Motion OBJ settings for the object
  • Navigate to the Advanced settings and click the Merge Duplicate Materials button

This operator will search through all the materials in the sequence looking for materials with the same name (except the .00x on the end) and merge them into a single material. In my tests, this works even when the sequence has multiple materials per frame.

Try it out (remember that it's a Beta version) and let me know how it goes.

@digimolecules
Copy link
Author

Thanks for the quick reply. I've tried to install the add-on (removing the previous one) and I got this error when enabling de add-on:

Screenshot 2022-09-30 095304

Is there something wrong with my configuration?
Thanks

@neverhood311
Copy link
Owner

I'm not sure what's going on here. How did you remove the previous one? Did you install the new one the Install... button and find the .zip file with the addon?

@digimolecules
Copy link
Author

Sorry for the late reply (a little bit busy these days). Made a fresh install of Blender (now 3.3.0). I've installed v2.2 and followed your instructions. It works perfectly for my full sequence!

Probably I did a mess during the installation. Thanks a lot, Justin!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants