» CraftLie: DX11 drawing for VL
This site relies heavily on Javascript. You should enable it if you want the full experience. Learn more.

CraftLie: DX11 drawing for VL

pack
Credits: vux, flateric

about

The nodes resemble the beloved vvvv drawing nodes and will make you feel at home immediately. CraftLie creates a list of draw descriptions and sends them over one output pin to vvvv. In vvvv a special node takes the descriptions and renders them into a Renderer (DX11) of your choice.

No output pin mayhem and much better performance if you want to render complex scenes from VL.

Drake Loves VL

Placing the drawing nodes inside your VL data types makes much cleaner patches and shows the joy of object oriented patching. This makes it perfectly suited for UIs and other drawing tasks that have complicated visual structures and need dynamic instances.

Customization

Keep in mind that the rendering still takes place in vvvv. So you can use your vvvv shader knowledge to customize the Renderer (Craftlie) and draw the shapes in a different style. It's also possible to output many layers from VL and draw each with a different custom Renderer (CraftLie).

What does CraftLie mean?

CraftLie is, like FeralTic the dx11 library it is based on, and anagram of the major dx11 developer @flateric. Due to the fake nature of the drawing, the name fits perfectly.

Features

  • Hierarchical layer system like in vvvv
  • Layer can be transformed
  • Layer can be put into world, view or projection space
  • All basic primitives
  • Simple text
  • 3D Text
  • Arbitrary Mesh Join
  • Billboard sprites
  • Textures can use relative paths to the vvvv patch that contains the Renderer (CraftLie)

Example Patches

Check the folder CraftLie.1.x.x\vvvv\girlpower for:
1. An overview patch which shows all nodes in action
2. How to use instancing
3. Interactive particle patch by @sebl
4. CPU core race which stresses all cores using reactive nodes
5. Sprites particles in perlin force field
6. Dynamic UI demo that creates layered windows

Windows VL
Dynamic Particles

Installation

The pack works for both 32-bit and 64-bit alike.
0. Make sure you have vvvv beta 35.7 or newer
1. Install latest dx11 pack.
2. Put the folder in the zip into the vvvv packs folder e.g.:

 vvvv50beta38.1\packs\CraftLie.1.2.0

Source Code

https://github.com/tebjan/CraftLie

download

CraftLie.1.5.0.zip
08.12.19 [14:12 UTC] by tonfilm | 444 downloads
AnyCPU for vvvv 38.2 and newer, can now render quad and text over network
CraftLie.1.2.0.zip
23.02.18 [23:41 UTC] by tonfilm | 658 downloads
AnyCPU for vvvv alpha and beta36
CraftLie.1.0.1.zip
16.06.17 [22:26 UTC] by tonfilm | 738 downloads
AnyCPU for vvvv beta35.7 and beta35.8

digitalwannabe 18/06/2017 - 00:20

wow, what's happening...checked this late last night and thought I was already in some delusional dream state ;) great contribution!

tonfilm 19/06/2017 - 21:05

haha, didn't want to spoil all the fun in the description... ;) thanks for testing it.

Noir 19/06/2017 - 21:13

big up

catweasel 23/06/2017 - 13:04

This is fascinating demo of VL, but looking through the patch, to me, it is almost incomprehensible, some VL for dummy notes would be appreciated. The gui looks to be very useful, but how to add elements to it?
I still find VL to be as transparent as mud, as poor as I am at code, it seems to make more sense, which isn't the expected result of a node based GUI, surely the data flow should be visible, it feels like the part that makes sense is somehow hidden from view and you are left with magic nodes that do something secret, maybe its just me?

tonfilm 23/06/2017 - 16:17

hi cat,

that is basically why you (and every other vvvv pro) should attend this:
https://17.nodeforum.org/events/vl-for-vvvv-users/

and this:
https://17.nodeforum.org/events/vl-concepts-and-patterns-1/

anyway here is a tip on how to read the DynamicUI example:

it basically follows the super classic game development pattern for mainloops. as a vvvv developer you live in that world and you only need to understand one addition to the normal 'update' processing. the mainloop is split, or sliced, into several steps in the main patch:

1. check if there are any new input events
2. process all input events and update the state/logic of all elements accordingly
3. do normal "animation updates" like you are used to in vvvv
4. output layer to output pins and render it
> start over

step 2. is the new one for a vvvv developer and itself split into two steps, HitTest to check whether an element actually needs to process the input and ProcessEvents then does the actual logic and leaves the results for the Update stored in pads. so basically the pads connect the different mainloop slices by moving data/results from ProcessEvents to Update to animate/draw it...

so go into the patches and read them like this, someone from the outside is calling HitTest, if that returns true ProcessEvents will be called where the patch processes the UI logic. finally Update will be called to render animations and other stuff that was decided on ProcessEvents.

tobyk 07/08/2017 - 20:28

Hey @Tonfilm I'm trying to wrap my head around another aspect of the DynamicUI example.

The DynamicUI example uses a lot of delegates, but I'm having trouble putting any of the craftLie primitives into delegates as I get 'A process can only be used in a stateful patch' errors. How did you do it?

tonfilm 07/08/2017 - 21:57

hello @tobyk

i don't know if that helps you, but if you want to call an operation of a type in a delegate, you either need to pass the instance (state) on which you want to call the operation into the delegate as an input or create an instance on the fly when the delegate gets called.

most of the craftlie primitives are only available as process nodes (not individual Create/Update operations). that doesn't work together with a delegate out of the box... but you have two options:

  • make a data type that wraps the process node and call the individual operations of the wrapper type in the delegate
  • copy the primitive you need from the CraftLie.vl document, paste it into your document, put it into another category or rename it and switch it from record to class to make the individual operations accessible

reminder to self -> switch craftlie primitives from Record to Class

tobyk 27/08/2017 - 17:15

I've got a little workaround for craftlie that could be useful for other VL beginners used to the vvvv way of doing things.
If you want to disable drawing a craftlie primitive you'll find they don't have enable pins and you can't put them in an IF region because they are stateful. This can be a bit of an inconvenience if you are using them in a larger IF region with other calculations.

However you can put stateful nodes in a REPEAT region and disable by switching it to 0 repeats. They will not maintain state.

This is also a useful hack for making the patch neater any time you would nest a FOREACH region inside an IF region. You can combine them into a single REPEAT region and set the repeat to 0 when you want to disable it. NOTE that accumulators on REPEAT regions with 0 loops won't work as 'pass arounds' like they do with a disabled IF region. If you need this functionality you will have to manually pass any data around the region with a switch. Of course depending on your use case this may make it less neat than just having the nested regions in the first place...

tonfilm 28/08/2017 - 16:40

hi @tobyk

the upcoming version 1.0.2 will have a Enabled node that you can insert in any layer link. so you can enable/disabe wherever you want. however the Repeat disable idea is very nice, had the problem that stateful nodes cannot be place into an IF region with other patches too.

u7angel 24/11/2017 - 17:49

the examples don't work here
38.5

tonfilm 24/11/2017 - 20:48

hi @u7angel

did you download the right version? the 1.1.0 only works for alpha... 1.0.1 is for beta. also make sure you have the correct version of the dx11 pack installed, as linked above.

u7angel 25/11/2017 - 17:29

@tonfilm, yeah it was the beta version

tonfilm 27/11/2017 - 18:15

@u7angel which dx11 version do you use? i've downloaded everything fresh as linked above and placed it as decribed, works out of the box. so just try a clean re-install.

Hadasi 30/11/2017 - 21:47

Hi @tonfilm.

Text and sprites do not seem to render at the moment. Pretty much silent failure.
From the TTY:

    00:12:33  *  : patch C:\Users\H\Desktop\vvvv_50alpha35.10_x64\packs\dx11\nodes\modules\PerfMeter (DX11.Debug).v4p has been converted from versions/vvvv45beta30.dtd to 50alpha35.10.
    00:12:33  *  : couldn't connect pins of nodes Mouse (Devices Window) and WindowHandler (EditingFramework).v4p. 
    00:12:33  *  : couldn't connect pins of nodes Group (DX11.Layer) and Renderer (DX11). 

Using 4V Alpha 8e8da8760d (compiled 30/11/17 20:19)

Missing Items

H

tgd 11/01/2018 - 19:16

hi, my mouse processor is red :) what to do?
thats vvvv_50alpha35.12_x64 and CraftLie.1.2.0

tonfilm 24/02/2018 - 00:45

@Hadasi can you confirm that the re-upload fixes the missing sprites?

@tgd this should also be fixed now with the latest upload

Hadasi 24/02/2018 - 13:41

@tonfilm, I'm on a different (previously windows 8.1) machine but it looks good here.

systray27 11/06/2019 - 23:35

Hi, there I have a problem with the same patch (dynamic UI). But it aint just the mouseprocessor...VVVV beta 50.38.1 on windows 10.

knoeterich 29/08/2019 - 18:35

Hello there,

i am having similar problems in CraftLie.
Red nodes everywhere ;)

I am currently on vvvv beta_50.38.1x64 Win 10

ddf 06/12/2019 - 12:47

Same here, all red nodes on beta 39x64 W10. Latest DX11 installed.

tonfilm 07/12/2019 - 01:27

here is an update that should work with beta 39: https://github.com/tebjan/CraftLie/releases
please test: @systray27 @knoeterich @ddf

anonymous user login

Shoutbox

~4d ago

joreg: 6 session beginner course part 2 "Deep Dive" starts January 13th: https://thenodeinstitute.org/courses/ws24-5-vvvv-beginners-part-ii/

~4d ago

joreg: 6 session beginner course part 1 "Playground" starts November 4th: https://thenodeinstitute.org/courses/ws24-5-vvvv-beginners-part-i/

~5d ago

joreg: Save the date: Oktober 17: vvvv meetup in Berlin!

~6d ago

joreg: 12 session online vvvv beginner course postponed to start November 4th: https://thenodeinstitute.org/courses/ws24-5-vvvv-beginners-class/

~17d ago

~26d ago

joreg: Webinar on October 2nd: Rhino meets Realtime with vvvv https://visualprogramming.net/blog/2024/webinar-rhino-meets-realtime-with-vvvv/

~1mth ago

joreg: Introducing: Support for latest Ultraleap hand-tracking devices: https://visualprogramming.net/blog/2024/introducing-support-for-new-ultraleap-devices/

~1mth ago

joreg: 2 day vvvv/fuse workshop in Vienna as part of NOISE festival on Sept. 13 and 14: https://www.noise.ist/vienna

~2mth ago

joreg: New beginner video tutorial: World Cities https://youtu.be/ymzrK7tZLBI

~2mth ago

catweasel: https://colour-burst.com/2023/01/26/macroscopic/ yeah, ' is there anyone who cares about slides anymore...' Well me for a start! :D