GithubHelp home page GithubHelp logo

u3dreal / molecular-plus Goto Github PK

View Code? Open in Web Editor NEW
229.0 19.0 17.0 51.74 MB

particle solver for Blender 3.0+ / 4.0+

License: GNU General Public License v3.0

Python 28.96% Batchfile 0.10% Cython 34.92% C 29.23% C++ 6.79%

molecular-plus's Introduction

Molecular+

molecular-plus : Particle Solver for Blender 2.8 - 4.0+

Originally based on molecular addon from pyroevil. https://github.com/Pyroevil/Blender-Molecular-Script and the efforts of PavelBlend and Scorpion81 for maintaining compatibility with Blender 2.8+. https://github.com/scorpion81/Blender-Molecular-Script

This is my extended version of the addon adding a create panel to be able to fast setup a scene.

I cleaned up the code and moved the molecular+ panel to the physics section of blender, where it belongs.

Added an N-panel to get fast access to setup / simulation.

More info on my website. http://q3de.com/research/molecular/

Join my discord https://discord.com/invite/tAwvNEAfA3

X https://twitter.com/u3dreal

If you find this helpful and want to support future development please consider supporting me. Thanks !

paypal

header image image by tinkerboy123

header image

molecular-plus's People

Contributors

arunsathiya avatar hecorr avatar kant avatar omidghotbi avatar revehiet avatar u3dreal avatar xzeldon avatar yiusay avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

molecular-plus's Issues

Installation issue

Hello,
I downloaded the repo as a zip file an added it in Blender using the blender Addon UI,
I'm on windows:
I get:

Traceback (most recent call last):
File "C:\Program Files\Blender Foundation\Blender 2.91\2.91\scripts\modules\addon_utils.py", line 382, in enable
mod.register()
File "C:\Users\Ali\AppData\Roaming\Blender Foundation\Blender\2.91\scripts\addons\molecular-plus-main_init_.py", line 43, in register
from . import properties, ui, operators, creators
File "C:\Users\Ali\AppData\Roaming\Blender Foundation\Blender\2.91\scripts\addons\molecular-plus-main\operators.py", line 7, in
from . import simulate, core
ImportError: cannot import name 'core' from 'molecular-plus-main' (C:\Users\Ali\AppData\Roaming\Blender Foundation\Blender\2.91\scripts\addons\molecular-plus-main_init_.py)

I must be missing some dependency or something, right?

Blender 3.65 & macOS 13.6.1 crash when "Activate Particles linking" is On

Blender 3.65 & macOS 13.6.1
molecular-plus_1.14.1_310_macos

Hi, the first thanks for the add-on.
When I check the "Activate Particles linking" option and the I press Simulate button, Blender crashes.
This is the message in Console:

Molecular Sim Start--------------------------------------------------
  PackData took 0.001seg
OMP: Error #15: Initializing libomp.a, but found libomp.dylib already initialized.
OMP: Hint This means that multiple copies of the OpenMP runtime have been linked into the program. That is dangerous, since it can degrade performance or cause incorrect results. The best thing to do is to ensure that only a single OpenMP runtime is linked into the process, e.g. by avoiding static linking of the OpenMP runtime in any library. As an unsafe, unsupported, undocumented workaround you can set the environment variable KMP_DUPLICATE_LIB_OK=TRUE to allow the program to continue to execute, but that may cause crashes or silently produce incorrect results. For more information, please see http://openmp.llvm.org/
zsh: abort      /Applications/BLENDER/BLENDER\ 3.6/Blender.app/Contents/MacOS/Blender

Saving session.../Applications/BLENDER/BLENDER 3.6/Blender.app/Contents/Resources/3.6/python/lib/python3.10/multiprocessing/resource_tracker.py:224: UserWarning: resource_tracker: There appear to be 18 leaked semaphore objects to clean up at shutdown
  warnings.warn('resource_tracker: There appear to be %d '

I wait that you can help me.

Regards!!

Oxer

Cubesurfer integration?

Could you update cubesurfer (or recommend a similar isosurface mesher) to work with this addon? As is, it's great for sand and the like, but not very good for fluid simulations. I tried this, but it doesn't work, at least with Blender 2.93 and Windows.

Missing core module when enabling addon v1.14.1 on Linux

Hello, I get following message when trying to enable the add-on:

Traceback (most recent call last):
  File "/usr/share/blender/4.0/scripts/modules/addon_utils.py", line 401, in enable
    mod.register()
  File "/home/peter/.config/blender/4.0/scripts/addons/molecularplus/__init__.py", line 39, in register
    from . import properties, ui, operators, creators, addon_prefrences
  File "/home/peter/.config/blender/4.0/scripts/addons/molecularplus/operators.py", line 10, in <module>
    from . import simulate, core
ImportError: cannot import name 'core' from 'molecularplus' (/home/peter/.config/blender/4.0/scripts/addons/molecularplus/__init__.py)

I'm running blender 4.0.2 which includes Python version 3.11.6.

Issue appears to be that the binary core module can't be imported for some reason. I don't know how the linking of compiled code and python works, so this is all the info I could provide.

Changing render FPS affects simulation results

It seems that this addon does not adjust simulations with current FPS setting.
Increasing FPS from default Blender's 24 to 60 and then running simulation again significantly changes simulation behaviour, it seems like it has way less gravity force.

Bug: can not cancel simulation

When I am process simulation, and quit the Blender progress before the process finished, I will have NO method to cancel the simulation. And then I can not restart simulation again never.

Baking stutters and repeats playback.

Hi, I've installed 1.19 310 Win on Windows 11 Blender 3.3.

When I click bake it begins, but the animation often jumps back to the start position and repeatedly plays out the simulation from the beginning. This stuttering and repeating winds up in the final bake animation.

Any help is appreciated!

Pause/Resume Baking

It would be really nice if I could pause the bake and resume it later, instead of canceling it and having to start all over again. I know it's possible, because the flip fluids plugin does it.

Docs typo

Blender 3.93+ -> use Python 39 version
I wanted to download 1.1.7, but scrolled down as far as 1.1.5 to figure out the '37' and '39'. The line above is incorrect, I think you mean Blender 2.93...
Thank you for this project, I'm here because Steven Scott recommended you.

What heppen if par.alive_state == "DYING"?

Thank you for your great work!
While looking at the code, I am seeing one thing I want to make sure.

In the following loop in simulate.py (

for par in psys.particles:
),

par_alive = []
for par in psys.particles:
parnum += 1
if par.alive_state == "UNBORN":
par_alive.append(2)
if par.alive_state == "ALIVE":
par_alive.append(0)
if par.alive_state == "DEAD":
par_alive.append(3)

For some particle, if par.alive_state == "DYING", the number of elements in par_alive will be less than parnum. I am wondering if it can cause problem in core.pyx because there seems to be an assumption that the number of elements in par_alive is always equal to parnum?

If par.alive_state is never set to "DYING", it should be fine.

Wrong MacOs Linking behaviour

Hello,
I really appreciate your work. Although I'm a decent programmer I didn't have time to understand the code.

But I (potentially) found a bug in the macOS version:
Screenshot MacOs
image

Screenshot Windows:
image

I'm on Vacation and wanted to do some work. But I noticed that on the MacOS Version there are no new links created after birth.

I'am using the same blender file, version and same Python version on both machines.

Blender Version: 3.2.1
python: 3.10.2

Thanks for your help.

If you have tip, where I can start diving into the code, maybe I can help (in upcoming issues)

Installation of the lastest add-on version failed on blender 3.1.0

Installing the version "molecular-plus_1.1.8_310_win" for blender 3.1.0 worked fine without running into any problems.
Version "molecular-plus_1.1.8_37_win" also works fine but I want to use the latest version.

However the latest version "molecular-plus_1.1.8_39_win" can't be installed and gives me an error message:

grafik

I don't know what that means, I don't code... ๐Ÿค”

'Free All Bakes' affecting more than it should

Using 'free all bakes' on the UI affects other physics simulations in the scene (such as cloth sims) which I don't think it should be doing. It should really only be clearing data relevant to the addon (the selected object's associated particle system bake, I believe?), not anything else.

Blender 2.93 unable to install

unable to install latest version (1.1.4_39_macos and 1.1.4_37m_macos) to Blender 2.93 on Mac OSX
see attached the error message
Screen Shot 2021-06-02 at 9 34 26 PM

error when clicking on start simulation

i got this error, if i click on "start simulation":

image

is there a fix or workaround for this? or did i install a wrong version?

I am working on a Macbook:

image

with Blender 4.2

I would appreciate any help.

Remove modifier button doesn't change UI

On macOS Sonoma 14.2, the remove collision option doesn't update the UI, but does remove collision. You have to Undo the action of adding the modifier (ctrl Z) in order to remove it.

core.py is missing

Hi

Thank you for maintaining and providing such an underrated addon.

I'm trying to install this on Ubuntu but I get the error from line 8 of operators.py saying it cannot import core. I looked into the source code and noticed that there is no core.py file.Think you could pushan update?

Meshing of constraints.

It is currently not possible to visualize the constraints. So i guess this is step one. What i suggest is to make meshing of the constraints possible, as opposed to the particle itself.

The benefit of this is:

  1. We get to see the constraints for visualization purposes.
  2. We can get cleaner meshes when creating surfaces in geonodes.

Here is an example from Houdini:

Constraint_geometry

ImportError: cannot import name 'core' from 'molecular-plus-main' (C:\Users\agrow\AppData\Roaming\Blender Foundation\Blender\3.4\scripts\addons\molecular-plus-main\__init__.py)

Traceback (most recent call last):
File "D:\SteamLibrary\steamapps\common\Blender\3.4\scripts\modules\addon_utils.py", line 369, in enable
mod.register()
File "C:\Users\agrow\AppData\Roaming\Blender Foundation\Blender\3.4\scripts\addons\molecular-plus-main_init_.py", line 41, in register
from . import properties, ui, operators, creators, addon_prefrences
File "C:\Users\agrow\AppData\Roaming\Blender Foundation\Blender\3.4\scripts\addons\molecular-plus-main\operators.py", line 8, in
from . import simulate, core
ImportError: cannot import name 'core' from 'molecular-plus-main' (C:\Users\agrow\AppData\Roaming\Blender Foundation\Blender\3.4\scripts\addons\molecular-plus-main_init_.py)

Add "Links" to panel.

I suggest adding the "Links at birth" and "Link with Others at birth" in panel for ease of access.

Very commonly used settings should be exposed.

links

Update for 4.0

Blender update 4.0 introduced addon breaking bugs. Basically not usable with 4.0.

Some of the various errors ive come across:

4 0_errors

Meshing of particles.

Feature request for meshing particle system with geonodes.

  1. You click button in menu.
  2. It adds a single vertex.
  3. It adds "Particle Instance" modifier on it, and assigns the particle system
  4. It adds a geonodes setup to convert to volume, then back to mesh.

Example meshing setup:

meshing

Baking has a rare chance of getting permanently stuck

I'm not quite sure what happened. I was baking a particle simulation, and I might have pressed spacebar while it still baking. Next thing I know, I couldn't cancel it. I pressed the Cancel button multiple times, but I got nothing. Thankfully, Blender made some backups and everything I needed was recovered. Still, this is a concerning bug.

Here is a google drive link for the bugged project. Maybe it can help:
https://drive.google.com/file/d/16g0Pl90pqxQaerEGchHE8Fq6HEcUl-Tc/view?usp=share_link

In it, Sphere.001 has a particle simulation that can't be cancelled. I tried assigning the Free All Bakes button to Quick Favorites but that didn't help.

Set custom bake range?

It would be really nice if I could set a custom range to bake without changing the render range. My particles don't spawn in until almost frame 300, but I am forced to bake all the empty frames before that.

Visualization of Weakmaps.

Theres currently no way of visualizing the weakmap on the points, which is very cumbersome/unintuitive from an artists perspective.

How this would be implemented, i do not know. But i imagine a simple check box in panel for "Visualize Weakmap".
Plus also, a checkbox for "Use Weakmap", and a dropdown to choose your texture for convenience sake?

weakmaps

Stuck on process

Hi, I ended up being stuck on "processing", the cancel button doesn't work, restarting or removing the add-on also doesn't.
Screenshot 2023-09-29 at 17 04 30

Any ideas?

UV Baking

When I tried to bake UV blender always crashes, I didn't know what could go wrong here( my desktop, the addon or blender itself). Have a pretty strong machine with 3060 32gigs and i5 10400 so I don't think that's a problem
I'll put my file below.
Thanks in advance
Test4.zip
e

Does not work on macOS M1

When installing the addon I am getting error:

Traceback (most recent call last):
File "/Applications/Blender.app/Contents/Resources/3.0/scripts/modules/addon_utils.py", line 387, in enable
mod.register()
File "/Users/jimmygunawan/Library/Application Support/Blender/3.0/scripts/addons/molecular/init.py", line 42, in register
from . import properties, ui, operators, creators
File "/Users/jimmygunawan/Library/Application Support/Blender/3.0/scripts/addons/molecular/operators.py", line 14, in
from . import simulate, core
ImportError: dlopen(/Users/jimmygunawan/Library/Application Support/Blender/3.0/scripts/addons/molecular/core.cpython-39-darwin.so, 0x0002): tried: '/Users/jimmygunawan/Library/Application Support/Blender/3.0/scripts/addons/molecular/core.cpython-39-darwin.so' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e')), '/usr/lib/core.cpython-39-darwin.so' (no such file)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.