- Curves without bevel or extrude didn't calculate the Z value for
softbody when the "3d" option for curves was off.
- Typo in softbody.c, for switch of // comments to /* */
PyDict_SetItemString() with objects that were not properly decrefed
afterwards. Due to the number of places this was used, I added a
wrapper EXPP_dict_set_item_str() to gen_utils.c to handle it.
This started as a scriptlink bug, due to how many times scripts were
being executed I think it just magnified how bad the memory leak in
BPy was. Animating the blend attached with this bug report would cause
memory to grow by about 3MB for every 280 frames. After the patch,
memory did not appear to grow at all (or at least not noticably using
Unix's ps and top utils).
Since many of the PyDict_SetItemString() calls were in initialization
modules I think my tests executed most of the changed code, but would
appreciate script users really giving feedback.
Noticed that static particle orcos (strands) actually were global
coordinates. This was code copied from dynamic particles...
Bugreporter (hi env!) tried to make nice zebra texture, which of course
very much failed.
Note; orco textures for strand give the same texture coordinate for the
entire hair. UV maps don't work here yet.
An image texture without picture returned a '0', causing the texture code
to generate a bump normal that warped the entire shading around.
In bugreport it was showing terminator issues with ray shadow.
Terminator problems can still occor with more extreme bumpmaps though,
something to look at further.
Replaced sqrt() with the safe version sasqrt() in anisotropic.
the formula (1 - n*n) should not give negative values for n = dotproduct
of normals, but float inaccuracy can make negative zeros, as we know!
This solves, hopefully, last annoying "blotches" in hair!
raytracing with a linedist (cylinder) check. It didn't behave OK on strands
set to be more than 1 pixel (not to mention 10 pixels), and I have no time
now to fully check and code it.
Which is not really important either... In general, all 3d papers talk about
using shadowbuffer shadows for hair, which gives much nicer results for
dense volumes of polygons.
This commit restores regular (flat polygon) raytrace shadow for strands.
Also fixes some nasty bugs as reported. :)
in the game engine again.
All files in source/gameengine/ I've committed below have a comment like
/* XXX note .... */
where something needs to be done. This is pretty straightforward for Erwin,
who has been notified in person too about this. :)
(2001) hack that enforced opening renderwindows smaller than screen size.
The notes I could find referred to testing old 3d cards, which failed to
give graphics memory for large windows. Another note was an issue on OSX,
where the topbar and windowbar gets hidden otherwise.
That latter case I corrected now.
Will organize good testing for this, if there's issues, will uncommit :)
sets. To fix it, I got rid of a very ancient hack to enable set grey wire
drawing (setting a global to pretend it's picking select draw).
Now this setting is nicely passed on via functions as argument.
- partially working workaround for nvidia bug on Os X 10.4.3
- brought back the raster ops hack for GT6800 with proper driver version
check so that text works both on Os X 10.4.3 and older systems.
this last patch was given by Kent Miller from Apple
"if" statements. The macro defined in gen_utils.h expands to two
statements; putting after an "if" statement without {} means the second
statement should always be executed. I'm not sure if just putting
braces around both statements would cause other compilers to complain.
But this explains an earlier bug in the Object module which only
appeared on MacOS/X.
incorrectly, including wrapping curve data as BezTriples. Needed to
make a change to beztriple module so we could more easily create a
"thick" BezTriple object similar to Blender.BezTriple.New().
The change to BezTriple.h pointed out some dead code in the Ipocurve
module that could be removed.
Instead of disabling zbuffer while drawing it, it now still writes zvalues,
but not tests for it. That way the centers are visible independent of
drawing order.
in other layers (or hidden with local view).
In my search for the absolute minimum of recalculations, changes are only
flushed when they're visible. On changing layers, the tags then are just
set again (for everything that potentially moves) to ensure proper state.
However, it didn't work proper for linked Mesh objects that changed in
editmode, the Derivedmesh callback then accessed memory out of bounds.
The current dependency code was more designed for animation systems...
updating display data should work too, but might need some more tests!
(Thanks Andrea for clear error sample!)
- raytracing code now uses cylinder-line intersect for strands. It used
to intersect with the screen-aligned strand quads, giving too many
misses for tracing.
Note; mirror for hair is still not well supported!
- added in Materials a choice for whether a material is Traceable for
raytracing or whether it is part of Shadow buffers. This way you can
exclude hair strands from raytracing, but still get shadowbuffers for it.
on 64-bit machines.
This code only seems to be used by the game engine anyway; maybe it's
only linux which always compiles it regardless of whether game engine is
enabled?