* meshes are now exported without modifiers applied (for skinning to work), this should become a configurable option later
* had to edit OpenCollada code to make armature/skinning import work correctly
* code layout improvements
- trying to determine bone orientation from joint matrix
Looks like DAE joint matrix orientation cannot be relied upon as a source for bone direction. It can be axis-aligned or pointing in
totally different direction:
http://img75.imageshack.us/img75/8778/flufty.png
It seems to me the best solution is to add a bone with custom draw type that has no pointing direction, sphere for example. Will code
this after merge!
For each object in scene linked with armature writing the following information:
- bone names
- vertex weights
- bone inverse bind matrices (fake values for now)
Assuming objects don't share Armatures for now.
- splitted code into separate classes: ArmatureImporter, MeshImporter
- commented out texture-to-mesh binding code which was difficult to comprehend, Chingiz will re-think/re-write
When the mesh field is left blank and Physics option is enabled, it reinstances the physics mesh from the existing mesh.
like calling gameOb.reinstancePhysicsMesh() from python.
Add support back for reinstancePhysics mesh, a frequently requested feature in the BGE forums.
from what I can tell Sumo supported this but bullet never did.
Currently only accessible via python at the moment.
- rigid body, dynamic, static types work.
- instanced physics meshes are modified too.
- compound shapes are not supported.
Physics mesh can be re-instanced from...
* shape keys & armature deformations
* subsurf (any other modifiers too)
* RAS_TexVert's (can be modified from python)
Moved the reinstancePhysicsMesh functions from RAS_MeshObject into KX_GameObject since the physics data is stored here.
video and blend file demo.
http://www.graphicall.org/ftp/ideasman42/reinstance.ogvhttp://www.graphicall.org/ftp/ideasman42/reinstance_demo.blend
Since in DAE only a matrix is stored per bone, some tricks have to be applied to build an armature from it:
- direction for "leaf" bones is hard-coded to Y vector. This will be changed to bone matrix orientation, somehow code will need to
derive the bone "forward" axis
- for "leaf" bones length cannot be determined, currently it is hard-coded (second screenshot), but I think changing it to the average
length of all non-leaf bones is ok
- parent bones get their tail at last child's head, this is not good (first screenshot). For bones with more than one child Chingiz
suggested not to link it with any child, I think it's a good idea. Length will be the same as for leaf bones.
Screenshots:
http://img232.imageshack.us/img232/8905/screenfhy.pnghttp://img406.imageshack.us/img406/3004/tobaggan.png
This adds a RenderEngine type to RNA, which can be subclassed
in python (c++ will follow once we support subclassing there).
It's very basic, but plugs into the pipeline nicely. Two example
scripts:
http://www.pasteall.org/6635/pythonhttp://www.pasteall.org/6636/python
Issues:
* Render runs in a separate thread, and there is unrestricted
access, so it's possible to crash blender with unsafe access.
* Save buffers and full sample are not supported yet.
* ID blocks can now get RNA properties defined from python, e.g.:
bpy.types.Scene.BoolProperty(..)
* RNA structs/functions/properties can now get pointers duplicated
(mostly strings), since we can't point to some static string then.
* Added ExtensionRNA struct to add into *Type structs for subclassing,
is a bit more compact than defining the 4 variables each time.
Only disadvantage is it requires including RNA in more places.
* Windows fixes for texture filter & bump patches, thanks
Jean-Michel Soler for noting.
* Added sqrtf/sinf/fabsf/... fallback #ifdefs in BLI_arithb.h,
those should be safe to use now. Replacing the double for the
float version throughout the code can be done once, but would
need proper testing.
Patch by Alfredo de Greef. Considerably improves the quality of bump
mapping, and texture filtering for displacement and warp too. Mainly
this is achieved by getting the texture derivatives just right in
various cases, many thanks to Alfredo for figuring this one out, works
great.
This is enabled by default now, but disabled still for existing
textures to preserve backwards compatibility. Can be enabled with
the "New Bump" option in the material texture slot in the outliner.
Also, I made the range for the normal factor a bit smaller since this
gives stronger effects, but note that you can still type in larger
values than the slider allows.