<?xml version="1.0" encoding="utf-8"?> Lab journal: Foundry Gonzo-Qt

Lab journal: Foundry Gonzo-Qt

Table of Contents

1 2014-11-28 Friday

1.1 LatticeDeformerQML

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

  • add VertexDeformRenderPass to RendererFactory
  • GnzQQWidget child 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

2.2.1 Process

VertexDeformRenderPass calls tickAppliedAnimations on SceneObject and then passes the lattice sub-node-tree to LatticeDeformer, after which it requests LatticeDeformer to set its shader variables.

lattice_deformer.png

3 2014-11-26 Wednesday

3.1 Misc

Read up about OS Mesa – llvmpipe is the new software rendering pipeline that compiles shader code using llvm.

3.2 Lattice deformer

In 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

SceneObject holds all Animation objects and SceneNode hierarchy.

4 2014-11-25 Tuesday

Hartmut pasted the following on the hipchat:

steps to get ModelViewer built:

  1. pull the GnzExamples dev branch - it contains the updated project file
  2. 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 :)

  1. in QtCreator, set a new project variable called COLLADALIBDIR and point it to the directory created in step 2
  2. Build!
  3. 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
  4. you're done!

Now run the Modelviewer and load the .js file

5 2014-11-24 Monday

5.1 Discuss with Vilya gl_Viewport handling

6 2014-11-21 Friday

6.1 Lattice Deformer

Had quick look at GnzExamples::ModelViewer* – not yet clear where the deformation is currently happening.

6.2 glViewport handling

BlendRenderPass, TextureToScreen set viewport offset. GBuffer sets viewport but no offset.

Should pick convention: either whole pipeline does not set offset and the final stage does, or everything sets offset.

Based on:

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

Author: Charl Botha

Created: 2014-11-28 Fri 10:48

Emacs 24.3.1 (Org mode 8.2.7c)

Validate