Texture FX+ (VL.Addons)

Hey,

we (@lecloneur & me) have just released a new version of VL.Addons which (at least for now) contains the all new Texture FX+.

Compute Inputs

Nearly all inputs are now of type compute.
This allows to use the texture output of one effect to be used as input parameter for another (via ColorMap, ValueMap and the various ShaderFX Vector and Operation nodes).

ShaderFX  Vector ValueMap + ShaderFX Operations

There is currently one snag, while floats & vector types can be input directly via io-box you have to use a ColorIn node to input a color. Chances are good though that this is going to be rectified soonish.

Wrappers

All shader files are made Internal and are wrapped in a class. Those classes all implement the interface ITextureFX and depending on their “catgory” additionally either IFilter, IMixer or ISource. (Utils currently are either IFilter or ISource). While ITextureFX comprises the operations and parameters that are common to all TFX, the others contain those that are only available in their respective category. Also all (most) TFX have another member operation called SetParameters which is not part of any interface and specific to the particular node.

For filters that consist of more than one shader file aka “mulitpass” we were not quite sure on which member operation (Update, SetTexture, GetTexture) to pass the texture between the shaders and would really appreciate some feedback on this.

The interfaces are Advanced so you’ll only see them if the respective checkbox in the node browser is checked.

To see an application of the interfaces check the explanation patch called “Strategy Pattern”.

For those who want to add their own effects :
There are templates for Filter, Mixer and Source that can be found in those same categories in a comment inside the definitions.
Please use them since it makes sure that the colors of the member operations stay consistent.

What you’ll get

With this release we are just shy of 200 nodes (199 tbp). The bulk are TextureFX with some ShaderFX sprinkled on top.

SFX Node List
  • ColorMap
  • ColorMatrix [same as TFX with ComputeFloat4 as in/output instead of texture]
  • Invert [currently broken, enum doesn’t update seems to be a vvvv bug]
  • Transform (Color) [currently broken, also most likely caused by a vvvv bug]
  • ValueMap
  • Vector2
  • Vector3
  • Vector4 (Vector2)
TFX Node List
Sources
  • BubbleNoise
  • Checkerboard
  • Color
  • ColorPalette
  • Electricity
  • Emboss
  • Gradient
  • Grain
  • Halo
  • Halo (Gradient)
  • Halo (Rectangle)
  • Hex
  • JoinChannels
  • Lava
  • Liquish
  • Mandelbrot
  • Neurons
  • Noise
  • Perlin
  • Pillow
  • Plasma
  • QuasiCrystal
  • Reaction Diffusion
  • Square
  • TexCoord
  • Voronoi
  • Voronoi (Border)
  • Voronoi (Dots)
  • Voronoi (Inside)
  • Voronoise
Mixers
  • BandedSwirl
  • Blend
  • Blind
  • Blood
  • Circle (Reveal)
  • Circle (Stretch)
  • Dissolve
  • DropFade
  • Leaking
  • Ripple
  • Slide
  • Wave
Filters
  • AdaptiveSharpen
  • Anaglyph
  • AngularFlow
  • ASCII
  • AutoColor
  • Average
  • BackgroundSubtraction
  • Bias
  • Blur
  • Blur (Directional)
  • Blur (Flow)
  • Blur (Glow)
  • Blur (Max)
  • Blur (Mips)
  • Blur (Noise)
  • Blur (NoMips)
  • Blur (Radial 3D)
  • Blur (Radial)
  • Blur (Perfector)
  • Bump
  • CameraMotionBlur [currently broken]
  • CartesianToPolar
  • Cartoon
  • Charcoal
  • Clamp
  • Colorama
  • ColorGrading
  • Colorize
  • ColorMatrix
  • ColorWaveShaper
  • ComputeFeedback
  • ConvertColor
  • ConvertColorspace
  • Convolution
  • Crop
  • CrossStitch
  • CRT
  • DeBayer
  • DeInterlace
  • Dilate
  • Displace
  • Displace (Channel)
  • Displace (Echo)
  • Displace (Height)
  • Displace (Warp)
  • Distort (Flow)
  • Distort (Sin)
  • Dither
  • Dithering (Noise)
  • Dots
  • DropShadow
  • Droste
  • Echo
  • Edge
  • Emboss
  • Erode
  • FluidSolver
  • FrameDifference
  • Frost
  • Garbage
  • GetChannel
  • Glitch
  • Glow
  • Glow (Radial)
  • GradientMap
  • Grain
  • Growth
  • Halftone
  • Hatch (Square)
  • Hatch (Cross)
  • Hatch (Dot)
  • Hatch (FromTexture)
  • Hatch (Line)
  • Hexagonize
  • Highlights
  • HighPass
  • HSCB
  • Invert
  • Kaleidoscope
  • Keying (Channel)
  • Keying (Chroma)
  • Keying (Luma)
  • Levels
  • Light (2d)
  • LinearDepth
  • Lomograph
  • Magnify
  • MapColor
  • Median
  • Metallica
  • Midtones
  • Mosaic
  • Muffy
  • NormalGlow
  • NormalMap
  • OldGlass
  • OpticalFlow
  • OpticalFlow (HS)
  • OpticalFlow (LK)
  • PhotoFilm
  • PolarToCartesian
  • Posterize
  • Pulse
  • Quantize
  • RemoveGrain
  • Resize
  • Ringbuffer
  • Rotate
  • Scale
  • Scanline
  • Seamless
  • SetAlpha
  • SetChannel
  • Shadow (Height)
  • Shadows
  • Sharpen
  • ShiftRGB
  • Sift (HSV)
  • SpreadSampling (Circle)
  • SpreadSampling (Linear)
  • SpreadSampling (Random)
  • Swizzle
  • Threshold
  • Threshold (Discard)
  • Tiles
  • Tonemap
  • Tonemap (Exponential)
  • Tonemap (Filmic Alu)
  • Tonemap (Filmic U2)
  • Tonemap (Linear)
  • Tonemap (Logarithmic)
  • Tonemap (Logarithmic Drago)
  • Tonemap (Reinhard)
  • Tonemap (Reinhard Modiefied)
  • Transform
  • Transform (Color)
  • Transform (ColorChannel)
  • Translate
  • TriColor
  • Tunnels
  • Twirl
  • Undistort
  • UnPremultiply
  • UnsharpMask
  • UVDilate
  • Vibrance
  • Wave (Warp)
  • Wave

The filters are sorted into sub categories. Some of these “classifications” we are not entirely sure of. If you have some opinion on that please give us a shout (see getting involved below).

All nodes come with a reference patch.

HowTo use it

The most convenient way is of course to just install the nuget:

nuget install VL.Addons

For more information on how to use nugets with VL, see Managing Nugets in the VL documentation.

Another possibility is to download a zip of the addons repo, unzip it to some place you like and then reference one of the following files in your document:

  • VL.Addons, if you want to have all addons at hand
  • VL.Addons.Stride, if you only care for the TFX

If you want to go fully ascetic (and don’t need the whole interface shebang) just copy the shaders folder beside the document you want to use the shaders in.

Getting involved

The Reference patches are pretty barebones and could do with some more love and if you look closely at the node list above there are 3 nodes that are not working properly right now.
Also although we tried our best to double and triple check everything there are more bugs to be found for sure.

With two of them (ShaderFX) most likely only the devvvvs can help since they seem to be caused by vvvv (will make a proper bug report soonish).

But when it comes to the patches and maybe broken TFX we’d like to “harness the power of the community”. Please go through all the Reference patches and check if they are working and/or can be improved, for example by adding more in-depth explanations.

What is more, while we tried to port everything we could find, there are still some nuggets we just didn’t have the resources for anymore like:

A lot of stuff in mp.dx and probably things from the contributions page, the addon pack and dx11-vvvv-girlpower.

So if you encounter a bug, have a feature wish or want to add a new effect please head over to github create an issue and ideally also a pull request addressing that issue. For some more info on how to contribute to a library check the gray book.

If you have general questions please make a forum post.

For urgend stuff join the chat .

That said, please bear in mind that we did this whole thing in our spare time without any compensation and it is provided as is. We can’t prioritize fixing bugs over our day jobs (though we are of course available for hire :)

Cheers!

20 Likes

Incredible to see this finally happening, thank you two for your efforts and the in-depth post about it!

2 Likes

And once again eternal thanks to all contributors :

xd_nitro, woei, u7angel, tonfilm, timpernagel, tekcor, sebl, sapo, sanch, robotanton, princemio, nissidis, mtallen, motzi, misak, Meierhans, mburk, Martin_Zrcek, marc_s, manuel, m4d, Luper, letoast, lasal, karistouf, kalle, joreg, idwyr, h99, gregsn, gilbi, ggml, frank, everyoneishappy, elektromeier, DiMiX, DigitalSlaves, Desaxismundi, dep, colorsound, circuitb, catweasel, antokhio, azeno, AKa-visuals, ain

with a special shout out to the heavy weights : @unc @vux and @microdee

16 Likes

A huge thanks to you two! <3

Hello @bjoern and @lecloneur!
First of all I want thank you for incredible work you did! This TextureFX lib the true game changer.

And here is the first problem I’m facing in: the basic Blur shaders you provide with the lib are entirely the same as shaders provided with VL.Stride.Runtime and even sdsl files names are the same. This leads to Assets Compiler errors when export a project referencing VL.Addons. Therefore I suggest to remove those shaders (like BlurPass1_Internal_TextureFX and some more) from VL.Addons and use them from VL.Stride.Runtime instead.

I can try to make such a replacement and prepare a pull request if you are agree to such a solution.

I had a quick look and the shaders are not quite the same actually.
As to why these changes were made I can’t tell. That’s one for @lecloneur to answer.

Easiest “fix” for now would be renaming the shader files I guess.

Also please make an issue on github when you encounter any problems/bugs. It’s way easier to keep track there.

Of couĐşse, I will.

In a closer look you will see that the algorithms are the same - only the implementation sometimes slightly different.

Hi @Rayment thanks for reporting.

The algorithms are indeed the same, the idea was to have a separate version for easier refactoring as the Blur function could be used across different shaders using inheritance. I didn’t know the name could create a problem like you mentioned.

Feel free to pull request.

@Rayment the export issue should be fixed now (version >= 0.1.1).

I added a prefix to the shaders causing a clash. Unfortunately we can’t just use the ones that come with VL.Stride since they are internal and thus not accessible.

Thanks to studio brĂĽll / @david for sponsoring the fix.

1 Like

You should be able to add the XML property IsFriend="true" to the reference in order to access internal nodes. For example:

<NugetDependency Id="..." Location="VL.Stride.Runtime" Version="2022.5.3" IsFriend="true" />

But you have to do that with a string editor.

I tried that already. Doesn’t work unfortunately.

Ok good find, I’d say that is a vvvv bug then.

Now that this

  • Breaking: Compute() inputs for TextureFX nodes

from the Roadmap is in recent previews, I was curious if there are plans / ideas about unifying both TextureFX worlds?

Also it would be really to cool to have a workshop on this topic at some point, if you were up for it. Maybe as an intermediate in the upcoming season at TNI?

Not from my side at least. The Addons already include all effects that are present in the Standardlib. The way it is now we can move at our own pace independent from the devvvvs. So (my) motivation to make a pr is pretty low. But since the stuff is OS everybody is welcome to try ofc.

Generally not my cup of tea and should be done by someone who actually uses the stuff “in a creative way” imo. Maybe @lecloneur wants to, but afaik he’s pretty busy and timezones may also be an issue.

@lecloneur I think a workshop about texture effects and common techniques would be very valuable, especially for newcomers and people getting into gamma who have not been around during beta times… at least this is how I feel about it.

Especially this whole topic about the strategy pattern and having now all sources and filters wrapped in a class is - in practical terms - a mystery to me. Language wise from the VL side of things and from the help patch I totally get what it does and how the methods and stuff are applied, but I somehow don’t see the benefits yet. It would be really cool to see how this approach can be used in real life and in projects and which new workflows it allows.

2 Likes

Is there anything else you would like to learn apart from what you’ve already mentioned ?

1 Like

Summing it up, what I would like to learn from you is:

  • common texture effect techniques with TextureFX+
  • best practices / workflows / examples from you personally
  • benefits of TextureFX being wrapped in a class

I think that could easily fill a three-hour workshop! I would pay for this!

And it would be nice to also hear from others if they were interested and what they would like to learn about this topic.

5 Likes

Because of the Interface you can now do something like this :

TextureFX.vl (39.9 KB)

Spread of TFX that you can reorder, insert etc… Just a basic example, it is very useful if you want to create TFX on the fly also, for example making a TFX Factory which depending on incoming data would create and add a new one to the stack.