Commit Graph

95 Commits

Author SHA1 Message Date
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
Robin Allen c4ad2ed253 Omission of a texture node to specify coordinates was regarded as a bug by some users. I rather agree :) 2009-06-13 14:22:40 +00:00
Robin Allen 5d48e04307 Renumbered the texture nodes because they were clashing with the other nodes.
This will break compatibility with previous texnode testing builds (but not
with any released versions)
2009-03-24 18:51:21 +00:00
Robin Allen 51ce279300 Started wrapping nodes in RNA. Only shader nodes have all their options wrapped;
TEX and CMP to follow.

Also, renumbered the texture nodes because when I first wrote them I thought
they could share ID numbers with the SH and CMP nodes. D'oh!
2009-03-24 17:40:58 +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
Robin Allen 09099111e3 Added Scale, fixed bugs incl. patch #18037 2009-02-06 18:09:35 +00:00
Ton Roosendaal 14f180fa04 2.5
Node editor: 

- Linking sockets back.
- Removed obsolete code 
- Add node gives correct pointers for Render stuff
2009-02-06 16:34:05 +00:00
Robin Allen 6a669d00b2 Patch #18015, adds "Value to Normal" node 2009-02-06 01:21:38 +00:00
Robin Allen fbdd75a475 Added compose/decompose, fixed bugs. 2009-02-06 00:55:38 +00:00
Ton Roosendaal c0ee40ab10 2.5
Compositor now uses threaded jobs.

- updates happen per preview node! Check this file for
  fun: http://www.blender.org/bf/composite_image.blend
  (any compo node could get preview!)
- had to ensure the composite data gets fully copied before
  it executes thread, so editing is not frustrated.
- put back node buttons (missing init)
- added WM_jobs api call to check for running job,
  illustrated with red light icon in 'use nodes' button.
- added another callback to WM_jobs, to initialize.
  use this init to ensure you only do it when job really
  starts.
- added an extra notifier option for WM_jobs, to signal
  finished job (like redraw image view)
- fixed file read error, it copied the screen it read,
  instead of using it.
- commented out annoying prints for missing ops in imagewin
2009-01-27 17:12:40 +00:00
Ton Roosendaal f7cb86df3a 2.5
Think global, act local!

The old favorite G.scene gone! Man... that took almost 2 days.
Also removed G.curscreen and G.edbo.

Not everything could get solved; here's some notes.
- modifiers now store current scene in ModifierData. This is not
  meant for permanent, but it can probably stick there until we
  cleaned the anim system and depsgraph to cope better with
  timing issues.
- Game engine G.scene should become an argument for staring it.
  Didn't solve this yet.
- Texture nodes should get scene cfra, but the current implementation
  is too tightly wrapped to do it easily.
2009-01-04 14:14:06 +00:00
Brecht Van Lommel ec00764dd2 2.50: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r17434:HEAD 2008-12-14 17:32:24 +00:00
Robin Allen 402fbd95cc 2 things:
* Patch #17998
* tex_input_vec now takes 3-vector as first argument (was 4-vector).
2008-11-26 13:07:24 +00:00
Brecht Van Lommel b3c238e8bc 2.5: merge with trunk, previous merge was only up to yesterday.
svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r17416:HEAD
2008-11-12 22:03:11 +00:00
Ton Roosendaal 8030cb03fd Patch #7897 Texture Nodes!
Robin (Frrr) Allen did a decent job on this, so we can also welcome him
as a member in the svn committers team to maintain it!

I do the first commit with some minor fixes:
- get Makefiles work
- fix rounding issue with tiles on unit faces
- removed UI includes from tex node

A nice doc in wiki is here:
http://wiki.blender.org/index.php/User:Frr/TexnodeManual

On the todo for Robin is:
- When using one or more Texture-input nodes, you cannot edit them by activating
  (as works now for Material nodes).
- The new "output node" option fails on the default case, when only one
  output node is active. It then shows often a blank menu. Will get fixed asap.
- When using a NodeTree-Texture as input node, the menu for 'active output'
  should not show. NodeTree should ignore other nodetrees to keep things sane
  for now.
- On a future todo is proper usage of "Dxt" and "Dyt" texture vectors for
  superior antialising of checkers/bricks.

General note; I know people are dying to get a full integrated shader system
with nodes. In theory we could merge this with Material Nodetrees... but I 
rather wait for a solid and very well thought out design proposal for this, 
also including design ideas for unifying with a shader language (GPU, CPU).
For the time being this is a nice extension of current textures. :)
2008-11-12 19:03:50 +00:00
Brecht Van Lommel cb89decfdc Merge of first part of changes from the apricot branch, especially
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.
2008-09-04 20:51:28 +00:00
Willian Padovani Germano 9ea5788c37 == PyNodes ==
Bug #10104 reported by bebraw: missing check for how many node sockets were being created by a pynode script. Too many (more than MAX_SOCKET == 64) would crash Blender.

http://projects.blender.org/tracker/?func=detail&atid=125&aid=10104&group_id=9

Notes: moved the MAX_SOCKET define from node.c to BKE_node.h so I could use it in Node.c. Also improved error reporting in pynodes when errors occur in the init stage.

Thanks Juho (bebraw), Tom (assigned the bug to me) and Brecht (mentioned the MAX_SOCKET define).
2008-05-01 22:28:18 +00:00
Brecht Van Lommel 3c561ec216 Added an Alpha Convert compositor node, to convert between
premultiplied and key alpha.
2008-03-11 14:40:27 +00:00
Brecht Van Lommel ed7156a258 Fix for bug #6747: make single button for node groups didn't work,
functionality was not implemented.
2008-02-24 22:27:40 +00:00
Willian Padovani Germano 9615532ccb == Pynodes ==
1) Trying to bring back compatibility with Python2.3.
2) Adding some stubs to compile blender player again on linux.

Please tell me if Blender still doesn't compile with py 2.3 or if the player isn't compiling. There was a binreloc related stub I needed to add, so probably the player wasn't compiling before the pynodes commit.

Thanks PanzerMKZ for reporting and testing part of the fix to py 2.3.
2008-02-10 21:12:44 +00:00
Nathan Letwory 16514e3ddb * Merge of PyNodes to trunk. Finally!
See http://wiki.blender.org/index.php/BlenderDev/PyNodes and
  http://wiki.blender.org/index.php/BlenderDev/PyNodes/API
  For current documentation.

  Very very big thanks go to William Germano for fixing the memory issues left
  and for improving on the code.

  In the coming time documentation will be finalised and further stabilising
  of PyNodes is to be expected.
2008-02-09 23:17:15 +00:00
Ton Roosendaal c8841a7f2f Added new render pass: "Mist".
This is actually just the alpha value as currently being calculated
by the mist code. It is in many cases not very useful to have this as
alpha in shading result, also for postprocess and composite.

Note: this pass also works with "Mist" not set in World, of course.
2008-01-19 11:17:12 +00:00
Juho Vepsalainen f4015d9fce Bilateral Blur Node
Bilateral Blur node allows the user to blur images while retaining their
sharp edges. Blurring can be controlled by following controls:
*Iterations
*Color Sigma
*Space Sigma

Also image input to blur and a determinator image is provided. The node produces
a blurred image as its output.

The more iterations are provided, the smoother the result. Use color and space
sigmas to control the amount of blur. One way to use the determinator input is
to feed a mix (add) of Z and normal passes to it.

Examples of usage:
Ambient Occlusion smoothing - http://wiki.blender.org/index.php/Image:Bilateral_blur_example_01.blend
Blurry Refraction - http://wiki.blender.org/index.php/Image:Bilateral_blur_example_02.blend
Smoothed shadows and smoothed Ambient Occlusion combined - http://wiki.blender.org/index.php/Image:Bilateral_blur_example_03.blend

If you check out the examples, render the image and alter the values to see how 
they affect.

More information about the algorithm can be found at 
http://homepages.inf.ed.ac.uk/rbf/CVonline/LOCAL_COPIES/MANDUCHI1/Bilateral_Filtering.html .

Thanks to Vilem Novak for contributing the patch.
2007-12-27 20:36:17 +00:00
Juho Vepsalainen 8ddc48d32f Directional Blur Node
Directional Blur node allows the users to do various blur operations on the input 
image. It essentially offers three different kind of ways of blurring in one node.
It is possible to blur using a certain direction, spin and zoom. These three ways 
can be used in conjunction.

The node contains following controls:
*Iterations, Wrap
*Center: X, Y
*Distance, Angle
*Spin
*Zoom

Iterations is used to determine the smoothness of the result. The more iterations,
the smoother result. Low values are good for preview.

Wrap means that the image is wrapped as if it was tiled on both x and y directions.
To see better what this means, try it with spin for instance.

Center values (X and Y) determine the location which is used as a pivot point for
the operations. It is center (0.5) of the image by default.

Distance and angle are used to adjust directional blur. The result can be described
as a sweep that varies based on given distance (bigger distance, longer sweep) and
angle. Angle is given in degrees.

Spin produces rotating blur based on given angle. Yet again it is in degrees. Also
negative values work.

Zoom causes the image to be zoomed towards set center point (Center values).

Thanks to Alfredo de Greef (eeshlo) for contribution.

Possible development ideas:
*Make an algorithm to extend image in case spin is used. Extend would temporarily
change the size of the canvas of the input image. Canvas would be filled based on
colors on the edges of the input image. After the blur operation has been done,
the image would be cropped back to normal size. The advantage of this would be nicer
result of spin (no problems with image size) on a computational cost.
*Make values animatable. This is something that is better solved on more general
level. ("everything is animatable" paradigm)
*Provide an option to calculate automatic value for iterations. A good value that
produces a smooth result could be calculated based on direction deltas. This would be
useful in conjuction of animatable values.
2007-12-27 14:19:11 +00:00
Juho Vepsalainen d06dc00af9 Toggle links tool for Node Editor
This commit adds a new tool, Toggle Links, to the node editor. This tool
allows the user to toggle the status (linked/not linked) between desired
sockets. The tool can be used either by using the f key or the menus.

This functionality is analogue to one found in object editing modes except
for its additional toggle functionality.

To use this tool, the user has to first select an input and an output socket.
Selecting is done by clicking with right mouse button on a socket. After the 
tool has been invoked, the link between those two sockets is toggled. The 
result may vary based on existing linkage.

There can be only one input and one output selected at maximum in a node 
tree. This means that if the user selects a socket while one of the same 
type is already selected, the old one will be deselected.

The tool complements the current way of connecting nodes. One possible use
for it is to use it to review output of nodes by using a viewer node. Just
select wanted input socket of a viewer node, set it visible and use selection 
of an output socket in conjuction with f key to show the output in the viewer
node. Select another output and hit f to see its output and so on.
2007-12-27 10:17:33 +00:00
Matt Ebb a1c5b3b51d * New feature on compo scale node: "Scene Size %"
This option sets the relative scaling factor to the amount set in the 
scene "100%/75%/50%/25%" buttons. It's useful when you've got a fixed 
background image, and want to do preview renders at a lesser 
percentage, so you don't have to go and change the scale node each 
time you change the %.

Also removed unnecessary use of a global from texture node.
2007-11-13 23:53:58 +00:00
Juho Vepsalainen d6db819a83 Crop Compositing Node:
This commit adds a new node, crop, to the compositor. This node can be used to
crop input image. It has two modes of operation. It can either crop image
size (Crop Image Size option) or crop while retaining original size of the
image. This latter mode can be used to preview the crop.

Use X1, Y1, X2, Y2 controls to manage the area to be cropped.

Note that I added a check for image preview min and max values to node_update.
This is because it could give inappropriate values in certain cases when
Crop Image Size option was toggled (values such as x1=0, y1=0, x2=60, y2=0 would
result in eternal loop due to bad min and max (min bigger than max!)). The check 
makes sure that min and max values are always valid.
2007-10-29 14:37:19 +00:00
Campbell Barton 2a2453d3e2 nodes from eechlo
* glare
* tonemap
* lense distort
* fast gauss blur

http://projects.blender.org/tracker/?func=detail&atid=127&aid=7505&group_id=9

made fast gauss blur an option for the blur node rather then a separate node.
2007-10-26 15:32:36 +00:00
Juho Vepsalainen c1e9ad9c80 Hue Saturation Value node - port to material node system
This commit ports Hue Saturation Value node to the material node system.
Unlike in composite version, each value is an input. Composite node version
will be updated later to use the same scheme.
2007-08-31 07:42:06 +00:00
Juho Vepsalainen c3b1877b4f "Combine RGB" and "Separate RGB" material nodes:
These nodes allow the user to separate and combine RGB color channels
as in the composite node editor. However they don't contain Alpha
channel as it is treated separately in case of material nodes.
"Combine RGB" allows the user to use values beyond standard float range 
([0.0, 1.0]) if value input node is used to feed the value to it.
2007-08-20 11:05:14 +00:00
Robert Holcomb b89ba8636c Added normalize compositing node. 2007-07-10 02:27:37 +00:00
Matt Ebb 17a219e3c0 == Shader nodes ==
* Geometry node: Front/back output
This is used as a mask for determining whether you're looking at the front side or back side of a mesh, useful for blending materials, my practical need was giving different materials to the pages of a magazine: http://mke3.net/blender/etc/frontback-h264.mov

Give 1.0 if it's the front side, and 0.0 if it's the back side.

* Extended material node
This is the same as the material node, but gives more available inputs and outputs, (basically just connecting up more of ShadeInput and ShadeResult to the node). I didn't want to add it to the normal simple Material node since you don't always need all that stuff, and it would make the node huge, but when you do need it, it's nice to have it.

== Comp nodes ==

* Invert node
Inverting is something that happens all the time in a node setup, and this makes it easier. It's been possible to invert previously by adding a mix node and subtracting the input from 1.0, but it's not the best way of doing it. This node:
 - makes it a lot faster to set up, rather than all the clicking required with the mix node
 - is a lot more usable amidst a complex comp setup, when you're looking at a node tree, it's very helpful to be able to see at a glance what's going on. Using subtract for inverting is easily mixed up with other nodes in which you are actually subtracting, not inverting, and looks very similar to all the other mix nodes that usually litter a comp tree.
 - has options to invert the RGB channels, the Alpha channel, or both. This saves adding lots of extra nodes (separate RGBA, subtract, set alpha) when you want to do something simple like invert an alpha channel. I'd like to add this option to other nodes too.

There's also a shader node version too.


* Also a few fixes that I committed ages ago, but seems to have been overwritten in Bob's node refactor:
 - adding new compbufs to the set alpha and alphaover nodes when you have only one noodle connected to the lower input
 - making the fac value on RGB curves still work when there's nothing connected to it
2007-05-31 06:55:02 +00:00
Robert Holcomb 26735a6670 Added gamma, fixed typos in brightness 2007-04-13 04:22:32 +00:00
Robert Holcomb f7738575c9 Added brightness/contrast node 2007-04-13 03:23:39 +00:00
Nathan Letwory fb0f61c0b0 === Node editor ===
* refactor copying and freeing of node->storage by handlerizing them.
  - freestoragefunc
  - copystoragefunc
  - node_util.c/h have generic handlers for these.
2007-04-04 13:58:12 +00:00
Ton Roosendaal f5b919e12e Long wanted feature; decent ESC processing in composite nodes.
Works simple; just check for

		if(node->exec & NODE_BREAK)
			break;

The main process (node processor) sets such a flag, checking for esc
20 times per second. That means you can check for ESC while doing image
processing without much cpu overhead.

Currently only added in blur nodes and defocus. Needs to be added all over,
nice for others... needs careful tests too.

What we now could do is even calling ESC on editing commands or mouseclicks
in composite editor? Could give user feeling of interactive app :) Further,
finished nodes are kept in memory anyway.
2007-03-28 13:48:01 +00:00
Robert Holcomb 39ef0f4eba moved node_shader_lamp_loop to node.c and put an extern declaration in BKE_node.h to prevent multiple definition link errors. 2007-03-28 13:07:59 +00:00
Ton Roosendaal 5c760e4811 Changed node type definitions to use a dynamic list.
This will allow python or plugin defined nodes to work as well.
(And fixes compile issues with MSVC in yesterdays commit for nodes)

Code provided by Nathan L.
Fixes in his code:
- free_nodesystem() was called too late (after guarded alloc was closed)
- free_nodesystem() was freeing nodes that were not malloced even
- free_nodesystem was using free, not freeN :)
- the typedefs needed to be malloced yes, to allow duplicate nodes like
  group but also for dynamic nodes.
2007-03-26 15:07:38 +00:00
Robert Holcomb c1e9018118 All UI code reverted to drawnode.c 2007-03-25 23:54:39 +00:00
Robert Holcomb 808a5fc05a Scons build system. MSVC 7.1 in a moment. 2007-03-24 18:41:54 +00:00
Ton Roosendaal a8b41017f1 Bugfix #6211
Group nodes with animation nodes inside (like Time) did not get updated
correctly.

I also noticed that with time Nodes,  the hotkey "E" (execute) fails to do
a composite after frame changes, fixed that too.
2007-03-13 12:20:55 +00:00
Robert Holcomb 55afa0a606 Fixed accidental commit from yesterday. 2007-02-07 18:47:48 +00:00
Robert Holcomb 00cdff156f When converting a VAL buffer to RGBA the alpha is also set to the value in the VAL buffer. This should be set to 1.0f as in the other conversions or it results in an unevenly transparent buffer. Corrected to result in an opaque buffer.
BKE_node.h commit is in error, but harmless (oops).
2007-02-07 03:40:59 +00:00
Ton Roosendaal d2fd630e0a Bugfix #5748
Composite: when using multiple scene render-nodes, and one of these
scenes got re-rendered (by making scene active temporary), the composite
cache should free the used buffers.

Now, on each render, all scenes in a Blender project are being checked.
2007-01-19 12:43:02 +00:00
Brecht Van Lommel 878d9f9c68 Fix for bug #5680:
Vertex color node worked only if VCol Paint/Light was enabled. Fixed
that, and removed the vertex color node making it part of the geometry
node instead.

Also, preview.blend had black vertex colors for the sphere, so set them
to white like the other primitives.
2007-01-14 15:19:27 +00:00
Robert Holcomb 611b583acc Re-added the Luma keyer after realizing channeldid not exactly same capability and could not without sgnificant change. 2007-01-13 22:56:26 +00:00
Robert Holcomb cc359a6fd5 Format corrections. 2007-01-09 04:32:39 +00:00
Robert Holcomb 4d28796b61 Updated luminance node to work in all color spaces. Also made it work for any channel, not just luminance. 2007-01-06 01:25:59 +00:00
Matt Ebb 04dea66458 == Compositor ==
* Ported Math node from shader nodes to composite nodes too

It's a good general purpose utility node and also allows stupid stuff
like this more easily :)

http://mke3.net/blender/etc/math-spiral-h264.mov
http://mke3.net/blender/etc/stupidmath.blend.zip
2007-01-04 01:56:21 +00:00
Robert Holcomb 60c2a7eeae The combine HSVA node was missing, now all the color space seperators
and combiners are available.
2007-01-02 14:45:59 +00:00