for shading if their 'visibility factor' is below 0.001. This
gives no perceptible visual difference in my tests, but can
significantly speed up shading when using lots of omni lights
with quad falloff over a large area. Since quad lamps never
actually fall off to 0, previously every lamp would be considered
for shading each pixel, even if such lamps had a tiny falloff
distance, and were miles away.
bsystem_time was being called with an extra variable, which was useless. Most of the places that called it, were passing NULL for that variable anyway.
I've also cleaned up that function a bit, but the underlying problems with that part of the code still exist (EVIL GLOBALS that are exported for frame_to_float), for mblur and fields rendering features. That remains for another time.
Previous bugfix of spec not being included in only shadow lamps had 2 errors.
There weren't any checks for if shi->spec and shi->shad go below 0 because of
an only shadow lamp, and also the code for including spec in only shadow lamps
was slightly wrong.
caused errors on only shadow lamps; fixed this by adding back in the original
intensity > 0.0 check in the only shadow if statement, where it belonged in the
first place.
In addition, the specular pass was not correctly affected by only shadow lamps,
severely reducing the usefulness of this feature. For example, using four
spotlamps to create an omnidirectional buffered shadow lamp didn't work.
two separate files, raytrace.c and rayshade.c. The tracing code can now
be used separately from the renderer (will be used in a later commit),
and the raytracing acceleration structure can now also be easily replaced,
if someone wants to experiment with that.
- Multilayer EXR files:
Rendering without "do composite" skipped to render the vector pass
- Also found a wrong loop, missing to clear speed vectors in the first
pixel of a tile, causing error print:
"Found uninitialized speed in vector buffer... fixed"
For some odd reason, shadow calculation was skipped if diffuse was 0.0. This
however would cause errors where specularity would ignore shadows. After all,
just because the shaded diffuse of a point is fully black, doesn't mean
the specularity highlight doesn't include that point.
Ton: you might want to look at this, though it's just a one-liner.
* 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
Vector blur error in Ztransp: sometimes black lines (on edges) appeared,
which didn't get blurred away. Caused by zero-init of speed vectors in
sample buffers. (Zero speed -> no motion).
Error in Blender since vblur was added.
other preview renders at all.
Also added a flag to enable/disable SSS per scene. There is no
button for it yet, the Render panel has no space left .. will find
a place for it later.
The subversion number was also increased to enable the flag for
older .blends.
leads to flickering, and a bug that would display parts of the
preview render as black for interrupted preview renders.
(sorry for the late fix, i've triple checked the code ..)
Metaballs, when in editmode, didnt show correct after a render (it was
drawing render resol then).
The code here was confused some... this works, although it will take a
bit more cpu cycles when render resol = display resol. No biggie.
- Radius R, G, B sliders had too small number increase on clicking.
- Preview render now renders with higher SSS error setting to speed it up a
bit.
- bug #6664: 3d preview render had artifacts. re->viewdx/dy wasn't set then,
which is needed to estimate the area of each point. Have set this now, not
in the nicest way, there is some bit duplicated code, but I don't want to
refactor existing code with the chance of breaking it at this point.
- bug #6665: grid like artifacts with parts rendering. The two extra pixels
around parts used for filtering were used as well, leading to double points.
- Bug #6652: SSS artifacts with ray shadow.
- Bug #6643: AO + SSS crash. couldn't redo this crash myself, but did find a
bug that may cause a crash, please test.
- Tweak backscattering to avoid thin surfaces rendering too dark.
This means changing the active UV/VCol layers wont change what renders.
needed to adjust the minor version so old files will copy the active layer to the render-uv/vcol layer.
boxpack2d.py - redoen in C now, dont need python version.
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.
An acos() getting a negative value caused 'ray trace shadow bias' to go
wrong (and object render entirely black). Only in very rare cases... but
nevertheless a nice discovery fixing other unpredictable issues.
(Symptom: entire object renders black)
Bad bad bug in Vector Blur: when using Ztransp in a RenderLayer, the speed
vectors of moving solid faces were all cleared. Bug since january 21st... is
this the 2.43a case? Dunno... :)
OnlyShadow material: was giving shadow on backfacing faces... should not.
Do note that on boundary cases ("terminator") this isn't well defined.
This feature was meant for simple flat shadow planes, comprende?! :)
Flipping the facenormal into direction of ray accidentally did not work
anymore, the normal was initialized again in nice new code. This made
objects in mirror appear shaded wrongly.
Bugfix #5912
Fix for Angmap and Spheremap (sky render).
This is a rewind of bugfix #4999 (sept 18). That bug appeared to be a
user error... the option "real" for sky had to be set.
This tweaks the dependency rules for Scenes/Objects a bit. Here is the
rule:
- Each Scene has own dependency graph, and only solves dependencies for
objects in the scene
- However, when using multiple linked Scene-sets, the *current* scene is
allowed to have dependencies to objects in a 'set'.
This works by first calculating the sets, then the current scene.
Example: the current scene can have lights with a track/location
constraint to a character in a set.