Skip to content

Instantly share code, notes, and snippets.

View philcn's full-sized avatar

Phil Guo philcn

  • Tencent
  • Shanghai
View GitHub Profile
@philcn
philcn / C4DObjects.py
Created September 6, 2016 17:18
Cinema 4D gltf exporter
import Base
reload( Base )
from Base import BaseMaterial
from Base import BaseMesh
from Base import BaseLight
from Base import BaseCamera
from Base import BaseNode
from Base import BaseTransformAnimation
from Base import BaseVectorAnimation
@philcn
philcn / Base.py
Created September 6, 2016 17:17
Cinema 4D gltf exporter
import TriMeshWriter
reload( TriMeshWriter )
from TriMeshWriter import TriMeshWriter
import GltfWriter
reload( GltfWriter )
from GltfWriter import GltfWriter
import os
@philcn
philcn / GltfCameraAnimation.cpp
Created August 29, 2016 15:54
GLTF camera animation
#include "cinder/app/App.h"
#include "cinder/app/RendererGl.h"
#include "cinder/gl/gl.h"
#include "cinder/CameraUi.h"
#include "cinder/gltf/File.h"
#include "cinder/gltf/MeshLoader.h"
#include "cinder/qtime/QuickTimeGl.h"
using namespace ci;
using namespace ci::app;
@philcn
philcn / VaoExampleApp.cpp
Created February 28, 2016 07:10
cinder vao sample
#include "cinder/app/App.h"
#include "cinder/app/RendererGl.h"
#include "cinder/gl/gl.h"
#include "cinder/CameraUi.h"
using namespace ci;
using namespace ci::app;
using namespace std;
class VaoExampleApp : public App {
@philcn
philcn / cinder_090_default_shader_params
Created January 26, 2016 02:03 — forked from cwhitney/gist:ef9a767998471a3fe1b9
Cinder 0.9.0 default shader params
https://github.com/cinder/Cinder/blob/81e55e7eb76c7c856633eaed4679aca5ab6531f4/src/cinder/gl/GlslProg.cpp#L583
https://github.com/cinder/Cinder/blob/master/src/cinder/gl/EnvironmentCore.cpp#L158
Uniforms
-------------
ciModelMatrix
ciModelMatrixInverse
ciModelMatrixInverseTranspose
ciViewMatrix
ciViewMatrixInverse