MiLiAN GPU Simulation framework. Framework available, integration with Blender?

The answer to that question is drastically different depending if you’re trying to integrate a proprietary piece of code you want to keep to your self or perhaps sell as an extension, or want to make blender better for everyone and contribute it to core blender.

However that decision isn’t a technical one, and one only you can make, sort that one out and technical options will either open up or close off for you.

1 Like

Understood.
Contributing to the core means adhering to the existing license model, I see no dispute about that. Making an addon can be different, but if changes are required to the core, before some addons or systems make sense, then both are an option. I would not have asked about the core thing if I was categorically unwilling to accept open source terms :wink: Perhaps I should have made this more clear.

Regardless, time is a thing and I will have to decide based on other factors as well, what I can or will do.

2 Likes

Contributing to the core means adhering to the existing license model, I see no dispute about that. Making an addon can be different

It really doesn’t, lets say we live in a perfect world, and we had a top of the line C++ plug-in SDK, with no bugs, and every nook and cranny of blender was exposed in the ideal way, that SDK would have no choice but to be under the GPL license since it interfaces with our existing codebase, hence if your addon would link this SDK wouldn’t have a choice to have a GPL compatible license either. Nothing changes license wise regardless of the route you choose to take. For better or for worse it is what it is.

Please elaborate on the relationship between intellectual property and open source, as you understand it. Either I got something wrong or we are both missing something.

If you have a specific questions, I can surely give a whirl at answering them

1 Like

If all addons are considered “derivative” in the sense that blender is not only a platform but entirely the enabler, then (gray area still) I would understand that closed source or IP is not a thing.

However, if blender is barely used to display and interact whatever an outside application provides, then it seems things are different. So far, I only ever had one instance where agreements failed because of this question (IP vs open source and its gray areas).

If the community by definition cannot or will not accept protected IP and thus closed source in their ecosystem (addons), then yes, I see, this whole situation is absurd until that decision is made.

So the question must be:
Is any intellectual property really protected in this ecosystem?

It’s really not about the community accepting anything, you link GPL code, you need a GPL compatible license, the license says so, it’s not a popularity context, where the feelings of the community get to decide what it means. For better or for worse, blender is GPL and at this point, it’s nearly impossible to change that. If that’s a deal breaker for you, the only way forward is to shake hands and part ways.

1 Like

I understand where youre coming from but how does redshift for blender work? All open source code? From maxon??

Don’t know, never used it, maybe they found some clever loop hole, maybe they didn’t, either way, i doubt the blender developer community is the ideal place to get hints and tips on how to best not comply with their license.

1 Like

Obviously. That is not what I am trying to do, I have published quite a few things so far. No need for me to be an ahole and assume that people here are stupid enough to let a stranger trick them into exploits. Informed decisions though.

If anybody has more to add (technically, original questions / concerns), I would love to hear it. If We are now stuck in license and ideology talk, this is the wrong thread. Thanks for your patience so far :slight_smile:

Educated guess, based on what Psoft does: the addon that acts as a bridge to Redshift is open source.

3 Likes

Um… @LazyDodo , this isn’t true, you can have an open-source bridge that connects Blender to a closed-source app. Many, many, many, add-ons do this. It’s called the “arms-length” principle and it’s built into GPL licensing

2 Likes

Different problem, the context here is “if there was an addon SDK” anything linking said SDK would have to be GPL compatible.

Like i said, the choice between integrate into core vs external addon will gave drastically different paths forwards and until @yannik_f makes that choice, it’s pointless to spin our wheels on things that may or may not be applicable.

I would say that yes, all addons are considered “derivative works” (under the meaning defined in the GPL). Or to be more precise, all addons that import bpy (or any GPL-licensed library) must adhere to the terms of the GPL, which means they themselves must be licensed under a GPL-compatible license. I base this interpretation on the Software Freedom Law Center Guide to GPL Compliance 2nd Edition (Eben Moglen & Mishi Choudhary):

When two software components are joined together to make one work (whether a main and some library subroutines, two objects with their respective methods, or a program and a “plugin”) the combination infringes the copyright on the components if the combination required copyright permission from the component copyright holders, and such permission was either not available or was available on terms that were not observed.

That doesn’t mean the addon can’t be commercialized. You have the right to change Blender in any way you see fit. You can integrate your proprietary engine to your heart’s content. However, if you then “distribute” your modified work you must comply with the terms of the license You must give your customers the same freedoms you had when developing your product by adopting a GPL-compatible license.

This is summarized by the Free Software Foundation thusly:

“Free software” means software that respects users’ freedom and community. Roughly, it means that the users have the freedom to run, copy, distribute, study, change and improve the software. Thus, “free software” is a matter of liberty, not price. To understand the concept, you should think of “free” as in “free speech,” not as in “free beer.” We sometimes call it “libre software,” borrowing the French or Spanish word for “free” as in freedom, to show we do not mean the software is gratis.

You may have paid money to get copies of a free program, or you may have obtained copies at no charge. But regardless of how you got your copies, you always have the freedom to copy and change the software, even to sell copies.

As an aside: I would shy away from using the term “Intellectual Property” as it is at best ambiguous and at worst meaningless. There is copyright, there are patents and there are trademarks.

Just my opinion on the matter.

2 Likes

Wheres Ton with his boxes when people are in need :man_superhero:

5 Likes

Thank you for summing this up. I think my understanding is in line with what you are writing / referring to.

1 Like

in my try to create a Blender addon for simulation so far I noticed as you already mentioned, that because Blender uses Python to update UI and python will be limited by GIL lock you will be limited by it and you can not use a really multithreaded solution to update UI directly, especially with any change context itself will be invalidated and you need to deal with lots of error and crashes.
even though you use no gil and other stuff the limitation of updating UI will always be the same. export and import data to Blender will follow the same rules, so be aware of that and do not waste your time on it as me.
The only real solution that I found was is to create another thread to manage the process alongside Python on completely separate tread/threads this process will run the simulation in the background and save the caches then I create a second thread to check for caches if any cache is available it will load them and update UI by using single main UI thread.

so far I got very good results but way far from the performance of my original code.
for example, if I’ll be able to simulate 90 frames of 5 million particles in 8 minutes in my stand-alone C++ version of code. the same process will take about 41 minutes in Blender with shame code due to import/export and updating Blender UI using only one thread, etc.
MesherSDF



you can find a few examples of my multiphysics addon for the blender on blender artists forum https://blenderartists.org/t/tangra-multiphysics-node-base-engine-for-blender/1536677 or in my Discord server https://discord.gg/zZHSG5nYSM because this forum won’t let me upload videos yet.

9 Likes

I don’t think it’s a good idea to make people join your Discord first to see what you’re working on. You should have posted this link instead - TAngra multiphysics node base engine for Blender - Released Scripts and Themes - Blender Artists Community. Viewing that makes joining your Discord a lot more appealing.

1 Like

Thank you for your specific input wrt. threads and UI updates! Those are usually a real pain, with other host-apps as well. Your work looks very interesting, I hope you can take it further. If you need any kind of input or ideas regarding solvers, let’s talk.

If you really have an overhead of 30+ minutes on what I would consider a small sim, and you are (so far) certain there is no better way, then I think I need to really reconsider this or at least figure out a concept to only display reduced information at all times.

My framework has a simple window, showing what is going on outside of any host. It can be enabled or disabled, perhaps even that is an option, one can capture image sequences and keep an eye on the madness without having to move any data to or through blender / host. No fancy graphics, just points, but it helps.

Thank you for your suggestion as you mentioned I added a blender artists thread here. by the way, i tried to upload a video here but this forum does not let me post videos here. it says you don’t have permission to upload videos, can you help me with that?