» SceneGraph
This site relies heavily on Javascript. You should enable it if you want the full experience. Learn more.

SceneGraph

plugin
Credits: v1.0 to a great part sponsored by decode.io - - - v2.0 supported by meso & wirmachenbunt - - - vux for dx11 pack & the assimp wrapper - - - elias for some vvvv-sdk treasures

about

convenient handling of complex 3d scenes (DX11 & EX9)

  • easy transformation handling: don't worry about cascaded transformation hierarchy in the back, even with animations
  • efficient resource handling: loads meshes and textures of the model only once
  • just connect color and texture pins to apply the materials saved with the model

Long

Why

Ever got tired of binsized SetSlice, Sift, * (Transform) mayhem when using the collada/assimp nodes?
This contribution aims to solve these issues.

Collada and Assimp are both great at doing what they were intent to: loading 3d scenes. They just don't natively provide a vvvv-friendly way to actually make use of all the info they load. The mere spread outputs of transforms, meshes, textures, etc. obfuscate the hierachical relation, and forces you to juggle binsizes while keeping the differnt types in sync.

so decode.io and I put our heads together, thinking about a patcher-friendly way and came up with this.

How

load the scene, apply some transforms and one 'Split' like node which outputs everything nicely for a shader.

1. Load any 3d file format that Assimp can handle. (Thank vux for the assimp wrapper which is in use here to read the data.) The Scene also handles memory allocation of meshes and textures. They are uploaded once, even if used by many nodes.

2. Convenience Node displaying a browsable SceneGraph tree with all the relational info in it's place.

3. Apply transforms by specifying which part of the graph/tree should be affected. Accumulation and propagation to all children is automagically handled in the back.

4. Model outputs all the drawing relevant data of the (sub)graph in nice little spreads to use connect directly to a shader without further ado. Each meshpart has its corresponding transfrom and material in place. For not textured parts a default white texture is inserted to avoid bin sizing. Check the config pins to configure the node to do just what you need (e.g. multiple textures, bouding box, bone tranforms...)

(numbers correspond to the ones in the pic above in case you didn't notice)

techier details

The Scene (=loader node) outputs the type GraphNode which is a reference copy of the whole scene hierarchy, namely SceneGraph. Transformation can be applied on any node (or group or spread of nodes) within that graph.
in case you can draw everything at once with the same shader. you're done at this point.
If not the Selector lets you move a 'pointer' in a GraphNode another descendant than the root, thereby you select just parts of the whole model for drawing and further transformation downstream.

(more implementation details on demand)

License

Free for non-commercial use.
License required for commercial use:
model 'pay as you can', the least drop a note when using it

Change Log

v2.0

supported by meso & wirmachenbunt

new
  • cached transformation graph: transformations only evaluated on change (e.g. the one transform in directly after loading to get the model into vvvv scene space)
  • color modification: change colors of meshes independent of their stored material (useful for fade in or highlighting). simple and XPath version
  • animations: access and apply animations stored in the scene. in case of only one animation it's plug and play. just use the Animate node and change the time - keyframe data will automatically be applied in the correct parent-child relation to the model. simple and XPath versions of the node to apply only certain animations or only to specific parts of the model
changes
  • slice sampling behaviour of transform nodes follow standard vvvv bin sizing model: transform slice is applied on the resulting nodes of the selector/query slice. (was transform spread to result spread before)
fixes
  • checking and replacing some characters in the node names while importing to avoid errors with the backing xml representation
  • Scene wasn't handling loading a spread of files correctly
  • Selector: include self option was not affecting the result

v1.1

  • fixed bug, where node names would prevent loading due to incompatibility with xml
  • fixed faulted loading with directly nested meshes

v1.0

supported by decode.io

  • initial release

Future

possible further development features

  • own assimp wrapper (would allow more recent assimp version)
  • more details on Light & Camera (requires the above)
  • glTF loading adapter (that would give materialdescription by PBR parameters)
  • resource (async) preloading

Known Issues

timpernagel 20/07/2018 - 09:25

Superb! Thanks WOEI and DECODE!

readme 20/07/2018 - 12:15

This is huge and provides a solution to a problem that's been a pain in vvvv, while environments like Unity offer way smoother and integrated asset handling/scene explorers.

Exactly what I had in mind when writing this:
https://discourse.vvvv.org/t/thirdparty-extensions/16387

Still, it doesn't solve the problem that these approaches don't ship with vvvv/don't integrate well as there's no proper interface to load those modules up but to manually place them in your patch.

Anyway, I very much welcome this. Finally something that aims to provide high level user friendliness.
Just a couple of vvvv nuisances left in this regard. I will address this at the summer camp.

Thank you!

microdee 20/07/2018 - 13:04

noice! this should be pull requested into the DX11 pack

u7angel 20/07/2018 - 16:59

that saves some tedious patch work, cheers!

mburk 20/07/2018 - 17:30

Awesome, thanks! glTF support with PBR parameters would be great! any way to support this?

eno 20/07/2018 - 19:26

Chapeau guys!!!

Noir 20/07/2018 - 20:25

well done!

tgd 17/10/2018 - 22:49

Looks very useful :)

woei 02/04/2019 - 14:24

@mburk: sorry, completely missed your comment! if you're still interested, let's talk

LineKernel 08/04/2019 - 13:20

Hi , sorry if this is a stupid question , but as there is no "install" section , where do i extract this zip ? my vvvv folder is a mess and i cant get the node to popup when i type its name (i assume it s not in the "packs folder" then ?)

woei 08/04/2019 - 18:37

@LineKernel
hi, sorry. forgot to add install instructions. it's a regular pack, so installation is the same as for dx11 et al. just unzip inside vvvv then windows will integrate the content into the existing packs folder.
.../vvvv_50betaxx/packs/struct/... is how it should look like in the end.

felipelinsf 24/04/2019 - 02:18

Hello, I am not able to use the node animate correctly. None of my 3d models that work with Skeletalmesh (dx11 assimp) are being animated. What am I missing out? thank you

bjoern 24/04/2019 - 11:18

@felipelinsf create a forum post and attach one of the models that doesn't work.

felipelinsf 30/04/2019 - 18:27

I can not attach files in the forum because I am a new member, but for example I can not animate the model astroBoy_walk.dae that comes in the vvvv installation folder

woei 13/05/2019 - 16:28

@felipelinsf
SceneGraph animation nodes are meant for plug and play with mesh transforms. skeletal animation is possible, not with plug and play support tough, but with some more patching required:
the Model node has hidden pins to give you bone information, this is where the skeletal animation info is. you need to animate those, combine them with the local transformation of the mesh and feed it into skinning matrices which need to go into a shader which supports them.

ZvivZ 11/09/2019 - 07:17

@woei
Do you know of any examples where bone matrices are animated in vvvv? It'd be nice to have full real-time control of the model. Thanks

manuel 19/12/2019 - 20:57

When I try to open any simplecar.fbx example, it doesnt work

00:08:15 : cannot load C:\vvvv\vvvv_beta_39_x64\packs\SceneGraph\assets\simplecar.fbx
00:08:15 ERR : System.ArgumentException in System.Xml.Linq: '' is an invalid expanded name.

Stacktrace:

   at System.Xml.Linq.XName.Get(String expandedName)
   at SceneGraph.Core.GraphTraversing.ToXElement(GraphNode node)
   at SceneGraph.Core.GraphTraversing.ToXElement(GraphNode node)
   at SceneGraph.Core.Scene`1.CreateGraph()
   at SceneGraph.Adaptors.SceneAssimp.CreateGraph()
   at VVVV.SceneGraph.LoaderSceneGraphNode.Evaluate(Int32 spreadMax)
woei 25/12/2019 - 17:20

@ZvivZ
the guys at decode.io did a proof of concept patch. i'm sure they'll pass it on if you ask them
@manuel
can't reproduce. did you alter the fbx file? because the error sounds like it is loading an object within the scene without name.

mediadog 14/03/2021 - 02:32

Danged if I can find a way to get the texture transforms. If I load a model that has a repeating texture applied, the texture is stretched to the whole mesh since there is no way to apply anything to the Texture Transform pin of a shader.

The Assimp nodes suffer from the same problem - there is no Texture Transform output pin on the Materials node there either. So is this just an artifact of the underlying library not supplying it?

I was all excited to use this since it is so much more elegant than the native Assimp nodes, but this is a deal killer. Pout. Am I missing something?

anonymous user login

Shoutbox

~4h ago

~2d ago

joreg: Follow TobyK on his Advent of Code: https://www.twitch.tv/tobyklight

~5d ago

joreg: vvvvTv S02E02 is out: Saving & Loading UI State: https://www.youtube.com/live/GJQGVxA1pIQ

~5d ago

joreg: We now have a presence on LinkedIn: https://www.linkedin.com/company/vvvv-group

~12d ago

joreg: vvvvTv S02E01 is out: Buttons & Sliders with Dear ImGui: https://www.youtube.com/live/PuuTilbqd9w

~19d ago

joreg: vvvvTv S02E00 is out: Sensors & Servos with Arduino: https://visualprogramming.net/blog/2024/vvvvtv-is-back-with-season-2/

~19d ago

~20d ago

fleg: hey there! What's the best tool for remote work? Teamviewer feels terrible. Thanks!

~1mth ago

joreg: Last call: 6-session vvvv beginner course starting November 4: https://thenodeinstitute.org/courses/ws24-5-vvvv-beginners-part-i/

~2mth ago

joreg: Missed the last meetup? You can rewatch it here: https://www.youtube.com/live/MdvTa58uxB0?si=Fwi-9hHoCmo794Ag