Commit Graph

106 Commits

Author SHA1 Message Date
Benoit Bolsee
b6abeca2fe Update MSVC projects files 2009-08-01 10:13:32 +00:00
Andrea Weikert
3d096c2712 blender 2.5 MSVC9 projectfiles
fix renamed rna_vpaint.c -> rna_sculpt_paint.c
2009-07-26 09:35:40 +00:00
Andrea Weikert
3ecb88fc76 2.5 MSVC 9 projectfiles
* maintenance: console_space, physics_boids, rna_render
2009-07-22 18:06:59 +00:00
Andrea Weikert
f787712cbb 2.5 MSVC projectfiles
* update for NLA merge from Aligorith
2009-07-11 17:29:53 +00:00
Andrea Weikert
66ca86b40b 2.5 file browser
* directory button enabled again, c code for now, can later become nicer operator
* filename button enabled (pattern match for selection)
* RNA completed (title, file and directory)
* some unused code removal.
2009-07-10 17:05:04 +00:00
Andrea Weikert
e3661aac9a 2.5 MSVC9 projectfiles
* small maintenance: keyval.c removed, some headers in editors/include renamed.
2009-07-08 17:40:42 +00:00
Andrea Weikert
79633056ac 2.5
* fix for RNA generation dependency in MSVC projectfiles
* added missing include
2009-07-06 17:29:32 +00:00
Andrea Weikert
d390ee1b60 2.5 MSVC9 projectfiles
* RNA project cleanup. Better file naming and first attempt at deleting files before rebuilding.
* editors/object/object_vgroup.c added
2009-07-05 19:11:29 +00:00
Andrea Weikert
60c2599a1a 2.5 filebrowser
* show only name of the last directory for the bookmark
* small fix of projectfile: header BLI_fileops.h was moved
Note: full path should appear in tool tip later, also for renaming bookmarks later on.
2009-06-30 20:34:00 +00:00
Andrea Weikert
406b16e7d1 2.5 MSVC projectfiles
* small maintenance: editors/info_header.c removed, editors/info_ops.c added
2009-06-30 20:31:58 +00:00
Andrea Weikert
3b0fafa393 2.5 MSVC projectfiles
* moving projectfiles to python 2.6 to avoid recurring issues with python migration
2009-06-30 18:20:45 +00:00
Andrea Weikert
5e20f57431 2.5 filebrowser
* start of filebrowser RNA 
* system files, bookmarks, etc. now nicely inside panels to allow collapsing etc.
* filebrowser header now defined in space_filebrowser.py

TODO:
* button type for bookmarks etc. not final yet, at least should get centered still. Suggestions welcome here.
2009-06-29 20:23:40 +00:00
Andrea Weikert
2fac3f3550 2.5 MSVC 9 projectfiles
* added missing include to KX_blenderhook project
2009-06-28 07:26:16 +00:00
Andrea Weikert
2293347af8 2.5 MSVC9 projectfiles
* RNA: move of rna_*_api.c files
* removed deleted projects ODE, SUMO etc.
* Added new files to editors/space_logic
2009-06-22 22:39:28 +00:00
Campbell Barton
a1cf7988c1 svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r20855:20928
Sequencer changes from source/blender/src coming next
2009-06-16 14:21:58 +00:00
Dalai Felinto
8ab502b894 MSVC fix for rev. #20909 (reported/patched by moguri) 2009-06-16 03:27:57 +00:00
Andrea Weikert
32cf82dbb3 2.5 UI
* RNA enum for icons to allow specifying icons as string
* example: row.itemR(st, "line_numbers", text="", icon='ICON_LINENUMBERS_OFF')
2009-06-15 20:28:49 +00:00
Benoit Bolsee
297329b75b Update MSVC9 project files. Use pthreadVC2 instead of pthreadVSE2 to match scons (don't know why we were using VSE2 in the first place). 2009-06-14 19:59:59 +00:00
Andrea Weikert
069c13c9ea 2.5 MSVC9 projectfiles
* enabled game engine in regular build
Note1: blenderplayer hasn't been looked at yet and is not linking
Note2: KX_blenderhook and KX_converter need windowmanager include, this dependency should probably be removed.
2009-06-14 15:14:17 +00:00
Brecht Van Lommel
c8b4cf9206 2.50:
svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r19820:HEAD

Notes:
* Game and sequencer RNA, and sequencer header are now out of date
  a bit after changes in trunk.
* I didn't know how to port these bugfixes, most likely they are
  not needed anymore.
  * Fix "duplicate strip" always increase the user count for ipo.
  * IPO pinning on sequencer strips was lost during Undo.
2009-06-08 20:08:19 +00:00
Andrea Weikert
35914d8ca2 2.5 MSVC projectfiles
* added file editors/space_buttons/buttons_context.c
* removed BRE_yafray project
2009-06-04 20:05:08 +00:00
Andrea Weikert
3159f4a243 2.5 MSVC projectfiles update
- file editors/space_image/image_panels.c -> image_buttons.c (renamed)
- file editors/interface/interface_templates.c added

Also added small fix for crash in filebrowser.
2009-05-26 18:54:39 +00:00
Andrea Weikert
ba6bec56f9 2.5 filebrowser
- drawing code cleanup
- use of BLF_font in own string drawing, needs to be aligned with uiStyles still.
- thumbnail scaling now done on graphics card via new glaDrawPixelsTexScaled (slightly modified glaDrawPixelsTex)
2009-05-14 18:08:14 +00:00
Benoit Bolsee
d95a109990 BGE modifier: generate correct physic shape, share static derived mesh, share display list.
This commit completes the support for modifiers in the BGE.
- The physic shape is generated according to the derived mesh. 
  This is true for all types of shapes and all types of 
  objects except soft body.
- Optimization for static derived mesh (mesh with modifiers
  but no armature and no shape keys). Replicas will share
  the derived mesh and the display list: less memory and
  faster rendering. With this optimization, the static 
  derived mesh will render as fast as if the modifiers were
  applied.

Known Limits:
- Sharing of mesh and display list is only possible between
  in-game replicas or dupligroup. If you want to instantiate
  multiple objects with modifiers, use dupligroup to ensure
  best memory and GPU utilization.
- rayCast() will interact with the derived mesh as follow:
  Hit position and hit normal are the real values according
  to the derived mesh but the KX_PolyProxy object refers to
  the original mesh. You should use it only to retrieve the
  material.
- Dynamic derived mesh have very poor performance:
  They use direct openGL calls for rendering (no support
  for display list and vertex array) and they dont't share
  the derived mesh memory. Always apply modifiers on dynamic
  mesh for best performance.
- Time dependent modifiers are not supported.
- Modifiers are not supported for Bullet soft body.
2009-05-14 13:47:08 +00:00
Benoit Bolsee
ee1c29028d BGE: Add MT_Vector3 support for Py attribute macro system. See KX_PYATTRIBUTE_VECTOR_... 2009-05-11 12:41:48 +00:00
Benoit Bolsee
386122ada6 BGE performance, 4th round: logic
This commit extends the technique of dynamic linked list to the logic
system to eliminate as much as possible temporaries, map lookup or 
full scan. The logic engine is now free of memory allocation, which is
an important stability factor. 

The overhead of the logic system is reduced by a factor between 3 and 6
depending on the logic setup. This is the speed-up you can expect on 
a logic setup using simple bricks. Heavy bricks like python controllers
and ray sensors will still take about the same time to execute so the
speed up will be less important.

The core of the logic engine has been much reworked but the functionality
is still the same except for one thing: the priority system on the 
execution of controllers. The exact same remark applies to actuators but
I'll explain for controllers only:

Previously, it was possible, with the "executePriority" attribute to set
a controller to run before any other controllers in the game. Other than
that, the sequential execution of controllers, as defined in Blender was
guaranteed by default.

With the new system, the sequential execution of controllers is still 
guaranteed but only within the controllers of one object. the user can
no longer set a controller to run before any other controllers in the
game. The "executePriority" attribute controls the execution of controllers
within one object. The priority is a small number starting from 0 for the
first controller and incrementing for each controller.

If this missing feature is a must, a special method can be implemented
to set a controller to run before all other controllers.

Other improvements:
- Systematic use of reference in parameter passing to avoid unnecessary data copy
- Use pre increment in iterator instead of post increment to avoid temporary allocation
- Use const char* instead of STR_String whenever possible to avoid temporary allocation
- Fix reference counting bugs (memory leak)
- Fix a crash in certain cases of state switching and object deletion
- Minor speed up in property sensor
- Removal of objects during the game is a lot faster
2009-05-10 20:53:58 +00:00
Benoit Bolsee
42557f90bd BGE performance, 3rd round: culling and rasterizer.
This commit extend the technique of dynamic linked list to the mesh
slots so as to eliminate dumb scan or map lookup. It provides massive 
performance improvement in the culling and in the rasterizer when 
the majority of objects are static.

Other improvements:
- Compute the opengl matrix only for objects that are visible.
- Simplify hash function for GEN_HasedPtr
- Scan light list instead of general object list to render shadows
- Remove redundant opengl calls to set specularity, shinyness and diffuse
  between each mesh slots.
- Cache GPU material to avoid frequent call to GPU_material_from_blender
- Only set once the fixed elements of mesh slot
- Use more inline function

The following table shows the performance increase between 2.48, 1st round
and this round of improvement. The test was done with a scene containing 
40000 objects, of which 1000 are in the view frustrum approximately. The
object are simple textured cube to make sure the GPU is not the bottleneck.
As some of the rasterizer processing time has moved under culling, I present
the sum of scenegraph(includes culling)+rasterizer time

Scenegraph+rasterizer(ms)       2.48      1st round       3rd round

All objects static,            323.0           86.0             7.2
all visible, 1000 in 
the view frustrum

All objects static,            219.0           49.7             N/A(*)
all invisible.

All objects moving,            323.0          105.6            34.7
all visible, 1000 in 
the view frustrum

Scene destruction              40min          40min              4s

(*) : this time is not representative because the frame rate was at 60fps.
      In that case, the GPU holds down the GE by frame sync. By design, the
      overhead of the rasterizer is 0 when the the objects are invisible. 

This table shows a global speed up between 9x and 45x compared to 2.48a
for scenegraph, culling and rasterizer overhead. The speed up goes much
higher when objects are invisible.

An additional 2-4x speed up is possible in the scenegraph by upgrading
the Moto library to use Eigen2 BLAS library instead of C++ classes but
the scenegraph is already so fast that it is not a priority right now.

Next speed up in logic: many things to do there...
2009-05-07 09:13:01 +00:00
Andrea Weikert
ee4e89ec53 Blender 2.5
MSVC projectfiles updates
* removed WITH_FREETYPE2
* update for several missing or moved files rna_fcurve.c, gpencil.c,...
2009-05-06 18:51:58 +00:00
Benoit Bolsee
3abb8e8e68 BGE performance: second round of scenegraph improvement.
Use dynamic linked list to handle scenegraph rather than dumb scan
of the whole tree. The performance improvement depends on the fraction
of moving objects. If most objects are static, the speed up is 
considerable. The following table compares the time spent on 
scenegraph before and after this commit on a scene with 10000 objects
in various configuratons:

Scenegraph time (ms)              Before         After
(includes culling)

All objects static,               8.8            1.7  
all visible but small fraction          
in the view frustrum

All objects static,               7,5            0.01
all invisible.

All objects moving,               14.1           8.4
all visible but small fraction
in the view frustrum

This tables shows that static and invisible objects take no CPU at all
for scenegraph and culling. In the general case, this commit will 
speed up the scenegraph between 2x and 5x. Compared to 2.48a, it should
be between 4x and 10x faster. Further speed up is possible by making
the scenegraph cache-friendly.

Next round of performance improvement will be on the rasterizer: use
the same dynamic linked list technique for the mesh slots.
2009-05-03 22:29:00 +00:00
Benoit Bolsee
ba563216e9 BGE: Fix Orthographic mode and viewport scaling
- the BGE now uses correct glOrtho projection whe camera is in orthographic mode
-
2009-04-26 12:23:30 +00:00
Benoit Bolsee
d11a5bbef2 BGE: Support mesh modifiers in the game engine.
Realtime modifiers applied on mesh objects will be supported in 
the game engine with the following limitations:

- Only real time modifiers are supported (basically all of them!)
- Virtual modifiers resulting from parenting are not supported: 
  armature, curve, lattice. You can still use these modifiers 
  (armature is really not recommended) but in non parent mode. 
  The BGE has it's own parenting capability for armature.
- Modifiers are computed on the host (using blender modifier
  stack).
- Modifiers are statically evaluated: any possible time dependency
  in the modifiers is not supported (don't know enough about
  modifiers to be more specific).
- Modifiers are reevaluated if the underlying mesh is deformed
  due to shape action or armature action. Beware that this is 
  very CPU intensive; modifiers should really be used for static
  objects only.
- Physics is still based on the original mesh: if you have a 
  mirror modifier, the physic shape will be limited to one half
  of the resulting object. Therefore, the modifiers should 
  preferably be used on graphic objects.
- Scripts have no access to the modified mesh. 
- Modifiers that are based on objects interaction (boolean,..)
  will not be dependent on the objects position in the GE.
  What you see in the 3D view is what you get in the GE regardless
  on the object position, velocity, etc.

Besides that, the feature is compatible with all the BGE features
that affect meshes: armature action, shape action, relace mesh, 
VideoTexture, add object, dupligroup.

Known problems:
- This feature is a bit hacky: the BGE uses the derived mesh draw 
  functions to display the object. This drawing method is a
  bit slow and is not 100% compatible with the BGE. There may
  be some problems in multi-texture mode: the multi-texture
  coordinates are not sent to the GPU. 
  Texface and GLSL on the other hand should be fully supported.
- Culling is still based on the extend of the original mesh. 
  If you have a modifer that extends the size of the mesh, 
  the object may disappear while still in the view frustrum.
- Derived mesh is not shared between replicas.
  The derived mesh is allocated and computed for each object
  with modifiers, regardless if they are static replicas.
- Display list are not created on objects with modifiers.
  
I should be able to fix the above problems before release.
However, the feature is already useful for game development.
Once you are ready to release the game, you can apply the modifiers
to get back display list support and mesh sharing capability.

MSVC, scons, Cmake, makefile updated.

Enjoy
/benoit
2009-04-21 11:01:09 +00:00
Brecht Van Lommel
874c29cea8 2.50: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r19323:HEAD
Notes:
* blenderbuttons and ICON_SNAP_PEEL_OBJECT were not merged.
2009-04-20 15:06:46 +00:00
Andrea Weikert
629c4bf8bf 2.5 MSVC9 projectfiles
* long time due: copy the executables to the install/msvc9 or install/msvc9d dir instead of keeping them in the source tree in the bin folder!
* copy the new ui scripts to the install dir
2009-04-18 10:08:19 +00:00
Andrea Weikert
73f4401ac3 2.5 MSVC9 projectfiles
- added editors/keyingsets.c
2009-04-18 08:40:14 +00:00
Benoit Bolsee
0b8661ab4d BGE: Occlusion culling and other performance improvements.
Added occlusion culling capability in the BGE. 
More info: http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.49/Game_Engine#BGE_Scenegraph_improvement
MSVC, scons, cmake, Makefile updated.

Other minor performance improvements:
- The rasterizer was computing the openGL model matrix of the objects too many times
- DBVT view frustrum culling was not properly culling behind the near plane:
  Large objects behind the camera were sent to the GPU
- Remove all references to mesh split/join feature as it is not yet functional
2009-04-13 20:08:33 +00:00
Andrea Weikert
e625d9875e 2.5 MSVC projectfiles
- added missing files
- cleanup of some project settings
- RNA building has dependency issue: had to add interface_api.c to the makesrna project and makesrna and rna projects now include editors.
- added debug libraries for OpenExr, please update lib/windows/openexr to get them
2009-04-12 20:34:46 +00:00
Benoit Bolsee
2074128fad Patch #18462: Fisheye (Dome) and Spherical Panoramic mode in BGE.
User guide:
http://wiki.blender.org/index.php/Dev:Source/GameEngine/Fisheye_Dome_Camera

Fixed two bugs from original patch:
- deleting a text will clear the warp field from Game framing settings
- removed spurious black dots along the edge of the cube map in the gameplayer 

Known limitation:
- resizing of the screen doesn't work in the gameplayer

Known bugs:
- Texture with reflexion are not rendered correctly
- Spurious problems with light
2009-04-08 15:06:20 +00:00
Benoit Bolsee
51b4145841 BGE Scenegraph and View frustrum culling improvement.
This commit contains a number of performance improvements for the
BGE in the Scenegraph (parent relation between objects in the
scene) and view frustrum culling.

The scenegraph improvement consists in avoiding position update
if the object has not moved since last update and the removal
of redundant updates and synchronization with the physics engine.

The view frustrum culling improvement consists in using the DBVT
broadphase facility of Bullet to build a tree of graphical objects
in the scene. The elements of the tree are Aabb boxes (Aligned 
Axis Bounding Boxes) enclosing the objects. This provides good
precision in closed and opened scenes. This new culling system
is enabled by default but just in case, it can be disabled with
a button in the World settings. There is no do_version in this
commit but it will be added before the 2.49 release. For now you
must manually enable the DBVT culling option in World settings
when you open an old file.

The above improvements speed up scenegraph and culling up to 5x.
However, this performance improvement is only visible when
you have hundreds or thousands of objects.

The main interest of the DBVT tree is to allow easy occlusion
culling and automatic LOD system. This will be the object of further
improvements.
2009-04-07 22:14:06 +00:00
Benoit Bolsee
14e3b041ba MSVC9 project file update 2009-04-07 19:57:30 +00:00
Benoit Bolsee
29f5c7dd5d MSVC9 project file. 2009-04-03 19:19:02 +00:00
Benoit Bolsee
8a840c35be MSVC9 project file update. 2009-04-02 21:53:52 +00:00
Daniel Genrich
03759bc248 Adding missing files to vcproj:
/source/blender/blenfont/intern/blf_font_helv10.h
/source/blender/blenfont/intern/blf_internal.c
2009-03-30 14:07:59 +00:00
Andrea Weikert
64f2dd52cb 2.5 MSVC 9 projectfiles
- update for editors/armature
- update for RNA_context
2009-03-29 08:40:43 +00:00
Benoit Bolsee
bd13f30224 MSVC project files updated for ffmpeg 0.5 and armature. You must also update lib/windows. 2009-03-22 23:39:36 +00:00
Brecht Van Lommel
d52400bfbd 2.50: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r18677:19317
Notes:
* Sequence transform strip uses G.scene global, this is commented
  out now, should be fixed.
* Etch-a-ton code was most difficult to merge. The files already in
  2.5 got merged, but no new files were added. Calls to these files
  are commented out with "XXX etch-a-ton". editarmature.c and
  transform_snap.c were complex to merge. Martin, please check?
* Game engine compiles and links again here for scons/make/cmake
  (player still fails to link).
2009-03-17 21:44:58 +00:00
Andrea Weikert
b907b9fd9b 2.5 filebrowser
* added filter buttons to header
* changed large icon for movie files to match small icon
* fixed small stack corruption in interface_draw.c (Matt, check if this is ok)
* moved nice display of file size to storage.c, where string is created.
2009-03-14 13:12:11 +00:00
Benoit Bolsee
51b3bba1c0 Update MSVC9 project file for VideoTexture 2009-03-05 15:35:15 +00:00
Andrea Weikert
1a380356fc 2.5 MSVC9 projectfiles
- space_text update
2009-03-02 13:55:53 +00:00
Benoit Bolsee
9265150942 MSVC9 project file: add ffmpeg avdevice lib to linker for the blenderplayer. 2009-02-28 21:37:49 +00:00
Andrea Weikert
924ff0dc98 2.5: updated MSVC9 project files
- blenfont
- editors: sculpt changed to sculpt_draw
- some RNA additions (rna_animation.c)
- fixed some game engine include directories
2009-02-28 09:59:27 +00:00