the features that are needed to run the game. Compile tested with
scons, make, but not cmake, that seems to have an issue not related
to these changes. The changes include:
* GLSL support in the viewport and game engine, enable in the game
menu in textured draw mode.
* Synced and merged part of the duplicated blender and gameengine/
gameplayer drawing code.
* Further refactoring of game engine drawing code, especially mesh
storage changed a lot.
* Optimizations in game engine armatures to avoid recomputations.
* A python function to get the framerate estimate in game.
* An option take object color into account in materials.
* An option to restrict shadow casters to a lamp's layers.
* Increase from 10 to 18 texture slots for materials, lamps, word.
An extra texture slot shows up once the last slot is used.
* Memory limit for undo, not enabled by default yet because it
needs the .B.blend to be changed.
* Multiple undo for image painting.
* An offset for dupligroups, so not all objects in a group have to
be at the origin.
GLEW
====
Added the GLEW opengl extension library into extern/, always compiled
into Blender now. This is much nicer than doing this kind of extension
management manually, and will be used in the game engine, for GLSL, and
other opengl extensions.
* According to the GLEW website it works on Windows, Linux, Mac OS X,
FreeBSD, Irix, and Solaris. There might still be platform specific
issues due to this commit, so let me know and I'll look into it.
* This means also that all extensions will now always be compiled in,
regardless of the glext.h on the platform where compilation happens.
Game Engine
===========
Refactoring of the use of opengl extensions and other drawing code
in the game engine, and cleaning up some hacks related to GLSL
integration. These changes will be merged into trunk too after this.
The game engine graphics demos & apricot level survived my tests,
but this could use some good testing of course.
For users: please test with the options "Generate Display Lists" and
"Vertex Arrays" enabled, these should be the fastest and are supposed
to be "unreliable", but if that's the case that's probably due to bugs
that can be fixed.
* The game engine now also uses GLEW for extensions, replacing the
custom opengl extensions code that was there. Removes a lot of
#ifdef's, but the runtime checks stay of course.
* Removed the WITHOUT_GLEXT environment variable. This was added to
work around a specific bug and only disabled multitexturing anyway.
It might also have caused a slowdown since it was retrieving the
environment variable for every vertex in immediate mode (bug #13680).
* Refactored the code to allow drawing skinned meshes with vertex
arrays too, removing some specific immediate mode drawing functions
for this that only did extra normal calculation. Now it always splits
vertices of flat faces instead.
* Refactored normal recalculation with some minor optimizations,
required for the above change.
* Removed some outdated code behind the __NLA_OLDDEFORM #ifdef.
* Fixed various bugs in setting of multitexture coordinates and vertex
attributes for vertex arrays. These were not being enabled/disabled
correct according to the opengl spec, leading to crashes. Also tangent
attributes used an immediate mode call for vertex arrays, which can't
work.
* Fixed use of uninitialized variable in RAS_TexVert.
* Exporting skinned meshes was doing O(n^2) lookups for vertices and
deform weights, now uses same trick as regular meshes.
Now you can do one of the following to disable it:
export NAN_NO_PLUGIN=true
export WITH_BF_WEBPLUGIN=false
or
export WITH_BF_WEBPLUGIN=true to enable building it.
(Its set to false by default)
Kent
[#7660] Solaris 10 x86 support (Makefiles)
Hopefully it will not mess up anything for anyone else. I removed
some hardcoded static libs and made NAN_*_LIB definitions so they could be
overridden, to allow greater flexability.
Let me know if there are any problems/questions.
Kent
The first is it adds libIlmThread.a to the OpenEXR libs.
The second thing it does, is make it possible to define what TARGETS
you want to build inside of your user-def.mk file. This simplifies
source/Makefile quite a bit. I made each platform have the same
defaults (build dynamic blender, gameengine and gameplayer) I think
most platforms should be building this combo anyway and if you need to
change it its trivial so no need to have different defaults for each platform.
The new defines are as follows with their default settings in:
source/nan_definitions.mk
export WITH_BF_DYNAMICOPENGL ?= true
export WITH_BF_STATICOPENGL ?= false
export WITH_BF_GAMEENGINE ?= true
export WITH_BF_GAMEPLAYER ?= true
export WITH_BF_WEBPLUGIN ?= false
Let me know if you have any problems with it.
Kent
- Added a new Brush datablock, only used by image paint, but intended
to be used in texture paint, vertex paint, weight paint and sculpt
mode also.
- Being a datablock, these brushes can be saved, appended and linked.
They have a fake user by default, to make sure they are saved even if
not selected.
Image Painting:
- Replaced the img module with C code in imagepaint.c
- Airbrush is no longer a separate tool, but rather an option that can
be used for soften, smear and clone also.
- Blend modes mix, add, subtract, multiply, darken and lighten have been
added, code taken directly from vertex paint.
Note to project files maintainers:
- The img module was removed from SCons and Makefiles, and this should
be done in other build systems also. I'll wait to remove the module
from cvs, to not break compilation.
- patch from Douglas with endian fixes
- Makefile adds static libiconv.a from lib/
- this version will use OpenEXR libs from lib/ too, and is latest release
with threading support
- openAL is missing, added it as default to not include it
always statically (you have to force it to build a dynamic library) the
resulting binary is redistributable.
The code is made ffmpeg-version independent using #ifdef's.
Here are my notes on things to look out for as potential problem
spots:
source/blender/blenkernel/intern/displist.c:
+ is initfastshade(void) supposed to be empty? I had
to make it empty to get the merged tree to compile.
source/blender/python/api2_2x/Armature.c:
+ went with the version that had Armature_getLayers()
source/blender/python/api2_2x/Object.c
+ went with the version of Object_getPose() from bf-blender.
(#ifdef 0-ed the other version)
source/blender/python/api2_2x/Pose.[ch]
+ had problems linking due to no Pose_Init() ... copied these
two files straight from bf-blender.
source/blender/src/drawview.c:
+ view3d_panel_properties() had things shifted a few things shifted
a few pixels, otherwise, things were painless
source/blender/src/splash.jpg.c:
+ went with bf-blender version (orange is dead)
source/gameengine:
+ went with bf-blender version -- does not compile due to IMB_rect* stuff,
Ton should look into this.
A full detailed description of this will be done later... is several days
of work. Here's a summary:
Render:
- Full cleanup of render code, removing *all* globals and bad level calls
all over blender. Render module is now not called abusive anymore
- API-fied calls to rendering
- Full recode of internal render pipeline. Is now rendering tiles by
default, prepared for much smarter 'bucket' render later.
- Each thread now can render a full part
- Renders were tested with 4 threads, goes fine, apart from some lookup
tables in softshadow and AO still
- Rendering is prepared to do multiple layers and passes
- No single 32 bits trick in render code anymore, all 100% floats now.
Writing images/movies
- moved writing images to blender kernel (bye bye 'schrijfplaatje'!)
- made a new Movie handle system, also in kernel. This will enable much
easier use of movies in Blender
PreviewRender:
- Using new render API, previewrender (in buttons) now uses regular render
code to generate images.
- new datafile 'preview.blend.c' has the preview scenes in it
- previews get rendered in exact displayed size (1 pixel = 1 pixel)
3D Preview render
- new; press Pkey in 3d window, for a panel that continuously renders
(pkey is for games, i know... but we dont do that in orange now!)
- this render works nearly identical to buttons-preview render, so it stops
rendering on any event (mouse, keyboard, etc)
- on moving/scaling the panel, the render code doesn't recreate all geometry
- same for shifting/panning view
- all other operations (now) regenerate the full render database still.
- this is WIP... but big fun, especially for simple scenes!
Compositor
- Using same node system as now in use for shaders, you can composit images
- works pretty straightforward... needs much more options/tools and integration
with rendering still
- is not threaded yet, nor is so smart to only recalculate changes... will be
done soon!
- the "Render Result" node will get all layers/passes as output sockets
- The "Output" node renders to a builtin image, which you can view in the Image
window. (yes, output nodes to render-result, and to files, is on the list!)
The Bad News
- "Unified Render" is removed. It might come back in some stage, but this
system should be built from scratch. I can't really understand this code...
I expect it is not much needed, especially with advanced layer/passes
control
- Panorama render, Field render, Motion blur, is not coded yet... (I had to
recode every single feature in render, so...!)
- Lens Flare is also not back... needs total revision, might become composit
effect though (using zbuffer for visibility)
- Part render is gone! (well, thats obvious, its default now).
- The render window is only restored with limited functionality... I am going
to check first the option to render to a Image window, so Blender can become
a true single-window application. :)
For example, the 'Spare render buffer' (jkey) doesnt work.
- Render with border, now default creates a smaller image
- No zbuffers are written yet... on the todo!
- Scons files and MSVC will need work to get compiling again
OK... thats what I can quickly recall. Now go compiling!
These should make it so that other people can compile with OpenEXR support.
(I also added the OPENAL fix erwin commited to bf-blender since I
need it for my machine, and this syncs up the file)
Kent
Armatures are back
Split screen
Double sided lightning
Ambient lighting
Alpha test
Material IPO support (one per object atm)
Blender materials
GLSL shaders - Python access
Up to three texture samplers from the material panel ( 2D & Cube map )
Python access to a second set of uv coordinates
See http://www.elysiun.com/forum/viewtopic.php?t=58057
so there will be more files following.
Anyway: NEW BOOLEANS from Google Summer of Code (Courtesy of Marc Freixas)
Known problems:
- Random freezes while using them as a modifier. This may not be directly
related to modifiers though - it's maybe just the huge number of
operations that leads to a higher probability of triggering a bug
- Static booleans (the first 3 entries in the WKEY menu) are borked
anyway, this is not due to this commit.
- Errors when exiting Blender (dupli_alloc stuff), is not related to this
commit, either.
Please test if everything works, and check the other build systems, I only
know that make works.
Also, compare the results of, say, cube-cylinder, in old and new booleans
:)
So for the 2.4 release, both bullet AND sumo will be enabled. You can choose in the world buttons which physics engine is active for a scene.
sorry if this breaks your builds!
to the Cygwin platform. This produced some silly error message about files
which haven't existed in the CVS repository for many months now. I can
remember seeing this message for at least a year and since it has *never*
changed I decided to investigate. Looks like unmaintained part of the
build system that nobody pays attention to but just in case I've left it
in tact with the following comment:
This code below seems outdated and doesn't even seem to apply to the
Windows platform. I've commented it out until someone can take a look at it
and confirm or deny. If it breaks anything blame Chris Burt / Desoto
Hopefully that's clear enough, but I really think this is a trivial change
and if after review nobody minds I'll simply erase the offending code.
To enable it you will need to download OpenEXR and install it.
For the Makefiles you will need to set WITH_OPENEXR=true
and set NAN_OPENEXR to point to where OpenEXR is installed.
For scons you'll need to remove config.opts to get the new options
so you can enable OpenEXR, I was not able to get blender to link
with scons so the scons stuff may need to be tweaked a little but
I think it should work.
For other platform managers The OpenEXR stuff is similar to QUICKTIME
you need to define WITH_OPENEXR and setup the library stuff and
as you'll notice in this commit there are two extra files.
Kent