Commit Graph

15674 Commits

Author SHA1 Message Date
Arystanbek Dyussenov
26a3322912 Update code to build with the latest OpenCollada (rev 588).
Updated instructions for building OpenCollada with scons (Makefiles deprecated) are here: http://wiki.blender.org/index.php/User:Kazanbas/Building_OpenCollada
2009-09-20 15:55:44 +00:00
Chris Want
ec91997766 Support for building opencollada branch using CMake. Not sure how
to tell the system to make the location of libpcre and libexpat
a settable option though -- maybe somebody who is more of an
expert can look at this.
2009-09-17 23:17:31 +00:00
Chingiz Dyussenov
c77f005b14 Added export skinned animation. 2009-08-28 04:50:35 +00:00
Nathan Letwory
bf6733a17e * changes to have opencollada branch build on win32 and win64. Necessary dependency (opencollada lib) hasn't been added to lib/windows and lib/win64 yet. If you need them, contact me please. 2009-08-23 21:16:39 +00:00
Chingiz Dyussenov
16c363d0c7 Small fix to animation export - <channel> didn't use proper name convention. 2009-08-16 15:06:25 +00:00
Chingiz Dyussenov
e9e3f66de1 Importer:
* Converts euler rotation to quaternion for bone animation.
2009-08-14 17:12:04 +00:00
Chingiz Dyussenov
5447c3d5a3 Added lamp options export/import. 2009-08-06 18:30:44 +00:00
Chingiz Dyussenov
80aad6403d Import:
* Polygons with more than 4 vertices will be converted to triangles.
2009-08-05 15:52:20 +00:00
Chingiz Dyussenov
11a01aedcf Fixed child object transform issue in exporter: transform written for child objects was local-to-world, now it's local-to-parent. 2009-08-05 06:45:47 +00:00
Chingiz Dyussenov
aa7e9f7d78 Export only that textures which input is UV. 2009-08-04 06:40:02 +00:00
Chingiz Dyussenov
952e8845ba * fixed armature bind pose issue
* fixed image exporting issue
2009-08-03 19:58:23 +00:00
Chingiz Dyussenov
03632ee68d Copies textures to the directory where exported file is. 2009-08-03 18:24:29 +00:00
Chingiz Dyussenov
217b865fbd Merged BKE_get_image_export_path() from soc-2009-kazanbas branch with:
svn merge -r 19844:22173 https://svn.blender.org/svnroot/bf-blender/branches/soc-2009-kazanbas/source/blender/blenkernel/BKE_image.h source/blender/blenkernel/BKE_image.h
svn merge -r 19844:22173 https://svn.blender.org/svnroot/bf-blender/branches/soc-2009-kazanbas/source/blender/blenkernel/intern/image.c source/blender/blenkernel/intern/image.c
2009-08-03 15:45:43 +00:00
Chingiz Dyussenov
87e68418a2 * added armature/skinned mesh export
* 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
2009-08-03 14:40:23 +00:00
Chingiz Dyussenov
464735402e Small fix to lights export. 2009-08-01 17:08:18 +00:00
Chingiz Dyussenov
f081b184f9 * Commented out converter of polygons to triangles - it's not working yet.
* Fixed textures export. 
TODO:
* Fix lights export
2009-08-01 12:49:39 +00:00
Chingiz Dyussenov
2b6e98b0b8 Importer now creates skin vertex groups and reads vertex weights. 2009-08-01 06:44:18 +00:00
Chingiz Dyussenov
c7beb4eba2 Disabled light and material exporting to make it compile with the latest OpenCollada. 2009-07-31 20:35:14 +00:00
Arystanbek Dyussenov
8a5b054c51 COLLADA importer is reading armature from DAE. "Leaf" bones, bones having more than one child and zero-length bones get the size of
a minimum bone length in skeleton and are assigned a sphere shape.

Also fixed rotation reading by re-ordering items in matrix multiplication.

Images:
http://img339.imageshack.us/img339/8778/flufty.png
http://img117.imageshack.us/img117/4641/astroboy.png
2009-07-30 17:05:16 +00:00
Arystanbek Dyussenov
7725687455 Merge with 2.5 -r 21788:22040. 2009-07-30 08:22:51 +00:00
Arystanbek Dyussenov
1d6a92deed - setting leaf bone size to minimum bone size in bone branch
- 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!
2009-07-30 06:35:27 +00:00
Chingiz Dyussenov
7d2cfc0516 Some small changes to textures import/export. 2009-07-29 11:32:42 +00:00
Joseph Eagar
94e06c9859 changed some sprintfs to strcats, thanks to Fredrik Axelsson for the patch 2009-07-28 17:23:45 +00:00
Arystanbek Dyussenov
7846956df3 Added armature export in COLLADA exporter (not complete yet).
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.
2009-07-28 12:08:54 +00:00
Campbell Barton
ddb09d3220 [#19036] blender should use 'static inline' in BKE_cloth.h to work with C99
Török Edwin (edwintorok)

this was the only thing stopping blender being compiled with clang
2009-07-28 01:48:10 +00:00
Chingiz Dyussenov
a5d8e6e5cd Changed textures import. Although code is still difficult to understand. 2009-07-27 17:43:13 +00:00
Arystanbek Dyussenov
6a4d9cae72 COLLADA importer:
- 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
2009-07-26 09:29:25 +00:00
Chingiz Dyussenov
d8adc93cc8 Another small fix. 2009-07-26 07:45:11 +00:00
Campbell Barton
dd918da8de ReplaceMesh Actuator option to replace the physics mesh and display mesh + python api options.
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.
2009-07-26 01:32:37 +00:00
Campbell Barton
e9ca43521f BGE Physics
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.ogv
http://www.graphicall.org/ftp/ideasman42/reinstance_demo.blend
2009-07-25 22:57:29 +00:00
Campbell Barton
1c00eacca2 fix memleak in BGE py api - action.channelNames 2009-07-25 20:51:45 +00:00
Campbell Barton
88097e9909 - BGE Python API converting a mesh from a python arg was broken but happened to work if the uninitialized pointer was not NULL.
- iris.c - looks like a copy/paste error, was using rect where it could not have been initialized.
2009-07-25 19:34:38 +00:00
Chingiz Dyussenov
8511208f22 Small fix to controllers import. 2009-07-25 18:45:22 +00:00
Chingiz Dyussenov
9b28872572 Small fixes to prevent crash if imported mesh is empty. 2009-07-25 18:21:51 +00:00
Arystanbek Dyussenov
d06eb49b2f COLLADA importer: basic armature import.
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.png
http://img406.imageshack.us/img406/3004/tobaggan.png
2009-07-25 16:10:17 +00:00
Chingiz Dyussenov
d6098931dd Another fix to textures import. 2009-07-25 15:12:56 +00:00
Chingiz Dyussenov
97837623a7 Fixed textures, images import/export. 2009-07-25 14:09:15 +00:00
Kent Mein
431a388ae7 This is patch# 19017 16bit SGI image loading
submitted by Albertas Vyšniauskas (thezbyg) 

Improves SGI image support.

Kent
2009-07-24 17:17:04 +00:00
Chingiz Dyussenov
9603fd2289 If <geometry> is instaciated through <controller>, it will be imported. 2009-07-23 11:48:31 +00:00
Arystanbek Dyussenov
3321a1fd4a Merge with 2.5 -r 21003:21788.
Run smoothly :)
2009-07-22 05:35:12 +00:00
Arystanbek Dyussenov
3b058378dd Importer: fix parenting. 2009-07-22 03:51:11 +00:00
Guillermo S. Romero
d44d7e220d SVN maintenance. 2009-07-21 21:31:13 +00:00
Brecht Van Lommel
c354ea0ef1 2.5: Render
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/python
http://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.
2009-07-21 20:28:32 +00:00
Brecht Van Lommel
6b8dae0874 RNA
* 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.
2009-07-21 20:05:16 +00:00
Arystanbek Dyussenov
e62b675858 Basic object transform animation export:
- just writes all curves from action linked to an object
- linear interpolation
2009-07-21 19:08:36 +00:00
Brecht Van Lommel
b8445173c4 2.5:
* Fix armature drawing crash with materials.
* Mixed texture/material preview was doing wrong gamma correction.
* Use *f math functions for AAO.
2009-07-21 18:29:37 +00:00
Brecht Van Lommel
a1407ff342 2.5:
* 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.
2009-07-21 18:23:45 +00:00
Brecht Van Lommel
0391b5ecef 2.5: fix crash on load when saving with a filebrowser open. 2009-07-21 14:28:41 +00:00
Brecht Van Lommel
b5457e8e70 RNA
* Wrapped RenderResult, RenderLayer, RenderPass.
* Update RNA_access.h with new structs.
2009-07-21 14:11:51 +00:00
Brecht Van Lommel
0b49dc77de 2.5: Bump Mapping
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.
2009-07-21 13:46:49 +00:00