CrafLie Pack Preview [Released]

[EDIT:] Now officially released:
###Download from Contributions


Preview of a node set to simplify drawing in VL. The project came out of seeing Drake constantly making dozens of output pins for the drawing properties. It was started roughly a month ago but then more pressing matters needed attention. This week i got sick and had some home alone time to finish the last bits. Here is the first version for testing and feedback before it lands in the contributions.

The nodes feel very similar to the beloved vvvv drawing nodes but don’t actually render anything. They configure a bunch of draw descriptions and send them over one output pin to vvvv, no matter how complex the actual drawing is. In vvvv a big node based on FeralTic and vvvv-dx11 by @vux takes the descriptions and renders them into a Renderer (DX11) of your choice. No more output pin mayhem when you need to render more complex scenes from VL.

Features

  • Hierarchical layer system
  • Group and Group (Spectral)
  • Layer can be transformed
  • Layer can be put into world, view or projection space
  • All basic primitives
  • Simple text
  • Billboard sprites
  • Constant and phong shading
  • Textures can use relative paths to the vvvv patch that contains the Renderer (CraftLie)

Girlpower

Check the folder CraftLie.1.0.0\vvvv\girlpower for:

  1. An overview patch which shows all nodes in action
  2. How to use instancing
  3. Awesome 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

3 Likes

Very interesting. x64 only?

hello guest, it works for both 32-bit and 64-bit. the .dlls are compiled in AnyCPU mode. but of course you need the dx11 pack for the specific architecture.

1 Like

I guess this library could be a sort of default simple library that could be dived into like the devLib library, but for dx11 nodes instead. In that respect, I think you have the main ones in the quad, circle (ellipes), rounded cornered quad and line. Maybe outline versions of the above with thickness controls?

I like how instancing is handled too, like a first class citizen, like spreads of matrices in dx9 layers. Implementation of other properties that could be instanced (textures/bones) should be relatively straightforward to implement?

In this current guise you have to perform blending at the v4 layer level rather than add it to the descriptor. I suspect its possible to add blend modes to a descriptor, and maybe a transparency control should be available by default, either exclusively as an individual control or in the alpha channel of a color.

Seeing as you’re using a phong shader some light controls would be useful, even if only the direction of the light(vec3).

It may be a bad idea to mention this now but lastly I think users will want some way for people to import custom geometries into the system… but that might be better discussed on another thread. To keep things simple, these may be normalized wavefront files at first with uvs but little else.

in general this should not be viewed as a rendering library, although it feels like one (which is ofc intended). its more a convenience node set to draw stuff with VL in a structured way as you are used to from vvvv. but you should always think of vvvv as the rendering engine.

outlines are not trivial in DX11… feature for later.

this is not possible, instancing is a technique to get the best performance out of the graphics card by pushing one draw call that should be executed thousands of times. a draw call can only have one geometry and one texture. so its not directly like spreading in vvvv. if you want to spread the texture with a quad, just put it in a loop:

[quote=“guest, post:4, topic:15056”]
I suspect its possible to add blend modes to a descriptor, and maybe a transparency control should be available by default, either exclusively as an individual control or in the alpha channel of a color.
[/quote]

yes, blending is a good idea, this can be spreaded in DX11… should be straight forward. alpha can already be set via the color. but alpha never works well together with the depthbuffer, be aware of that.

sure, should be an input of the renderer… as other lighting properties.

that’s not the scope of the library, maybe in the future…

general advice, you can always make a copy of the Renderer (CraftLie) in vvvv and customize it as you need it. it is also not a shame to output more than one description layer out of VL to feed it into multiple Renderer (CraftLie) nodes with different settings for each… CraftLie is there to make your life much more easy, not restrict it.

thanks for testing and your thoughts on it!

this is not possible, instancing is a technique to get the best performance out of the graphics card by pushing one draw call that should be executed thousands of times. a draw call can only have one geometry and one texture. so its not directly like spreading in vvvv. if you want to spread the texture with a quad, just put it in a loop:

Perhaps I was thinking of something like a texture array input so the draw call remains single call on just a single geometry, and the textures are looped in modulo over the each instance. An example is in the Constant Array help file in the dx11 pack

ah, interesting hint, will check it out. thanks!

Exception with recent Alpha:
“Type Parameters are not allowed in non-generic patches. The definition of this node has errors.”

Strange. I went inside the Quad patch and the Quad Descriptor to see what was wrong and it was working normally. I came out and the System was working right.

Is it possible to use dynamic textures instead of files on objects?

can you describe in more detail what you mean by that? currently CraftLie is single pass forward rendering… no texture rendering involved. but you can clone the renderer and customize it to you needs.

Okay, I adapted the Renderer for my needs.

Another question/possible bug

When I make a list of matrices for instances of a Quad, the first quad doesn’t appear.

Thanks for reporting, this is already fixed in the code base. Will put it into contributions soon…

Updated the pack…

1 Like

again, fixed a relative path in the pack… new .zip online.

1 Like

How would I be able to use a quad as a delegate? “A process can only be used in a stateful patch.”

this is not possible, a quad remembers it’s state and needs to be in a stateful context. but have a look into the quad patch, it uses a few operations to setup the layer that draws a quad. you can use these nodes to do the same in the delegate.

if the quad does not rely on input data of the delegate then you can just use the layer out of the quad and connect that into the delegate.

uploaded a new version for beta 35.7 release candidate 4 with some patch cleanup.

pack is now released: