Commit Graph

45974 Commits

Author SHA1 Message Date
Brecht Van Lommel
f7efb51054 Fix #34803: blender internal SSS rendering black/nan with negative texture colors. 2013-04-02 17:49:31 +00:00
Sergey Sharybin
c4780c233e Fix for potential missing draw-update when building without OCIO 2013-04-02 17:39:34 +00:00
Sergey Sharybin
752ad1bc37 More usage of GLSL for color managed image drawing
Uses GLSL for drawing image in Image Editor space.

This requires change in image_buffer_rect_update, so
original float buffer is being updated as well. This
is unlikely be something bad, but will keep an eye
on this change.

Also no byte buffer allocation happens there, this
is so because byte buffer used for display only
and in case of GLSL display such allocation and
partial update is just waste of time.

Also switched OpenGL render from using CPU color
space linearization to GLSL color space transform.
Makes OpenGL rendering pretty much faster (but
still slower than in 2.60).

internal changes:

- Added functions to setup GLSL shader for color
  space conversion in colormanagement.c. Currently
  conversion form a colorspace defined by a role to
  linear space is implemented. Easy to extend to
  other cases.

- Added helper functions to glutil.c which does
  smarter image buffer draw (calling all needed OCIO
  stuff, editors now could draw image buffer with a
  single function call -- all the checks are done in
  glutil.c).

- Also added helper function for buffer linearization
  from a given role to glutil.c. Everyone now able to
  linearize buffer with a single call.

  This function will do nothing is GLSL routines fails
  or not supported.

  And one last this: this function uses offscreen
  drawing, could potentially give issues on some
  cards, also will keep an eye on this.
2013-04-02 17:28:37 +00:00
Sergey Sharybin
f871d9a82f Fixes for recent GLSL display space conversions
- Building without OCIO will give correct results again
- If GLSL failed to compile, fallback to glaDrawPixelsAuto
  will happen.
2013-04-02 17:28:29 +00:00
Ton Roosendaal
726dedafbc More Histogram fixes:
Sequencer histogram was calculating still badly, now it uses a per-color
component counter to calculate the levels (instead of counter for all)
2013-04-02 17:12:21 +00:00
Brecht Van Lommel
dc685bc1c3 Fix #34711: matcap option not showing when switching from cycles material/rendered
draw mode to blender internal.
2013-04-02 16:51:23 +00:00
Brecht Van Lommel
0aada35e93 Fix #34788, #34744: GLSL error, #version line needs to be at the top of the shader
and this wasn't the case anymore after recent changes.
2013-04-02 16:37:31 +00:00
Brecht Van Lommel
5c74e6dae2 Cycles: small code cleanup + fix SSS closure mixed with other closures doing
a bit too much work.
2013-04-02 16:37:28 +00:00
Brecht Van Lommel
be1a5a2328 Fix 34831: SSS issue with non-progressive render, due to error in closure merging code. 2013-04-02 15:53:24 +00:00
Joerg Mueller
97ce56dc76 Bugfix for [#34845] FFmpeg: .wav file playback crashes Blender since r55693 2013-04-02 15:48:09 +00:00
Brecht Van Lommel
952f03150f Fix #34832: SSS render freeze with object instances. 2013-04-02 14:19:05 +00:00
Brecht Van Lommel
5ac6e1ae84 Fix #34833: crash using SSS node on windows, invalid memory access when building lookup table. 2013-04-02 13:34:50 +00:00
Ton Roosendaal
00a1dca612 Removed leftover debug print. 2013-04-02 13:15:12 +00:00
Antony Riakiotakis
dbfadcad61 Fix compilation on MinGW(64/32)
Also, add appropriate lib paths for recent OpenCollada for mingw32 (coming soon to an svn server near you)
2013-04-02 13:07:01 +00:00
Ton Roosendaal
5105ddae74 Missing GLEW path in CMake, fixes compile error in OS X. 2013-04-02 12:54:47 +00:00
Ton Roosendaal
58530a5aff Usability fix, for color grading.
The Scopes and Histogram (Image editor, Sequencer) were not updating on
changes in color or display settings. 

- Missing notifiers for refreshing
- Missing code to draw correct for managed byte buffers.
2013-04-02 12:41:11 +00:00
Ton Roosendaal
a78aa15cd6 Key mapping conflict for 'find node' versus 'add socket link' (noodle).
Historically, F shortcut was for 'add edge/face' in Blender.
In Node editor, F makes a noodle, ctrl+f made a noodle replace too.

To keep ALT+F work for "Unattach from frame", the solution I now propose
is to make CTRL+F for finding nodes, and SHIFT+F for 'add noodle with replace'.
2013-04-02 12:38:05 +00:00
Lukas Toenne
8abfaf880d Fix for #34756 and #34810, crashes when dropping nodes onto noodles and a related forward compatibility bug.
Added a sanity check to the ED_node_link_insert function to ensure it exits gracefully if no suitable sockets can be found. This was the problem with custom pynodes, which don't define the 'type' DNA of old sockets. The operator will have to be generalized for future nodes, but for now just not crashing seems good enough.

Script node crashes in #34810 were caused by uninitialized 'type' integer as well. This is now done in the set_typeinfo function for sockets (like for trees and nodes too), to avoid any potential remaining issues of this kind. Note that new files need to be loaded and saved again once to be forward compatible again.
2013-04-02 11:59:27 +00:00
Campbell Barton
37bf7dd98a draw helper lines for inset and bevel operators, the mouse distance from the selection center was used, but often it was hard to tell where this was and you'd have to guess.
adds ED_region_draw_mouse_line_cb() generic draw callback for mouse helper lines.
2013-04-02 10:48:11 +00:00
Bastien Montagne
932820499a Usual typo fixing... 2013-04-02 07:27:39 +00:00
Joshua Leung
186f0e241e Compile fix: size_t (required by BLI_string.h) was undefined 2013-04-02 03:51:42 +00:00
Antony Riakiotakis
d067ba9cbc Fix build for MinGW without opencollada (updated libs coming soon), MinGW64 now builds with opencollada 2013-04-02 02:05:03 +00:00
Brecht Van Lommel
07d027b102 Fix FFMPEG build error with older versions after planar formats commit. 2013-04-01 20:51:52 +00:00
Brecht Van Lommel
de9dffc61e Cycles: initial subsurface multiple scattering support. It's not working as
well as I would like, but it works, just add a subsurface scattering node and
you can use it like any other BSDF.

It is using fully raytraced sampling compatible with progressive rendering
and other more advanced rendering algorithms we might used in the future, and
it uses no extra memory so it's suitable for complex scenes.

Disadvantage is that it can be quite noisy and slow. Two limitations that will
be solved are that it does not work with bump mapping yet, and that the falloff
function used is a simple cubic function, it's not using the real BSSRDF
falloff function yet.

The node has a color input, along with a scattering radius for each RGB color
channel along with an overall scale factor for the radii.

There is also no GPU support yet, will test if I can get that working later.

Node Documentation:
http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/Nodes/Shaders#BSSRDF

Implementation notes:
http://wiki.blender.org/index.php/Dev:2.6/Source/Render/Cycles/Subsurface_Scattering
2013-04-01 20:26:52 +00:00
Brecht Van Lommel
40b05d364e Cycles: code refactoring to add generic lookup table memory. 2013-04-01 20:26:43 +00:00
Joerg Mueller
8588fec935 FFMPEG: adding support for ffmpeg planar formats also to writeffmpeg.c. 2013-04-01 15:31:27 +00:00
Ton Roosendaal
c35dec60b5 Node editing feature:
New operator "Find Node".
Opens search menu, and allows to find a node based on name or label.

On selecting name, menu selects/activates the node and moves the view to it.

Shortcut: ALT+F 
Menu: Node editor, "Select"
2013-04-01 15:07:22 +00:00
Sergey Sharybin
03c337f61c Epic fail in original GLSL display transform commit
Apparently C== allowed to have implementations of
OCIOImpl::setupGLSLDraw, OCIOImpl::finishGLSLDraw and
OCIOImpl::freeGLState in two different files.

STUPID!
2013-04-01 13:41:45 +00:00
Sergey Sharybin
689f3aa174 Fix for recent changes in IMB_display_buffer_acquire
Do early out when ibuf has 4 channels only, allocate
4-channels display buffer.

So now we could always assume byte buffer is always
in RGBA format.
2013-04-01 12:22:52 +00:00
Sergey Sharybin
daa1e5bff2 Fix for GLSL display: NULL view_settings are allowed now
Currently no functional changes for users, but this change
is crucial for further GLSL images display.
2013-04-01 12:08:43 +00:00
Campbell Barton
5d234f0a0b code cleanup: includes 2013-04-01 11:27:47 +00:00
Sergey Sharybin
547342bf73 Hopefully compilation with FFmpeg 0.10 works fine now. 2013-04-01 10:53:29 +00:00
Campbell Barton
9328ae282c remove duplicate defines in makesrna.c 2013-04-01 10:26:16 +00:00
Campbell Barton
6d8e25dfdc code cleanup: split editmesh_tools.c, into inset, bevel (both modal operators) and moved extrude operators into their own file.
also move some selection operators from editmesh_tools.c into editmesh_select.c
2013-04-01 10:18:01 +00:00
Sergey Sharybin
e8d0e77856 Fix #34813: smooth brush used on a shape key messes up the topology - part2
This reverts rev55642 and fixes issue in a different way.

The thing here is: isolated vertices are for sure not in BVH
and updating keyblock could not only rely on idea that all
vertices are in BVH (no idea why it was noticed just now).

Solved in a way, that uses old keyblock coordinates as new
keyblock, and then refines it using coordinates from BVH.

Hopefully it'll cover all cases now :)
2013-04-01 09:55:37 +00:00
Joerg Mueller
271a7a5554 Audaspace: adding support for ffmpeg planar formats, breaks support for older ffmpeg versions. 2013-04-01 09:46:35 +00:00
Sergey Sharybin
3657f3d938 Draw checker backdrop for sequencer when in RGBA mode 2013-04-01 09:15:37 +00:00
Campbell Barton
c7e2a31bf2 correct too-big allocation in mesh beautify. 2013-04-01 07:57:33 +00:00
Sergey Sharybin
5e02acf887 Fix #34819: Background image gets pixelated when zooming in
Was a regression in glaDrawPixelsTex changes related on zoom filter.
For background image linear interpolation was used.
2013-04-01 07:50:51 +00:00
Sergej Reich
4e0e9eb994 Draw relationship lines for rigid body constraints
Makes it easier to see what's connected to what.
2013-03-31 19:52:37 +00:00
Thomas Dinges
6382ebe67d Fix for [#34821] Split Viewer node won't show the backdrop
* Regression introduced in r55451
2013-03-31 19:46:11 +00:00
Sergej Reich
146a1545c3 Fix typo in recent i18n changes
Broke rigid body buttons in physics tab.
2013-03-31 17:41:22 +00:00
Antony Riakiotakis
8d036a21d7 Changes to Stencil control:
* Add a poll function that only activates the operator when a stencil
brush is active
* Change shortcuts to RMouse - translate, Shift - RMouse Scale, Ctrl -
RMouse, rotate. MUCH faster and simpler workflow.
* Change shortcut of colour sampling to S. Sampling is important but not
as important as warranting the Right Mouse button.
* Add a notifier so that toolbar gets updated texture rotation when
rotating the stencil

Also,
* Slight rearrangement of options so that jittering is more accessible
(easily more often used than smooth stroke)
2013-03-31 16:17:18 +00:00
Antony Riakiotakis
c33d5c7133 optimize away reloading of brush texture when rotating the stencil 2013-03-31 11:20:30 +00:00
Antony Riakiotakis
514c449a54 UI cleanup:
* Using masking is determined only by the presence of the texture,
remove extraneous DNA flag (might cause issues later but in practice
brush options are not harmful)
* Overlay and angle sliders are active during stencil mapped brushes
* Only draw the overlay if there's a texture.
2013-03-31 11:04:13 +00:00
Campbell Barton
e8d532f1dd style cleanup 2013-03-31 03:28:46 +00:00
Thomas Dinges
2c58e96685 Cycles / Shader Graph optimization:
* Unnecessary shader inputs inside the Mix Shader are now ignored, in case the factor is 0.0 / 1.0 and not connected. 
This way we save some render time for complex node graphs. 

Example: http://www.pasteall.org/pic/show.php?id=48226
Check the Mix Shader at the end: In this case, Cycles will now avoid the complete huge shader tree, and only calculate the Diffuse Shader.
Rendertime decreased from 1:50 min to 1:20 min on CPU. GPU rendering benefits as well from this. 

This only affects SVM, OSL was already doing these optimizations.
2013-03-31 01:18:10 +00:00
Antony Riakiotakis
1fea6220a2 Woot woot commit.
Stencil style texture mapping. Ready for field testing and user feedback.

This commit adds stencil like brushes, like those that existed on old ptex branch.
(with the exception of clip colour)
To control the position of the stencil, you use

Q: translation
Shift - Q: scaling
Ctrl - Q: rotation

There's extra work that has been done to make this work:

* Support for coloured overlay in vertex/texture painting
* Also made A button do stroke mode selection like in sculpt mode,
when mask painting is inactive.

There are some TODOs to work on during bcon3:

* Support tiled and stencil mode in 2D painting. Support alpha textures also.
* Tidy up overlay code. There's some confusion there due
to the way we use the primary brush texture sometimes for alpha, other times
for colour control.

WIP design docs will be in

http://wiki.blender.org/index.php/User:Psy-Fi/New_Brush_Tool_Design
2013-03-31 00:38:50 +00:00
Daniel Genrich
68ac08681a Elbeem fluid: Remove hardcoded 16GB RAM limit on 64bit systems 2013-03-30 20:50:28 +00:00
Antony Riakiotakis
ae1028df73 Tidy up stroke options and make them sexy, aka the paint option
sculptification commit. We have a drop menu to select the stroke mode
now. Jitter controls appear under stroke panel under all modes (As they
should! They stroke control options). Also enable jittering for all
modes. I really fail to see why not.
2013-03-30 11:40:09 +00:00