Commit Graph

22 Commits

Author SHA1 Message Date
Brecht Van Lommel
e66f3eb499 Cycles: GLSL materials now can use multiple UV maps with the attribute node. 2013-06-05 15:54:39 +00:00
Brecht Van Lommel
8e9b6daa8e Fix for recent bugfix with anisotropic node crash, could do invalid memory access. 2013-05-10 15:10:54 +00:00
Brecht Van Lommel
e46551246c Fix #35272: cycles GPU crash with anisotropic shader in group node.
Problem was that due to group proxy node the anisotropic node did not detect
early enough that it needs generated texture coordinate data to generate the
tangent. Now the proxy nodes are removed earlier.
2013-05-10 11:31:57 +00:00
Brecht Van Lommel
3e763d7e4d Fix #35246: cycles has no simple way to combine bump and normal mapping. Now
the Bump node has a Normal input, so you can chain it after a Normal Map node.
Note that normal mapping always has to be done first because it is tied to the
particular mesh surface and tangents.
2013-05-08 13:23:13 +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
Brecht Van Lommel
7bcbbe26d5 Fix #33905: cycles crash with bsdf node plugged twice into add shader. 2013-01-23 13:13:20 +00:00
Brecht Van Lommel
ceed3ef640 Fix #32907: failure rendering a complex node setup, hitting fixed max number
of closures limit. Optimized the code now so it can handle more.

Change SVM mix/add closure handling, now we transform the node graph so that
the mix weights are fed into the closure nodes directly.
2012-11-26 21:59:41 +00:00
Dalai Felinto
0890c2a4a0 support for string parameters in OSL nodes
for now subtype is not defined, but once we start parsing the metadata we can set texture inputs as FILEPATH
also, it takes relative strings and convert to absolute for all strings (which is arguably a good solution, but
should work for now)
2012-11-06 21:36:44 +00:00
Brecht Van Lommel
fe09b24e86 Cycles: per-BSDF normal input and new Bump node.
Each BSDF node now has a Normal input, which can be used to set a custom normal
for the BSDF, for example if you want to have only bump on one of the layers in
a multilayer material.

The Bump node can be used to generate a normal from a scalar value, the same as
what happens when you connect a scalar value to the displacement output.

Documentation has been updated with the latest changes:
http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/Nodes

Patch by Agustin Benavidez, some implementation tweaks by me.
2012-10-10 15:56:43 +00:00
Brecht Van Lommel
f0a9b66469 Cycles: Anisotropic BSDF enabled, with tangents now computed from the active UV map.
It's using the Ward BSDF currently, which has some energy loss so might be a bit
dark. More/better BSDF options can be implemented later.

Patch by Mike Farnsworth, some modifications by me. Currently it's not possible yet
to set a custom tangent, that will follow as part of per-bsdf normals patch.
2012-10-10 13:02:20 +00:00
Brecht Van Lommel
282f98a84d Fix #31806: cycles crash rendering a particular node setup with multiple mix/add
shader nodes.
2012-10-04 20:12:16 +00:00
Brecht Van Lommel
adea12cb01 Cycles: merge of changes from tomato branch.
Regular rendering now works tiled, and supports save buffers to save memory
during render and cache render results.

Brick texture node by Thomas.
http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/Nodes/Textures#Brick_Texture

Image texture Blended Box Mapping.
http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/Nodes/Textures#Image_Texture
http://mango.blender.org/production/blended_box/

Various bug fixes by Sergey and Campbell.
* Fix for reading freed memory in some node setups.
* Fix incorrect memory read when synchronizing mesh motion.
* Fix crash appearing when direct light usage is different on different layers.
* Fix for vector pass gives wrong result in some circumstances.
* Fix for wrong resolution used for rendering Render Layer node.
* Option to cancel rendering when doing initial synchronization.
* No more texture limit when using CPU render.
* Many fixes for new tiled rendering.
2012-09-04 13:29:07 +00:00
Lukas Toenne
0238d032b2 Replaced dynamic_casts for node type checks by simple 'special type' identifiers. RTTI has to be disabled in cycles for OSL. 2012-09-03 11:38:15 +00:00
Campbell Barton
2557eaf0dd print names of nodes/sockets when cycles complains about only being able to connect a closure to another closure. 2012-07-19 13:04:43 +00:00
Campbell Barton
0fbb6bff27 style cleanup: block comments 2012-06-09 17:22:52 +00:00
Lukas Toenne
0e9b0f6d9e Fix #31645, mix node results in crash upon render. This happens when unused mix nodes are removed from the cycles graph. In case the inputs are both unconnected it still tried to reconnect them. 2012-05-30 15:47:12 +00:00
Brecht Van Lommel
7f7ba3243d Fix cycles render issue with a (useless) mix node that has the same shader
plugged into both sockets.
2012-05-23 17:55:34 +00:00
Brecht Van Lommel
1d8c798188 Cycles: support for motion vector and UV passes.
Most of the changes are related to adding support for motion data throughout
the code. There's some code for actual camera/object motion blur raytracing
but it's unfinished (it badly slows down the raytracing kernel even when the
option is turned off), so that code it disabled still.

Motion vector export from Blender tries to avoid computing derived meshes
when the mesh does not have a deforming modifier, and it also won't store
motion vectors for every vertex if only the object or camera is moving.
2012-04-30 12:49:26 +00:00
Lukas Toenne
5f6bd44c82 Generalized node groups for Cycles.
This allows group nodes inside other group nodes in cycles and makes the
code more generic for all possible cases, like direct group
input-to-output links and unused group sockets.

Previous code tried to connect external nodes and internal group sockets
by following links until a "real" node input/output. This quickly
becomes complicated in corner cases as described above and can lead to
unexpected behavior when the group socket is of a different type than
the internal/external sockets, but that conversion is skipped.

The new code uses the concept of "proxy nodes" similar to what the new
compositor does. Each group socket is replaced with a proxy node with a
single input and output, to which other nodes in the same tree and
internal nodes can link to. After all groups have been expanded in the
graph, these proxy nodes are removed again, adding converter nodes if
necessary.
2011-12-18 15:34:06 +00:00
Brecht Van Lommel
4c3b94fdbd Cycles: image texture node now uses UV as default texture coordinate,
instead of generated.
2011-10-12 16:01:37 +00:00
Brecht Van Lommel
f7b9c85871 Cycles: fix some invalid memory access problems found by running the windows build in debug mode. 2011-08-21 10:32:15 +00:00
Ton Roosendaal
da376e0237 Cycles render engine, initial commit. This is the engine itself, blender modifications and build instructions will follow later.
Cycles uses code from some great open source projects, many thanks them:

* BVH building and traversal code from NVidia's "Understanding the Efficiency of Ray Traversal on GPUs":
http://code.google.com/p/understanding-the-efficiency-of-ray-traversal-on-gpus/
* Open Shading Language for a large part of the shading system:
http://code.google.com/p/openshadinglanguage/
* Blender for procedural textures and a few other nodes.
* Approximate Catmull Clark subdivision from NVidia Mesh tools:
http://code.google.com/p/nvidia-mesh-tools/
* Sobol direction vectors from:
http://web.maths.unsw.edu.au/~fkuo/sobol/
* Film response functions from:
http://www.cs.columbia.edu/CAVE/software/softlib/dorf.php
2011-04-27 11:58:34 +00:00