Tuesday, October 26, 2010


Chibibel is a character by DAZ3D.
Poser cr2 (character rigging) files are quite heterogenous. So until now Chibibel has been the main reference implementation for cr2 importer.

Things implemented so far:
  • Parsing actor tree with channels. Actors (or props) are just a fancy name for bones (or frames) - i.e. positioned and transformed controllers for skin data. Channels are elementary property controllers - like individual rotation angles, morphs and so on. The main problem is, that the whole cr2 file format is mostly just (text based) dump of internal Poser controller structure as opposed to properly designed file format, so it contains many duplicate entries and meaningless data.
  • Twist and joint bend zones (no welds yet). Poser is special because the bending of joints is controlled with different weights for each main rotation axis - and these are specified algorithmically by line segments, angles and spheres. I am somewhat sceptical whether this would allow more natural movements - the weight system with extra bones and constraints should IMHO be easier and more powerful. But maybe it would be too difficult to set up for 3D modeling novices...
  • Welding obj meshes. Obj files cut meshes to groups, that cannot have interconnections. So cr2 file specifies, which groups should have their identically positioned vertices merged.
  • Loading textures from image files. Poser has quite complex material system, but currently Khayyam only looks it for diffuse texture entry and loads it as plain texture. Hopefully more is coming.
  • Conforming objects can be dropped to the same figure object as body. They behave surprisingly well, moving and bending with skeleton. But morphs cannot currently be linked, so if clothing has conforming morphs, they have to be adjusted manually.
  • Morphs work, but their values are not saved in XML data.
  • Props can be loaded but cannot be directly associated with bones. Props is (another) Poser fancy name for immutable objects (like tools, buildings etc).

Kuroyume Unoffcial CR2 File Specification has been invaluable resource for digging through the cryptic character data of Poser files.

Obligatory screenshot - Chibibel selling pottery in market (rendered with POV-Ray)

Saturday, October 16, 2010

First steps with Poser(TM) figures

Khayyam can now load (no import dialog yet) some basic Poser figures. They are not even close to renderable status yet, but things are becoming more interesting now:
- Basic morphing works
- Skeleton transforms poses as twist/joint/joint angles to body
- Blending angles are implemented
- Spherical falloff zones work (somewhat)
- Color values are parsed from materials

The next things I am working on currently:
- Loading conforming meshes (like hair and clothes)
- Implementing bulges
- Welding vertices

Obligatory screenshot - chibibel from DAZ3D

Friday, October 8, 2010

Khayyam architecture

Khayyam is a collection of handful libraries plus shell application written in Gtk+ toolkit. Most components come from Sourceforge Floyd project, but core components are borrowed from Sodipodi. The most basic building blocks are

1. libarikkei (Sodipodi)
This is a collection of utility libraries for file handling, unicode parsing, text file tokenizing and similar things. It has both C and C++ versions of some most basic functions and is implemented as small, self-contained library that can be directly included into project.

2. elea (Floyd)
This is (yet another) 3D geometry library written in C++. It is meant to be small, so only the subset of functions used in Khayyam (and some other) are implemented. Again, it is self-contained and can be directly included into project.

3. libnr (Sodipodi)
This is small, self-contained, anti-aliased 2D rendering library.

4. libnrtype (Sodipodi)
Compact text rendering library on top of libnr

5. sehle (Floyd)
3D engine for OpenGL 2, using libelea for algebra. It is meant to be mostly bare-bones layer, implementing only the most basic stuff, like vertex buffers, textures, display list and so on. It should be quite flexible regards to rendering pipeline.

6. thera (Floyd)
Small and compact DOM-like library for XML parsing. It implements basic parser and writer on top of libxml, node tree, basic mutation callbacks and transaction system for rollback (undo and redo).

7. miletos (Floyd)
Fat scene graph library on top of thera, sehle and elea. Implements all more complex things like various file format parsers, skeletal animations and so on. It borrows the basic design concept from Sodipodi (although is implemented in C++ instead of C) - it is written as typed object tree, parallel to the purely untyped tree of thera. Most editing can be done either directly for temporary editing, or by customizing thera nodes or attributes for permanend modifications.

8. khayyam (Floyd)
This is the application itself.

This is only the most basic overview. Next time I hope to write some more details.

Obligatory screenshot (Des Blood 4 models, Digital Girl background, rendered with POV-Ray)

Monday, October 4, 2010

What is Khayyam?

Khayyam is a frontend tool to my experimental set of 3D (and related) libraries.

A scene composed in Khayyam and rendered in POV-Ray
In current incarnation it cannot do much. Still you can import some model formats, place and pose these, and render resulting scene in POV-Ray. Plus it is free software. And works under both Windows and Linux.

A small overview of Khayyam can be found here.

At moment I am working on Poser model format support. This will be the first step for Khayyam to become a serious rendering tool.