Commit Graph

46053 Commits

Author SHA1 Message Date
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
Campbell Barton
cd6d337d41 Beautify - use a heap for the edge rotation queue rather then checking to rotate all edges until none can be rotated.
this means the best edges to rotate are done first, also speeds up execution ~20% in my tests.
2013-03-30 11:05:57 +00:00
Campbell Barton
20376f3337 code cleanup: move beauty fill calculation into its own function and some style cleanup 2013-03-30 09:57:35 +00:00
Campbell Barton
b1f4e2b4db code comments: bmesh operator doxy header descriptions. 2013-03-30 08:54:50 +00:00
Thomas Dinges
96c2647676 Compile fix for recent OCIO commit, missing GLEW include. 2013-03-29 16:17:22 +00:00
Sergey Sharybin
2dff7c01ad Implement GPU-side display transform for clip editor
Implemented using GLSL API from OpenColorIO library and
some general functions were added to it's c-api:

- OCIO_setupGLSLDraw prepares OpenGL context for GPU-based
  transformation for a giver processor.

  This function compiles and links shader, sets  up it's
  argument. After this transformation would be applied
  on an image displaying as a 2D texture.

  So, glaDrawPixelsTex called after OCIO_setupGLSLDraw will
  do a proper color space transform.

- OCIO_finishGLSLDraw restores OpenGL context after all
  color-managed display is over.

- OCIO_freeOGLState frees allocated state structure used
  for cacheing some GLSL-related stuff.

There're some utility functions in IMB_colormanagent which
are basically proxies to lower level OCIO functions but
which could be used from any place in blender.

Chacheing of movie clip frame on GPU is also removed now,
and either glaDrawPixelsTex or glaDrawPixelsAuto are used
for display now. This is so no code duplication happens
now and no large textures are lurking around in GPU memory.

Known issues:
- Texture buffer and GLSL are no longer checking for
  video card capabilities, possibly could lead to some
  artifacts on crappy drivers/cards.

- Only float buffers are displaying using GLSL, byte
  buffers will still use fallback display method.

  This is to be addressed later.

- If RGB curves are used as a part of display transform,
  GLSL display will also be disabled. This is also thing
  to be solved later.

Additional changes:

- glaDrawPixelsTexScaled will now use RGBA16F as an
  internal format of storing textures when it's used
  to draw float buffer. This is needed so LUT are
  applied without precision loss.
2013-03-29 16:02:27 +00:00
Antony Riakiotakis
44a43afd0e Slight cleanup for 2d painting. Cache is always enabled (used one of the
bookkeeping variables from when the code was shared with texture
painting) Also texonly now is always zero, probably another leftover
from 2d/3d painting entanglement era.
2013-03-29 15:18:22 +00:00
Antony Riakiotakis
57666b3ff1 Support for brush overlay in texture paint mode. For the image editor,
the tiled overlay is still a bit off, investigating on how to better
correct this, though it may well be non trivial.
2013-03-29 14:02:28 +00:00
Campbell Barton
3f8bb2b079 remove unused GLUquadricObj in draw_manipulator_rotate() 2013-03-29 11:44:52 +00:00
Campbell Barton
c4e2de11ad fix/workaround [#34346] Blender total crashes when File/User preferences twice and go to System tab 2013-03-29 07:14:18 +00:00
Campbell Barton
1777a69818 misc minor edits.
- pass string size to BLI_timestr() to avoid possible buffer overrun.
- quiet warning for mingw.
- include guards for windows utf conversion funcs.
- fix for mistage in edge-angle-selection check.
- some style cleanup.
2013-03-29 06:25:22 +00:00
Campbell Barton
ab41583bc2 style cleanup 2013-03-29 06:21:28 +00:00
Campbell Barton
c826174056 minor improvement to edge-angle-drawing, when transforming verts draw the angle of the opposite edge since this is the angle thats being changed. 2013-03-29 04:38:10 +00:00
Campbell Barton
4506f73055 add edge-angle drawing in editmode for manifold edges. 2013-03-29 04:01:52 +00:00
Campbell Barton
e8105fbf50 minor fix for annoyance with directory selection on windows.
selecting a relative directory through BUTTONS_OT_directory_browse would convert '//' into '//\'.
2013-03-29 01:34:04 +00:00
Campbell Barton
10b4a86dbf code cleanup: quiet warnings building with mingw. 2013-03-29 00:50:52 +00:00
Thomas Dinges
63290beee1 Code cleanup / Sequencer:
* Remove "use_frame_blend" from RNA and UI file, not used anywhere in the code, also mark SEQ_SPEED_BLEND as deprecated.
2013-03-28 22:09:55 +00:00
Campbell Barton
93deb27dd4 fix [#34804] Only timeline_markers[0] is selectable if multiple markers at same frame
also add macros for looping on listbases as if they were circular lists which is handy for cycling over items.
2013-03-28 20:58:14 +00:00
Campbell Barton
986bbbfe8a don't save select extend state for marker selection. 2013-03-28 20:34:12 +00:00
Bastien Montagne
467526545f Use same opencollada rev as windows' libs. 2013-03-28 20:24:36 +00:00
Campbell Barton
8e3d590b76 code cleanup: python/pep8 and double-promotion warnings. 2013-03-28 19:33:14 +00:00
Gaia Clary
8fce915b6e scon update for new collada libraries 2013-03-28 18:04:07 +00:00