Lab journal: Foundry Gonzo-Qt
Table of Contents
- 1. 2014-11-28 Friday
- 2. 2014-11-27 Thursday
- 3. 2014-11-26 Wednesday
- 4. 2014-11-25 Tuesday
- 5. 2014-11-24 Monday
- 6. 2014-11-21 Friday
1 2014-11-28 Friday
SceneObject is header file only.
ModelViewerWindow loads model as follows:
GPUModel* newModel = loadModelFromOBJFile(filename, errorMessage);
… and collada / dae file as follows:
ColladaLoader colladaLoader; Gnz::SceneObject* scene = colladaLoader.LoadFile(filename.toLatin1().data()); scene->applyAnimations();
2 2014-11-27 Thursday
2.1 QtQuick Lattice Deformer
GnzQQWidgetchild class with extra properties for json description.
2.2 Lattice deformer
From modo we get a whole bunch of locators and animations that
operate on them. All of this is loaded into the
ModelViewer. Shader code uses the locator animations to warp the
geometry using a vertex shader.
There's more in the Collada: geometry, lights, cameras, etc. (the whole render object tree in Modo is there)
Lattice deformer tutorial on YouTube: http://youtu.be/jviQSB6quJY
SceneObject and then passes the lattice sub-node-tree to
LatticeDeformer, after which it requests
set its shader variables.
3 2014-11-26 Wednesday
Read up about OS Mesa – llvmpipe is the new software rendering pipeline that compiles shader code using llvm.
3.2 Lattice deformer
GnzExamples/ModelViewer/VertexDeformRenderPass I have to modify
the following line so that we can see the surface:
out_Normal = -normalize(vo_Normal)
ColladaLoader loads collada DAE file into
SceneObject holds all
Animation objects and
4 2014-11-25 Tuesday
Hartmut pasted the following on the hipchat:
steps to get ModelViewer built:
- pull the GnzExamples dev branch - it contains the updated project file
- Copy the directory http://s3share.stonethree.com/share/tmp/Hartmut/foundry_asset/Collada/ to somewhere convenient
i've compiled the library for you - you're welcome :)
- in QtCreator, set a new project variable called COLLADALIBDIR and point it to the directory created in step 2
- copy the .js, .obj, and .dae asset files from here http://s3share.stonethree.com/share/tmp/Hartmut/foundry_asset/ModelViewer/ into the ModelVeiwer build directory
- you're done!
Now run the Modelviewer and load the .js file
5 2014-11-24 Monday
5.1 Discuss with Vilya
6 2014-11-21 Friday
6.1 Lattice Deformer
Had quick look at
GnzExamples::ModelViewer* – not yet clear
where the deformation is currently happening.
TextureToScreen set viewport offset.
sets viewport but no offset.
Should pick convention: either whole pipeline does not set offset and the final stage does, or everything sets offset.
vec4 out_FragColor = vec4(gl_FragCoord.x / 1000, gl_FragCoord.y / 1000, 0, 1);
it looks like
gl_FragCoord is not relative to moving viewport,
but absolute: it increases as the animation moves the viewport to
the right and to the top.
ivec2 Base = ivec2( (gl_FragCoord.xy - u_ViewportXY) * StepSize);
6.3 Meeting with Jack
- Slider node
- TwistDeformer node on the GPU (Vertex shader)
- SineDeformer node
- Multiply node