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

SceneGraph

plugin FBX assets mesh assimp 3d
Credits: v.1.0 to a great part sponsored by decode.io - - - 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
  • efficient resource handling: loads meshes and textures of the model only once

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.
'Pay as you can' licensing model for commercial usage.

Change Log

  • initial release v.1.0

Future

possible further development features

  • more details on Light & Camera
  • Animations (keyframe)
  • glTF loading adapter (that would give materialdescription by PBR parameters)
  • resource (async) preloading

Known Issues

  • toggling textures pins off will not destroy them in the EX9 version
  • Deleting the Model nodes will show an exception in the tty, don't worry
  • download

    SceneGraph_v1.0.zip
    20.07.18 [01:54 UTC] by woei | 130 downloads

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!

anonymous user login

Shoutbox

~7h ago

vasilis: Really nice!

~2d ago

fleg: Hi all! Anybody in New York and up for a beer? I´ll be there from 19th-30st.

~3d ago

ravazquez: @sebescudie that's awesome! We need the same for patches...

~5d ago

joreg: any heavy osc users? please check out this proposal for a new set of nodes: https://discourse.vvvv.org/t/simple-osc-nodes/16796

~6d ago

lasal: Paralib update Beta37 paralib

~7d ago

joreg: in case you missed: september happened: vvvvhat-happened-in-september-2018 #vvvv #vl