N_T: the implementation of this feature isn't 100% nice, it currently does
a full recalc on each redraw, and it doesn't work properly unless it is
recalculated for each frame.
Repeat Image texture was broken... the repeat value for Y was accidentally
multiplied twice, typo... had to change a 1 into 2 :)
Error introduced in 2.41 btw, 2.40 and older were OK.
Render non-osa, with mblur, did not jitter the zbuffering, so it did not
result in basic AA for non moving parts.
Note to self: this now works on < 2.42 level again: it doesn't use
the correct subsampling, which can cause slight errors in rendering image
textures.
- thread render stores per thread and per lamp the last intersected
shadow face
- the Isect struct, for intersections, could use a couple of extra
zeros on start.
The raytracer wasn't calling node shaders yet, so results showed only
shading for the base material.
This now works, but there's a conflict in the internal Blender shader that
makes recursive raytracing with nodes unpredictable. Basicaly the conflict
is that when a ray wants to shade a point, it should be able to check the
material for mirror properties, but this is undefined for node trees...
Probably we need to separate raytrace entirely from material shading. Is
a good topic for NodeShader 2.0, when we really split up materials in
shading components.
I'll add a note in the release log about this. Best results you get now
when you don't include mirror/ray-transp insde a node tree, in that case
a regular material mirror can render that material perfectly.
In december, when testing material layering, I've removed the check that
prevented specular and diffuse to become negative, this because it could
work nice for layering.
However, this breaks quite some cases too. For example negative lamps are
only used to cancel out other lights in same material, and should not give
negative (invisible!) peaks that work on a node system. Same goes for
negative diffuse from AO 'subtract' mode.
In fraka the error happened for AO on a translucent material. The inside
of the mesh got a negative AO, cancelling out the positive AO on the
outside.
Anyhoo; this commits ensures that a 'shade_lamp_loop' call will never
return negative values again!
- AO "Use Distances" can not use 'sky texture' for colors, that bug was
fixed in UI (prevent settings to combine), but better also gets fixed
on reading files.
- Backbuf render, when not existed, didn't initialize backdrop color to 0.
Hurmf, then you bring back old backbuffer, and they want to have fields
work on that!
OK... here it is. Although using Compositor features will make this much
easier and advanced to control. :)
- Halos were not sorted, for ages! Meaning that they were rendered in order
of creation, instead of back to front.
- Made ESC testing for halo render to check per halo, is a fast routine now
anyway.
Report noted the slow icon renders for menus, which indeed is an issue,
especially when texture images need to be loaded (not to mention that
will eat up loads of memory).
Added a flag in scene to disable loading of images, makes it 50 times
faster, at least :)
Another thread render issue, now in Image texture, the 'repeat' value was
still a global... how did I think that would ever work? Just forgot about
that one I guess. :)
Render timers were called in the internal render loops (tile processor),
they still had to be moved to the outer loop, so they include fields/blur
or sequencer render timing correctly.
Thread render error: a flag was stored in read-only data to indicate
whether top or bottom hemisphere of sky was rendered. That can't work
with tiles (but did work when scanlines were threads).
suffered for the entire movie. :)
It only happened when rendering large frames, using a lot of memory and
typically when you also use other software in meantime.
Reason: the main thread does the drawing updating, while rendering is
still continuing. When using Ztransp, there was a free buffer done
when possibly a draw could still be in progress. Only crashed when drawing
is slow... explaining why it only showed up in more complex cases.
A proper check for the error "No Camera" on rendering can only be made
after a renderwindow was initialized. The error menu then shows in the
render window, which appears to not work OK in windows ATI (again!).
So; I've moved the test to before the renderwindow is activated, this is
not a test checking on the entire render pipeline (like Composite nodes or
sequence strips). In case more complex setups cannot render, an error is
printed in the console only.
Not clearing the value for 'parts rendered' caused 3d previewrender to
sometimes fail doing updates (when an escape happens during converting
render data).
Wire render crashes in Linux (only!), but why? Using a calloc instead of
malloc fixes it, but that doesn't solve the real issue in the code.
I can only imagine that bsearch() in linux has a completely different
implementation...
Anyhoo; let's commit the calloc, at least then we got stable wire render!
- when renderwin exists, but not used for render, the ESC timer check still
could return ESC event, due to missing flag clearing.
(For example in sequencer, a scene strip did not update on frame advance)
- option 'single layer' set in combination with render "Do Sequence" didn't
free the pushed layers.
The new Material "LightGroups" only worked with lamps in visible layers.
Now also lamps from the group that are not visible are included for
rendering, ensuring that a lightgroup always works on that material,
disregarding layer settings (unless lamp is type 'layer lamp').
Sequencer:
Removing feature that allowed live updates of render progress while using
scene strips. In 2.41 and older this also happens invisible, and ESC from
it works now anyway.
Two reasons:
- it is quite annoying, especially on quit renders
- new 'render to window' conflicts too much with the sequencer window
option that shows previews (in code as well as functional!)
When faces (like in cubes) have exactly 90 degrees angles with other
faces, the check for a vertex-normal flip became random, caused by the
infamous bad floating point resolution.
Solved with including FLT_EPSILON in the check.
Also: minor optimize for readability and removed dutch function name
(contrpuntnorm -> check_vnormal)
Material option "Only shadow" didn't work 100% anymore since shadowbuffer
returns 0.0 (shadow) on backfacing normals.
Added extra test in code to solve this.
Lens flare: error in counting visibility per halo-flare in the to-be
cropped area of tiles. Halos now don't render in the 2 pixels exta outline
per tile, which is only used by faces anyway.
When using multiple RenderLayers, each with own 'edge render', the buffer
holding edge pixels wasn't cleared from scratch, so the edges of previous
layers were showing too.
The Stucci texture now returns an 'intensity' value too, this wasn't too
interesting though... not reflecting all options for the texture itself.
Now it shows better in preview renders.
solution could have been much simpler, but since that would have required
altering blender code (only a single line though)...
also fixed a minor bug reported in the yafray forums, when spotlights had the
shadowbuf flag set and then switching to yafray, yafray still rendered
shadows which to user was unexpected since there was no shadow flag enabled
in the yafray lamp panel, so now ignores the blender flag.
Creating texture coordinates for Curve bevels didn't allocate a correct
sized memory block when both U and V directions of a bevel are circular.
This will also fix "UV orco" for such curves (like donut shapes).
Silly: when using vector blur on a curve or text object, without having a
material assigned to it, the default material didn't get initialized OK
for vector blur, causing random streaks.