Conflicts resolved:
source/blender/blenloader/intern/readfile.c
source/blender/render/intern/source/convertblender.c
source/blender/render/intern/source/pipeline.c
Also addressed code inconsistency due to changes in the trunk revision 50628 (color
management with OCIO) and 50806 (UV project material). OCIO-related changes are marked
OCIO_TODO as in some other files modified in revision 50628.
Replace old color pipeline which was supporting linear/sRGB color spaces
only with OpenColorIO-based pipeline.
This introduces two configurable color spaces:
- Input color space for images and movie clips. This space is used to convert
images/movies from color space in which file is saved to Blender's linear
space (for float images, byte images are not internally converted, only input
space is stored for such images and used later).
This setting could be found in image/clip data block settings.
- Display color space which defines space in which particular display is working.
This settings could be found in scene's Color Management panel.
When render result is being displayed on the screen, apart from converting image
to display space, some additional conversions could happen.
This conversions are:
- View, which defines tone curve applying before display transformation.
These are different ways to view the image on the same display device.
For example it could be used to emulate film view on sRGB display.
- Exposure affects on image exposure before tone map is applied.
- Gamma is post-display gamma correction, could be used to match particular
display gamma.
- RGB curves are user-defined curves which are applying before display
transformation, could be used for different purposes.
All this settings by default are only applying on render result and does not
affect on other images. If some particular image needs to be affected by this
transformation, "View as Render" setting of image data block should be set to
truth. Movie clips are always affected by all display transformations.
This commit also introduces configurable color space in which sequencer is
working. This setting could be found in scene's Color Management panel and
it should be used if such stuff as grading needs to be done in color space
different from sRGB (i.e. when Film view on sRGB display is use, using VD16
space as sequencer's internal space would make grading working in space
which is close to the space using for display).
Some technical notes:
- Image buffer's float buffer is now always in linear space, even if it was
created from 16bit byte images.
- Space of byte buffer is stored in image buffer's rect_colorspace property.
- Profile of image buffer was removed since it's not longer meaningful.
- OpenGL and GLSL is supposed to always work in sRGB space. It is possible
to support other spaces, but it's quite large project which isn't so
much important.
- Legacy Color Management option disabled is emulated by using None display.
It could have some regressions, but there's no clear way to avoid them.
- If OpenColorIO is disabled on build time, it should make blender behaving
in the same way as previous release with color management enabled.
More details could be found at this page (more details would be added soon):
http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.64/Color_Management
--
Thanks to Xavier Thomas, Lukas Toene for initial work on OpenColorIO
integration and to Brecht van Lommel for some further development and code/
usecase review!
Several users requested the recovery as the removal of the two parameters was considered over-simplification for advanced users.
As in the Python Scripting mode, the two parameters are in the "advanced edge detection options" section and disabled by default.
Also the lower limit of Kr derivative epsilon was changed from 0 to -1000 so as to permit a negative value.
The Post Processing tab in the Render buttons has new Line Thickness options for
defining unit line thickness in two different modes as follows:
1. Absolute mode: The unit line thickness is given by a user-specified number
in units of pixels. The default value is 1.
2. Relative mode: The unit line thickness is scaled by the proportion of the
present vertical image resolution to 480 pixels. For instance, the unit line
thickness is 1 with the image height set to 480, 1.5 with 720, and 2 with 960.
The new options enable a better control on the position of stroke thickness with
respect to stroke backbone geometry. Three predefined positions are:
* center: thickness is evenly split to the left and right side of the stroke geometry.
* inside: strokes are drawn within object boundary.
* outside: strokes are drawn outside the object boundary.
Another option called "relative" allows users to specify the relative position by a
number between 0 (inside) and 1 (outside).
The thickness position options are applied only to strokes of the edge types SILHOUETTE
and BORDER, since these are the only edge types defined in terms of object boundary.
Strokes of other edge types are always using the "center" option.
* Sphere radius and Kr derivative epsilon were removed from the
Parameter Editor mode. Now sphere radius of 1.0 and Kr derivative
epsilon of 0.0 are used by default. The rationale of the removal
is two-fold: little predictability and very minor artistic values.
The effects of these parameters are hard to estimate in advance,
which likely leads to a frustration of users due to repeated
trials and unpredicted results. Therefore, the two parameters
are considered to have quite limited artistic values. Proper
definitions of the two parameters more and less require the
knowledge of differential geometry and would not make sense to
most artists for which the Parameter Editor is intended.
* Sphere radius and Kr derivative epsilon are still available in
the Python Scripting mode, but now in an "advanced options" section
that is disabled and hidden by default. This way new users are
properly warned, while expert users with specific technical needs
can enable these options if they want. The same default values
mentioned above are used when the two parameters are disabled.
For premultiplied alpha images, this makes any color space conversion for the image
or render output work on color without alpha multiplied in.
This is typically useful to avoid fringing when the image was or will be composited
over a light background. If the image will be composited over a black background on
the other hand, leaving this option off will give correct results.
In an ideal world, there should never be any color space conversion on images with
alpha, since it's undefined what to do then, but in practice it's useful to have
this option.
Patch by Troy Sobotka, with changes by me.
---------------------------------------------------------------
This was a test drive to see how painful the merge will be.
Next batches are:
- use desktop option for fullscreen
- multisampling option
- bullet collision mask
- python
- storage (vbo, dl, ...)
- lighting
[lighting still needs review]
[python could use review, although it should be straightforward]
[storage should be tested more I think]
Merged /branches/soc-2011-cucumber:r
36991,37059,37157,37416,37497-37499,37501,37522,39036,40593
36991:
==UI==
* Made some options available in Blender Game that were only available in Blender Render (camera resolution, animation fps)
* Created a panel for the embedded player
* Renamed the FPS option for the standalone player to Refresh Rate
* Moved framing options to display
* Made a button to launch the blender player from within blender (only tested on windows for now)
37059:
==UI==
* Added the option to change the exit key for the BGE. The UI currently just sets a number, and this feature most likely does not work for blenderplayer yet. More work on this to come.
* Removed the physics settings from the scene panel for the BGE.
* Added an Add menu in the logic brick header.
37157:
Making the bake options available in Blender Game
37416:
Making the exit key UI element accept key presses instead of numbers. It still does not work for the Blenderplayer, and it does not limit the input to key presses (other events don't work for exiting)
37497:
Some more work on getting the exit key to work in the Blenderplayer.
Input is now restricted to keyboard events only for the exit key UI.
37498:
Some clean up from the last commit.
The exit key setting affects the Blenderplayer now.
37499:
Cleaning up some duplicate code. Now the reverseTranslateTable for converting blender key codes to ketsji key codes is only defined in BL_BlenderDataConverter.
37501:
Centralizing the exit key methods to the keyboard devices. This should make it easier to get exit key control to the python API.
[37517: committed previously]
37522:
Moved control of the exit key away from the keyboard devices, and moved it to ketsjiengine.
Added setExitKey and getExitKey to the python API
39036:
A couple of the doversions were in the wrong spot. This should fix some issues with the exit key not being set.
[not committed entirely, see below]]
40552: space_logic.py (* fixed an error in space_logic.py *)
40593:
launch blenderplayer from ui not working in OSX fix - by Daniel Stokes and me
########################################################
code left behind (to be included in next commit):
########################################################
{
/* Initialize default values for collision masks */
Object *ob;
for(ob=main->object.first; ob; ob=ob->id.next)
ob->col_group = ob->col_mask = 1;
}
* Added a new chain splitting option for dividing chains into pieces having
a given curvilinear 2D length.
* Rearranged the UI controls of chain splitting options according to the
actual order of processing.
* Made changes for converting each view edge into a chain in the case of
not using chaining.
- UV's were not being calculated if there were too many VColor layers.
- precalc (omd->size * omd->spatial_size) was being called in a loop.
- use vector functions to avoid pointer indrections on each access which the compiler wont optimize - eg: och->ibufs_disp[f]->rect_float[4*(res_x*j + i) + 1]
- dont call abs() on ints (converts to double and back to int in this case).
also unrelated render buttons change. move saving options directly under the file path since these were easy to confuse with image format options like zbuf, ycc, preview.. etc.
of copy/paste functionality. Instead of making a copy of the active
line set, now the settings of the active line set are copied to and
pasted from a buffer. This allows for copying and pasting line set
settings among different scenes and render layers.
that produces a blueprint using circular, elliptic, and square contour strokes.
Related changes and bug fixes were made as follows:
* The randomness in radius and center has been transformed into optional
parameters of the pyBluePrintCirclesShader and pyBluePrintEllipsesShader.
Also a new optional parameter to control the randomness of backbone
stretching has been added to the pyBluePrintSquaresShader.
* A bug in the pyBluePrintSquaresShader that invisible stroke vertices at
corners of rectangular contour strokes were not properly drawn. The problem
was due to the changes of the / operator between Python 2.x to 3.x. Even
when the two operands of the division operator are integers, Python 3.x
gives a floating-point number when the quotient is not an integer. The fix
was just to replace the / operator by the // operator for integer division.
* An unpleasant discontinuity in circular and elliptical contour strokes
was fixed.
* The length parameter of the Backbone Stretcher geometry modifier has been
renamed to `backbone_length' in line with the parameter of the same name in
the pyBluePrintSquaresShader.
In the Parameter Editor mode, each edge type check button in the Selection
by Edge Types has now an associated toggle button to exclude the edge type
from the feature edge selection. This allows you to select, for instance,
those edges that are silhouette lines but not external contours.
New "face marks" and "edge marks" have been introduced in mesh data
blocks. In the edit mode of a mesh object, face marks can be put
to selected faces by choosing Mesh >> Faces >> Mark Freestyle Face
from the menu of a 3D View window or Ctrl-F >> Mark Freestyle Face
from the context menu. Similarly, edge marks can be put to selected
edges by Mesh >> Edges >> Mark Freestyle Edge or Ctrl-E >> Mark
Freestyle Edge. These marks should work fine with the Subdivision
surface modifier.
Moreover, two new conditions for feature edge selection have been
added to the Parameter Editor mode as described below:
1. The Selection by Edge Types option has now the new Edge Mark type,
which can be used to (de)select feature edges having edge marks.
This option can be used to add to (or remove from) the view map
arbitrary edges of mesh objects.
2. Selection by Face Marks option has been newly introduced, in which
face marks are used for feature edge selection in two ways. One
option is called "One Face" which is to (de)select feature edges if
one of faces on the left and right of each feature edge has a face
mark. The other option is "Both Faces" to (de)select feature edges
if both faces on the left and right have a face mark.
New there are only two chaining types: plain and sketchy. Both chaining types
have the "same object" option. With this option enabled, only feature edges of
the same object are chained. The sketchy chaining also has the "rounds" option
to specify the number of rounds in a sketchy multiple touch.
Also removed a temporary workaround (implemented by means of a custom chaining
rule) for infinite straight lines, which has resulted in much cleaner strokes.
The default chaining option is now called "Natural", while the new chaining options
are "Sketchy: Topology Preserved" and "Sketchy: Topology broken". The latter two
options allow for generating chains of feature edges with a sketchy multiple touch.
The "Sketchy: Topology Preserved" option takes account of the topology of objects
in the view map, while the "Sketchy: Topology broken" ignores the edge topology.
The "rounds" option specifies the number of rounds in sketchy strokes.
- Make gettext stuff draw-time. so switching between languages
can happens without restart now.
- Added option to translate visible interface (menus, buttons, labels)
and tooltips. Now it's possible to have english UI and localized tooltips.
- Clean-up sources, do not use gettext stuff for things which can be
collected with RNA.
- Fix issues with windows 64bit and ru_RU locale on my desktop
(it was codepage issue).
- Added operator "Get Messages" which generates new text block with
with all strings collected from RNA.
- Changed script for updating blender.pot so now it appends
messages collected from rna to automatically gathered messages.
To update .pot you have to re-generate messages.txt using "Get Messages"
operator and then run update_pot script.
- Clean up old translation stuff which wasn't used and most probably
wouldn't be used.
- Return back "International Fonts" option, so if it's disabled, no
gettext lookups happens on draw.
- Merged read_homefile function back. No need in splitting it.
TODO:
- Custom fonts and font size.
Current font isn't nice at least for russian locale, it's
difficult to read it.
- Put references to messages.txt so gettext can merge translation when
name/description of some property changes.
Made a major amount of conflict resolution for code adaptation to
the animation system updates introduced in the Pepper branch recently
merged to the trunk.
Resolved conflicts:
source/blender/blenkernel/intern/anim_sys.c
source/blender/blenkernel/intern/library.c
source/blender/editors/animation/anim_channels_defines.c
source/blender/editors/animation/anim_channels_edit.c
source/blender/editors/animation/anim_filter.c
source/blender/editors/animation/keyframes_draw.c
source/blender/editors/animation/keyframes_edit.c
source/blender/editors/include/ED_anim_api.h
source/blender/editors/space_nla/nla_buttons.c
source/blender/editors/space_nla/nla_channels.c
source/blender/makesdna/DNA_action_types.h
source/blender/makesdna/intern/makesdna.c
source/blender/makesrna/intern/rna_main_api.c
Added a set of stroke geometry modifiers to the Geometry tab of line styles
in the Parameter Editor mode. Now the following stroke geometry modifiers are
available, each with a set of animateable parameters:
- Sampling: changes the resolution of stroke backbone polylines.
- Bezier Curve: replace stroke backbone with a Bezier approximation of the
stroke backbone.
- Sinus Displacement: add sinus displacement to stroke backbone.
- Spatial Noise: add spatial noise to stroke backbone.
- Perlin Noise 1D: add one-dimensional Perlin noise to stroke backbone.
- Perlin Noise 2D: add two-dimensional Perlin noise to stroke backbone.
- Backbone Stretcher: stretch the beginning and the end of strokes.
- Tip Remover: remove a piece of stroke at the beginning and the end of strokes.
To branch users: When you have a .blend file with Freestyle options specified,
you may want to add a Sampling modifier with the 'sampling' value set to 5.
This value specifies a resolution of polylines for line drawing in Freestyle.
If no sampling modifier is specified, your line drawing will result in coarse
polylines. Before geometry modifiers were introduced, this initial sampling
was automatically done. Now the initial sampling is a tunable parameter that
can be omitted, allowing better control on polyline resolution.
Implemented basic audio animation.
* AnimatableProperty: Propper cache writing and spline interpolation for reading (the solution for stair steps in audio animation)
* Animatable properties so far are: volume, pitch, panning
* Users note: Changing the pitch of a sound results in wrong seeking, due to the resulting playback length difference.
* Users note: Panning only works for mono sources, values are in the range [-2..2], this basically controls the angle of the sound, 0 is front, -1 left, 1 right and 2 and -2 are back. Typical stereo panning only supports [-1..1].
* Disabled animation of audio related ffmpeg output parameters.
* Scene Audio Panel: 3D Listener settings also for Renderer, new Volume property (animatable!), Update/Bake buttons for animation problems, moved sampling rate and channel count here
A mesh can consist out of multiple material. Take a character with clothing's. the skin can be a different material as the different clothing's. During compositing it is a common use-case to only do a part of the composit on only a specific material. Currently this can not be done.
In blender movies this feature is known to be implemented, but until now it never got integrated into trunk.
Proposal
With material index the Blender internal renderer will be capable of creating a buffer containing the material indexes of the first pixel-hit. This will be implemented in the same manner as the object index.
In the compositor the ID Mask node can be used to extract the information out of the Render pass.
Impact
User interface
On the properties-space the next changes will be done
Scene⇒Render layer⇒Passes⇒Material index will be added
Material⇒Options⇒Pass index will be added
DNA
Material struct will get an new field called “index”. this will be a short-type.
Material struct the field pad will be removed.
A new Render-layer pass will be added (bit 1«18)
RNA
Material RNA is updated (based on “pass index” from object)
Render layer RNA is updated (based on IndexOB)
Blender internal renderer
The Blender internal renderer will process the render pass as a copy of the Object index.
Blender compositor
The render layer input will get a new output socket called “IndexMA”
Usage
An example on how to use material index can be found at:
https://svn.blender.org/svnroot/bf-blender/trunk/lib/tests/compositing/composite_materialindex.blend
This is also example of a commit message longer than the commit itself :)
- Sequencer dynamics: Now it's possible to change the output channels and the resampling quality also increased (previously maximum quality was 44,1 kHz)
- Changed two buffers to use ffmpeg allocation, not sure if that helps somehow.
Conflicts resolved:
source/blender/render/intern/source/pipeline.c
Also fixed an inconsistent conflict resolution in the last commit with
regard to release/scripts/startup/bl_ui/properties_render.py. This
problem resulted in empty menus in the GUI.
=======================
Added option to baked named "Bake From Multires" which is avaliable for
normals baking and displacement baking.
If this option is enabled, then no additional hi-res meshes and render
structures would be created . This saves plenty of memory and meshes
with millions of faces could be successfully baked in few minutes.
Baking happens from highest level against viewport subdivision level,
so workflow is following:
- Set viewport level to level at which texture would be applied
during final rendering.
- Choose Displacement/Normals baking.
- Enable "Bake From Multires" option.
- You're ready to bake.
Displacement baker had aditional option named "Low Resolution Mesh".
This option is used to set if you want texture for realtime (games)
usage.
Internally it does the following:
- If it's disabled, displacement is calculated from subdivided
viewport level, so texture looks "smooth" (it's how default
baked works).
- If it's enabled, dispalcement is calculated against unsubdivided
viewport levels. This leads to "scales". This isn;t useful for
offline renders much, but very useful for creating game textures.
Special thanks to Morten Mikkelsen (aka sparky) for all mathematics
and other work he've done fr this patch!
Conflicts resolved:
source/blender/makesrna/RNA_enum_types.h
According to the changes in revision 35667, the Freestyle-related code
in release/scripts/ui/ was moved to release/scripts/startup/bl_ui/.
ui/ --> startup/bl_ui
op/ --> startup/bl_operators
scripts/startup/ is now the only auto-loading script dir which gives some speedup for blender loading too.
~/.blender/2.56/scripts/startup works for auto-loading scripts too.