2011年8月29日星期一

怎么定义一个QuadTriMesh, 同时支持quad and triangle faces?

class QuadTriMesh : public BaseMesh {
public:
struct Face;
...
};
#define NIL uint(~0)
struct QuadTriMesh::Face {
unsigned int id;
unsigned int v[4];
bool isQuadFace() const { return v[3] != NIL; };
};

2011年8月23日星期二

- 养成习惯工作在早上就开始做,别看看新闻推到下午or晚上。
- 修改某mesh operation的错误时候最难最怕就是等为出错在哪些face/vertex/edge, 如果能在maya中建一些简单的模型来重现, 这就好办了。

- 不想改变的变量加const.
- 考虑函数里的指针加QScopedPointer<T> ... 
- C++ Destructor: 1. 子类的destructor总会自动调用父类的destructor吗? 
2. destructor里面除了需要delete pointers之外其它的变量呢? 


-what is LLVM ?


- OpenColorIO (OCIO) is a new open source project from Sony Pictures Imageworks (SPI), which they hope will soon be widely adopted across the Industry. SPI – it must be said, especially since Rod Bredow took the role of CTO, – has excelled at meeting the open source community head on and spearheading along with ILM (and their OpenEXR work) – some of the most impressive displays of industry co-operation we have seen in years, if not decades.

- http://advances.realtimerendering.com/s2011/  Advances in Real-Time Rendering in 3D Graphics and Games.
http://iryoku.com/aacourse/ ACM SIGGRAPH 2011 Course Filtering Approaches for Real-Time Anti-Aliasing 

- http://fgiesen.wordpress.com/ A trip through the Graphics Pipeline 2011.

- John Carmack (ID_AA_Carmack) on Twitter: Reading "Infrastructure: the book of everything for the industrial landscape". Much respect to civil engineers!

  

2011年8月16日星期二


- "Low-pass filtering statistics", 

- Eigen library (http://eigen.tuxfamily.org
Eigen's Geometry module provides two different kinds of geometric transformations:
1. Abstract transformations, such as rotations (represented by angle and axis or by a quaternion), translations, scalings. These transformations are NOT represented as matrices, but you can nevertheless mix them with matrices and vectors in expressions, and convert them to matrices if you wish. 这种类型描述的都是Pure R/T/S. 
2. Projective or affine transformation matrices 两种: see the Transform class. These are really matrices. 其实是Represents an homogeneous transformation in a N dimensional space. 
例如这是一个affine transformation matrix的例子, 描述的是concatenation_of_any_transformations: Transform<float,3,Affine> t = Translation3f(p) * AngleAxisf(a,axis) * Scaling3f(s); 
An affine transformation matrix M is shaped like this:
( linear   translation )
(  0...0       1       ) // the last row can be assumed to be [0...0 1]
Note that for a projective transformation the last row can be anything, and then the interpretation of different parts might be sightly different.
Isometry if the transformation is only a concatenations of translations and rotations. (In Euclidean geometry, a rotation is an example of an isometry, a transformation that moves points without changing the distances between them. from wikipedia)

Transformation Types:
2D rotation from angle                    Rotation2D
3D rotation as an angle + normalized axis AngleAxis
"Finally Rotation2D and AngleAxis are mainly convenient types to create other rotation objects." These are two most simplest rotation types.

- 遇到一个bug. QA用的版本可以稳定重新,但是我就是不能重现,所以我怀疑daily build是不是包含了最新的code. 后来试了最近的check in也包含在daily build里面, 应该就不是没有包含最新code了。同事建议看看release 和 debug版本。果然release version可以重新 debug版本不可以重新. 一直跟踪发现原因一个数组值没有初始化, 在debug中被初始化为3452816845 也就是0xcdcdcdcd, 但在release下大部分是0. 

- NVIDIA path render, 

- 工作需要了解求Normal Map细节,于是读了NVIDIA mesh tool(http://code.google.com/p/nvidia-mesh-tools/)中NVMeshMender的实现, 知道了Tangent space的求法, 例如先根据uv求出TB然后假如N的时候考虑smoothgroup.  NVIDIA的工具Melody虽然没有给出代码实现, 但可以玩玩normal map的生成. 

- "State of the Art Report, Survey of Real-Time Tessellation & Geometry Synthesis Methods" 罗列了相关papers.


- Check the QScopedPointer for resource acquisition is initialization(RAII), and QSharedPointer for reference count.

2011年8月12日星期五

代码bug

昨天写代码犯了个错误:
子类override父类的virtual member function时候不需要写函数参数的default values。