OFX Plugin Examples

Get answers to your questions about color grading, editing and finishing with DaVinci Resolve.
  • Author
  • Message
Offline
User avatar

Gary Hango

  • Posts: 884
  • Joined: Mon Apr 09, 2018 10:35 pm
  • Location: Left Coast
  • Real Name: Gary Hango

OFX Plugin Examples

PostWed Aug 14, 2019 4:42 am

I'm delving into creating OFX plugins and was able to compile and use the example plugin source code that installs with Resolve. I need an example of how to use the Choice Parameter so I can have a list of choices presented on the effects settings. The included examples show floating point and integer sliders, and a Boolean check box, but not a list box. Any help here?

Thanks.
Microsoft Windows 10 Pro x64
Intel(R) Core(TM) i7-6700, 3.40GHz, 32.0 GB
MB: MSI, BIOS: American Megatrends Inc. A.60, 12/17/2015
NVIDIA GeForce GTX 960, 2Gb
Resolve 18.1.1.0007(Free)
Offline

Kel Philm

  • Posts: 604
  • Joined: Sat Nov 19, 2016 6:21 am

Re: OFX Plugin Examples

PostWed Aug 14, 2019 6:49 am

Maybe post the question over here:

viewforum.php?f=12
Offline

Hendrik Proosa

  • Posts: 3015
  • Joined: Wed Aug 22, 2012 6:53 am
  • Location: Estonia

Re: OFX Plugin Examples

PostWed Aug 14, 2019 9:56 am

Look into OFX documentation, specifically chapter 9. Effect parameters:
http://openfx.sourceforge.net/Documenta ... index.html
I do stuff.
Offline
User avatar

Gary Hango

  • Posts: 884
  • Joined: Mon Apr 09, 2018 10:35 pm
  • Location: Left Coast
  • Real Name: Gary Hango

Re: OFX Plugin Examples

PostWed Aug 14, 2019 1:52 pm

Hendrik Proosa wrote:Look into OFX documentation, specifically chapter 9. Effect parameters:
http://openfx.sourceforge.net/Documenta ... index.html

Yes, I did read these, and I will study them more, but it’d really be nice to see how it’s actually used by example.
Microsoft Windows 10 Pro x64
Intel(R) Core(TM) i7-6700, 3.40GHz, 32.0 GB
MB: MSI, BIOS: American Megatrends Inc. A.60, 12/17/2015
NVIDIA GeForce GTX 960, 2Gb
Resolve 18.1.1.0007(Free)
Offline
User avatar

Gary Hango

  • Posts: 884
  • Joined: Mon Apr 09, 2018 10:35 pm
  • Location: Left Coast
  • Real Name: Gary Hango

Re: OFX Plugin Examples

PostWed Aug 14, 2019 2:05 pm

Kel Philm wrote:Maybe post the question over here:

viewforum.php?f=12

Done. Thank you.
Microsoft Windows 10 Pro x64
Intel(R) Core(TM) i7-6700, 3.40GHz, 32.0 GB
MB: MSI, BIOS: American Megatrends Inc. A.60, 12/17/2015
NVIDIA GeForce GTX 960, 2Gb
Resolve 18.1.1.0007(Free)
Offline

Martin Schitter

  • Posts: 899
  • Joined: Tue Apr 28, 2015 10:41 pm

Re: OFX Plugin Examples

PostWed Aug 14, 2019 2:12 pm

Gary Hango wrote:
Hendrik Proosa wrote:...but it’d really be nice to see how it’s actually used by example.


https://github.com/baldavenger/BaldavengerOFX
https://github.com/NatronGitHub/openfx-misc
Offline
User avatar

Gary Hango

  • Posts: 884
  • Joined: Mon Apr 09, 2018 10:35 pm
  • Location: Left Coast
  • Real Name: Gary Hango

Re: OFX Plugin Examples

PostWed Aug 14, 2019 2:33 pm

Martin Schitter wrote:
Gary Hango wrote:
Hendrik Proosa wrote:...but it’d really be nice to see how it’s actually used by example.


https://github.com/baldavenger/BaldavengerOFX
https://github.com/NatronGitHub/openfx-misc

Martin, I have looked at these, but they seem to not be following the same syntax as the Resolve examples. They also don’t give examples to use CUDA and OpenCL.
Microsoft Windows 10 Pro x64
Intel(R) Core(TM) i7-6700, 3.40GHz, 32.0 GB
MB: MSI, BIOS: American Megatrends Inc. A.60, 12/17/2015
NVIDIA GeForce GTX 960, 2Gb
Resolve 18.1.1.0007(Free)
Offline

Martin Schitter

  • Posts: 899
  • Joined: Tue Apr 28, 2015 10:41 pm

Re: OFX Plugin Examples

PostWed Aug 14, 2019 3:26 pm

Gary Hango wrote:Martin, I have looked at these, but they seem to not be following the same syntax as the Resolve examples. They also don’t give examples to use CUDA and OpenCL.


yes resolve provides a few proprietary non-standard conform extensions and doesn't support some of the more common openfx API suites. compatible support of GPU acceleration is still a very problematic demand in this regard.
Offline

Rohit Gupta

Blackmagic Design

  • Posts: 1628
  • Joined: Wed Aug 22, 2012 5:00 am

Re: OFX Plugin Examples

PostWed Aug 14, 2019 3:27 pm

Martin Schitter wrote:
Gary Hango wrote:Martin, I have looked at these, but they seem to not be following the same syntax as the Resolve examples. They also don’t give examples to use CUDA and OpenCL.


yes resolve provides a few proprietary non-standard conform extensions and doesn't support some of the more common openfx API suites. compatible support of GPU acceleration is still a very problematic demand in this regard.


What suite are you missing Martin?
Rohit Gupta

DaVinci Resolve Software Development
Blackmagic Design
Offline

Martin Schitter

  • Posts: 899
  • Joined: Tue Apr 28, 2015 10:41 pm

Re: OFX Plugin Examples

PostWed Aug 14, 2019 3:36 pm

Rohit Gupta wrote:What suite are you missing Martin?


better support for generator contexts, because this would open the possibility to implement and use third party file readers (e.g. https://github.com/MrKepzie/openfx-io )
Offline
User avatar

Gary Hango

  • Posts: 884
  • Joined: Mon Apr 09, 2018 10:35 pm
  • Location: Left Coast
  • Real Name: Gary Hango

Re: OFX Plugin Examples

PostWed Aug 14, 2019 4:27 pm

Rohit, any chance we could get a few more plugin examples that show how to use more parameter types?
Microsoft Windows 10 Pro x64
Intel(R) Core(TM) i7-6700, 3.40GHz, 32.0 GB
MB: MSI, BIOS: American Megatrends Inc. A.60, 12/17/2015
NVIDIA GeForce GTX 960, 2Gb
Resolve 18.1.1.0007(Free)
Offline

Paul Dore

  • Posts: 110
  • Joined: Thu Dec 04, 2014 6:00 pm

Re: OFX Plugin Examples

PostWed Aug 14, 2019 4:49 pm

Gary Hango wrote:
https://github.com/baldavenger/BaldavengerOFX
https://github.com/NatronGitHub/openfx-misc
Martin, I have looked at these, but they seem to not be following the same syntax as the Resolve examples. They also don’t give examples to use CUDA and OpenCL.


Look again. Baldavenger OFX Plugins are written specifically for Resolve, and nearly all include a CUDA kernel (some also use OpenCL). Many feature the Choice Parameter extensively e.g. ACES OFX, HueConverge, Convolution, etc.
Offline
User avatar

Jean Claude

  • Posts: 2973
  • Joined: Sun Jun 28, 2015 4:41 pm
  • Location: France

Re: OFX Plugin Examples

PostWed Aug 14, 2019 5:20 pm

@Gary,

Look in 1st time the source 'Gainplugin' which is in the directory 'Developer' delivered with Davinci Resolve.

You have to understand the functional in 'GainPlugin.cpp'. How are the directions structured between CUDA, OPENCL and METAL.

Then: see cuda file (CudaKernel.cu), OPENCL (OpenCLKernel.cpp) and METAL (MetalKernel.mm)

As Paul said (Hi Paul), you will find in his collection of OFX source all sorts of settings and how to implement them.

Download the sources (https://github.com/baldavenger/BaldavengerOFX)

Download the OFX (https://github.com/baldavenger/BaldavengerPlugins). You install them and you inspect them. When a parameter offers one of those you are looking for ... opens the source project via Visual Studio. You will find the source code.

Start with GainPlugin and check with you that it works. No need to go further as this OFX will not work:
Make sure you have the right CUDA.SDK libraries, etc ...
(just a feedback)

Heu for METAL: if you're not with MAC. You forget.

Hope this helps you. I can not anymore.. :)
"Saying it is good, but doing it is better! "
Win10-1809 | Resolve Studio V16.1 | Fusion Studio V16.1 | Decklink 4K Extreme 6G | RTX 2080Ti 431.86 NSD driver! |
Offline
User avatar

Gary Hango

  • Posts: 884
  • Joined: Mon Apr 09, 2018 10:35 pm
  • Location: Left Coast
  • Real Name: Gary Hango

Re: OFX Plugin Examples

PostWed Aug 14, 2019 7:51 pm

Paul Dore wrote:
Gary Hango wrote:
https://github.com/baldavenger/BaldavengerOFX
https://github.com/NatronGitHub/openfx-misc
Martin, I have looked at these, but they seem to not be following the same syntax as the Resolve examples. They also don’t give examples to use CUDA and OpenCL.


Look again. Baldavenger OFX Plugins are written specifically for Resolve, and nearly all include a CUDA kernel (some also use OpenCL). Many feature the Choice Parameter extensively e.g. ACES OFX, HueConverge, Convolution, etc.

Paul, you’re right. I actually missed your collection of plugin source code. I perused the Natron code and the OpenFX 1.4 examples. I’m looking at your code now and have to say it’s a treasure trove of examples. Thanks for sharing them.
Microsoft Windows 10 Pro x64
Intel(R) Core(TM) i7-6700, 3.40GHz, 32.0 GB
MB: MSI, BIOS: American Megatrends Inc. A.60, 12/17/2015
NVIDIA GeForce GTX 960, 2Gb
Resolve 18.1.1.0007(Free)
Offline
User avatar

Gary Hango

  • Posts: 884
  • Joined: Mon Apr 09, 2018 10:35 pm
  • Location: Left Coast
  • Real Name: Gary Hango

Re: OFX Plugin Examples

PostWed Aug 14, 2019 10:53 pm

Paul, I notice that your code uses some include files not in the OpenFX 1.4 include directory. They start with ofxs__.h. The ones in the 1.4 directory are ofx__.h. These seem to be "Hack" files from the TuttleOFX sources. How do I include these in the Resolve installed examples. Namely, "ChoiceParamDescriptor"?

Thanks.
Microsoft Windows 10 Pro x64
Intel(R) Core(TM) i7-6700, 3.40GHz, 32.0 GB
MB: MSI, BIOS: American Megatrends Inc. A.60, 12/17/2015
NVIDIA GeForce GTX 960, 2Gb
Resolve 18.1.1.0007(Free)
Offline
User avatar

Gary Hango

  • Posts: 884
  • Joined: Mon Apr 09, 2018 10:35 pm
  • Location: Left Coast
  • Real Name: Gary Hango

Re: OFX Plugin Examples

PostThu Aug 15, 2019 10:10 pm

Gary Hango wrote:Paul, I notice that your code uses some include files not in the OpenFX 1.4 include directory. They start with ofxs__.h. The ones in the 1.4 directory are ofx__.h. These seem to be "Hack" files from the TuttleOFX sources. How do I include these in the Resolve installed examples. Namely, "ChoiceParamDescriptor"?

Thanks.

Never mind. I figured it out. The Resolve examples are already using the ofxs__.h headers. For the ChoiceParamDescriptor function I had to add OFX:: in front of it like all the others in the Resolve examples.

I got my plugin to add the list of choices. Now I just have to add the logic in the code to switch to the different methods.

Thanks again.
Microsoft Windows 10 Pro x64
Intel(R) Core(TM) i7-6700, 3.40GHz, 32.0 GB
MB: MSI, BIOS: American Megatrends Inc. A.60, 12/17/2015
NVIDIA GeForce GTX 960, 2Gb
Resolve 18.1.1.0007(Free)

Return to DaVinci Resolve

Who is online

Users browsing this forum: Google [Bot], jtfgrading, Lucius Snow, panos_mts, robwuijster, Steve Alexander and 157 guests