「利用者:Chingachgook/Gsoc2009/Diary」の版間の差分
(→Documentation) |
細 (1版 をインポートしました) |
(相違点なし)
|
2018年6月29日 (金) 03:41時点における最新版
目次
Learning the basics of COLLADA
May 8th
In COLLADA, primitives can be presented in 2 forms: polygons as <polygons> and <polylist> and triangles as <triangles> <trifans> and <tristrips>. Ignoring line primitives for now.
Since Blender allows only quadrilaterals and triangles, I will need to find out how to convert polygons to triangles or quads or a combination of these.
In case vertex normals are missing in a COLLADA file, they should be generated.
In COLLADA all coordinates are right-handed by definition - this is good since Blender uses right-handed too :-).
May 12th
How to determine if a MFace is a quad or triangle? According to exotic.c, if a face is quad then face->v4 is non-zero.
Now I know how to use addvertlist, addfacelist functions - progress!
Arystan introduced me to operator basics and menus based on operators.
May 17th
COLLADA DOM
There are two ways to work with COLLADA DOM: dae* classes and dom* classes. dae* classes provide a generic string interface to data. dom* classes, in contrast, provide direct access to data, i.e. floats are stored as floats. Although dae* classes are easier to learn than dom* classes (there's only a single daeElement class vs. tens of dom* classes), to keep code compact and efficient, I'll use dom* classes as much as possible.
May 18th
Studying a few build systems that Blender uses: make and scons.
Build with make succeded, but only release and with a few hacks. Debug build failed. Maybe later.
Built with scons before, very easy. Documentation on how to add a new library/module is available in the source tree in doc/blender-scons-dev.txt. Thanks jesterKing!
May 24th
Studying OpenCollada.
May 25th
- Coding environment prepared.
- Added "Collada Export" menu, the code is in wm_operators.c for now.
May 27th
Studying OpenCollada. It differs strongly from Collada DOM.
May 30th
Order of elements inside <Collada> (doesn't matter?) borrowed from examples in collada spec:
- asset
- required tags: created, modified - create with StreamWriter::appendTextElement
- up_axis(y up by default) - z up in Blender
- library_visual_scenes
- scene - is necessary for programs that allow only one scene
- library_geometries
- other
TODO:
- don't forget unit measurement conversions
- parenting
May 31st
Can not create <created> and <modified> with Asset class.
June 3d
prepareToAppendValues() calls another function prepareBaseToAppendValues() which creates the following
**<float(or any other type)_array id = "" count = count * stride> At this step I have to insert data into <float_array> with appendValues(). Next I close <float_array> and add the following **<technique_common> ***<accessor source = "" = "" stride = ""> ****<param name = "" type = ""/> ****... ***</accessor> **</technique_common> *
with finish()
Now I know how to create <created> <modified>. It seems that add() method creates them automatically - cool =)
June 5th
Very basic geometry exporter is almost ready!
What is left:
- add blender's api
June 9th
Texcoords(UVs?) should be stored in <source>
Notes for personal reference
- COLLADA floats are actually C++ doubles
- COLLADA skinning and accessors
- How armatures work - will be very helpful on phase-2 of this project