OpenFX-based 3D Mesh Effect API

29 views
Skip to first unread message

Élie Michel

unread,
Jun 21, 2020, 12:30:36 PM6/21/20
to ofx-dis...@googlegroups.com
Hello dear fellow OpenFX users!

I'd like to introduce an API I have been working on which is based on OpenFX and intends to reproduce what has been done for Image Effects but for 3D Meshes.

It is worth noting that I did not come with the idea of "I'm gonna add support for 3D to OpenFX" but rather "The API I'm working on has a lot in common with OpenFX, let's not reinvent the wheel and reuse what can be reused from OpenFX".

Houdini or Maya's nodes are a bit like Nuke/Natron's nodes but processing 3D. Blender or 3ds Max modifiers are mesh effect stacks a bit like an After Effect comp is a stack of image effects. In all cases there are parameters etc.

So here is the current state of the draft I'd be pleased to have feedback about: https://openmesheffect.org/

Here is an example of host (supporting only the Mesh Effect API, not the Image Effect one) added to Blender: https://github.com/eliemichel/OpenMeshEffectForBlender

And here is a blog post presenting the project: https://blog.exppad.com/article/the-need-for-open-mesh-effect

I am particularly interested in design issues that occured with the Image Effect API during its development so that we can avoid it in this one!

Regards,
Élie

Dithermaster

unread,
Jun 22, 2020, 9:33:45 AM6/22/20
to ofx-dis...@googlegroups.com
Élie Michel, nice work! I agree with your idea to re-use the groundwork of plug-in discovery & enumeration, parameter lists, and suites. We've done it ourselves for image file reading and writing. I hope your idea goes far!

Forgive what might be a naive question: Could this be used for point clouds too, or are those another beast? Are point clouds just meshes without connectivity (yet)? They both can have vertex colors.

///d@


--
You received this message because you are subscribed to the Google Groups "ofx-discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ofx-discussio...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ofx-discussion/CAFjdv9CnNAydYuAfRMiTW7NrQqGq3W7XwVTtGXitKybCDS9FVA%40mail.gmail.com.

Élie Michel

unread,
Jun 22, 2020, 10:41:56 AM6/22/20
to ofx-dis...@googlegroups.com
Yes it handles point clouds just as meshes without connectivity. You can attach arbitrary attribute data to the points (color, size, velocity, etc.). The mesh data representation is widely inspired by Houdini.
It is limited to mesh-based geometry though, so there is no support so far for e.g. VDBs or implicit surfaces (like SDFs).

É.

Gary Oberbrunner

unread,
Jun 22, 2020, 10:49:02 AM6/22/20
to ofx-dis...@googlegroups.com
I agree with Dennis -- looks like nice work, Élie. This is exactly the kind of extension the original OpenFX API was designed for, and I'm really glad to see someone making use of that. I hope it does well!

(As a former plugin writer and current Blender user, I also wish Blender would support OFX image plugins directly in the compositor -- but that's another story.)

-- Gary



--
Gary

PierreJasmin_REVisionEffects

unread,
Jun 26, 2020, 1:15:47 AM6/26/20
to ofx-discussion

I think it's cool, also how you use the openFx api to workaround Blender licensing and got them to approve it's fine to do it like that :)

Note we have SetOfxHost now (only implemented as far as know by 2 hosts so far) which would allow one to pre-know before loading if there is an openFxmesh supported.
I am not quite clear how it works with Blender code base, would there be a way to have an OfxMeshEffect and OfxImageEffect in same plugin?

I am thinking of organizing an online meeting to beef up our educational, R&D, academic etc activities, this could be a nice presentation and occasion to collect feedback.  Also because we applied to Github sponsors and who knows (random example) the Blender Foundation might be interested?  Will flesh out ideas elsewhere, many things I would like to learn :)

What would be relationship of such project with Open3D? (if any)



Anyhow toonboom animation (maybe talk to Marc-André Bouvier-Pelletier at some point...) that has some support for OpenFX was asking a while ago about extending OFX for vector graphics in OpenFX, that would be an example.

I think the retrospection is the host you imagine this would work in are not the hosts that will support this in 10 years :) 

Pierre

Élie Michel

unread,
Jun 26, 2020, 4:01:22 AM6/26/20
to ofx-dis...@googlegroups.com

Hello Pierre,

Yes I discovered SetOfxHost lately and it is a good news because I've had to add an extra entry point eventually: https://github.com/eliemichel/OpenMeshEffect/blob/master/doc/guide/reference.md#the-ofxsetbundledirectory-symbol
but this could be replaced by SetOfxHost  (it's on the todo list: https://github.com/eliemichel/OpenMeshEffect/issues/4 )

Regarding the idea to support both image effects and mesh effects: Currently it is possible to package one of each in the same ofx bundle, my branch would simply ignore the image effects and load the mesh effects. I've been focusing my work so far on the code related to what blender calls "modifiers", which are basically a stack of mesh effects (like the stack of image effects in After for instance) and so there is nothing related to compositing there. The base host code could be shared if wanting to implement Image effects in the compositor I think.

As I wasn't sure I'd use the "official" OpenFX at first, cause I didn't know if I could fit all I wanted in it, I did not use any of the HostSupport code. I believe that now that I know that OpenFX is a good base for what I'm doing, I should maybe start over with this. Or at least for implementing the Image Effect API. What do you think about this? I have anyway the feeling that my code is not so clean and I'm tempted to switch to C++ (it's in C so far).

I could do a presentation if there's an online meeting, indeed! At this point I don't know the motivation of the Blender Foundation regarding my project, I haven't had any official feedback.

There is not really a relation with Open3D. Actually one can use Open3D -- which is a library -- to write a plugin, but the library is not a plugin API. Another good library for writing plugins is libIGL https://libigl.github.io/

É.



--
You received this message because you are subscribed to the Google Groups "ofx-discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ofx-discussio...@googlegroups.com.

PierreJasmin_REVisionEffects

unread,
Jun 26, 2020, 4:10:20 PM6/26/20
to ofx-discussion


On Friday, June 26, 2020 at 1:01:22 AM UTC-7, Élie Michel wrote:

Hello Pierre,

Yes I discovered SetOfxHost lately and it is a good news because I've had to add an extra entry point eventually: https://github.com/eliemichel/OpenMeshEffect/blob/master/doc/guide/reference.md#the-ofxsetbundledirectory-symbol
but this could be replaced by SetOfxHost  (it's on the todo list: https://github.com/eliemichel/OpenMeshEffect/issues/4 )

Regarding the idea to support both image effects and mesh effects: Currently it is possible to package one of each in the same ofx bundle, my branch would simply ignore the image effects and load the mesh effects. I've been focusing my work so far on the code related to what blender calls "modifiers", which are basically a stack of mesh effects (like the stack of image effects in After for instance) and so there is nothing related to compositing there. The base host code could be shared if wanting to implement Image effects in the compositor I think.

As I wasn't sure I'd use the "official" OpenFX at first, cause I didn't know if I could fit all I wanted in it, I did not use any of the HostSupport code. I believe that now that I know that OpenFX is a good base for what I'm doing, I should maybe start over with this. Or at least for implementing the Image Effect API. What do you think about this? I have anyway the feeling that my code is not so clean and I'm tempted to switch to C++ (it's in C so far).

The historical reason we use for the interface plain C is because of class name mangling (binary compatibility across compiler version). In our context we are dynamic libraries and two software have compiled against the header files and they might not use the same version even if they used the same compiler. For a single target (a native API for one host only) it could make sense to do that but here we are like 10 hosts and 10 plugin developers for example, there is no way we can enforce to compile on a particular compiler/version. There are probably since C++11 some alternative methodologies but as far as I know they are even more obstuse than that. You can though wrap the C interface definitions in a C++ wrapper and make support code that is derived from these C++ classes and provide the examples code using the C++ interface so people learn it like that.  You can assume everyone compiles using a C++ compiler, you should not assume everyone can use C++17 constructs maybe....




 

I could do a presentation if there's an online meeting, indeed! At this point I don't know the motivation of the Blender Foundation regarding my project, I haven't had any official feedback.

OK, I will be back in a bit about that
 
To unsubscribe from this group and stop receiving emails from it, send an email to ofx-discussion+unsubscribe@googlegroups.com.

Gary Oberbrunner

unread,
Jun 26, 2020, 6:43:00 PM6/26/20
to ofx-dis...@googlegroups.com
I personally would not suggest using the host support C++ lib, or maybe just cherry-pick a few nice things from it. It's pretty out of date at this point.
As for writing in C++, you should definitely feel free to write C++ internally! Just export the (very few, by design) OFX public symbols as C-only. That way you're immune to C++ ABI issues as Pierre says.

To unsubscribe from this group and stop receiving emails from it, send an email to ofx-discussio...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "ofx-discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ofx-discussio...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ofx-discussion/4a773997-f902-46b8-b4b5-a0031b110726o%40googlegroups.com.


--
Gary

PierreJasmin_REVisionEffects

unread,
Jul 9, 2020, 1:17:45 PM7/9/20
to ofx-discussion


On Friday, June 26, 2020 at 1:01:22 AM UTC-7, Élie Michel wrote:

 I've been focusing my work so far on the code related to what blender calls "modifiers", which are basically a stack of mesh effects (like the stack of image effects in After for instance) and so there is nothing related to compositing there. The base host code could be shared if wanting to implement Image effects in the compositor I think. 

They are likely better using Natron or free fusion etc if they are on a $0.00 budget than the built-in compositor in general, although it's nice to be able to put an image plane transform that can be queried by effect in compositing context, what we did when we had Softimage plugins here.  I was thinking more directly perhaps related to Video Sequence Editor and Movie Clip Editor to source image sequences - although these in Blender are pretty useless by themselves -- e.g. in context of photogrammetry, tracking,... for example would be cool if https://keentools.io/ or r3ds could work in OpenFX - it does seem keen works in Blender now, or any ways to do landmark tracking to feed some mesh deformations)..  
Reply all
Reply to author
Forward
0 new messages