Age | Commit message (Collapse) | Author |
|
* For rendering every object's inverse matrix "ob->imat" needs to
be in render view coordinates, but for drawing in 3d view it needs
to be in global coordinates. Originally (way back in historical
times) ob->imat was only used for rendering, but over the years
other uses came up too. Before 2.5 this wasn't a problem as
rendering was a totally blocking operation, but with the new
"interactive ui while rendering" the problems started. Basically
any update that redrew the 3d view while rendering (like rotating
the scene with mouse) updated the inverse matrix into global
coordinates thus invalidating it for the render, leading to all
kinds of strange discontinuities with textures and volumetrics.
* Problems were very easy to achieve using orco/object coordinates
for pretty much any textures (bump, point density, volume, sky),
for examples see bug reports 24906 and 25229. Render baking normals
in object coordinates was wrong most of the time too.
* Now there is a separate inverse matrix ob->imat_ren that's
calculated at the beginning of rendering and is used in all places
inside render code where it's needed. This way the original ob->imat
can change at will during rendering without causing problems.
|
|
|
|
|
|
was exporting normal maps with red and green channel inverted
relative to the geometry it actually exports.
This change makes blender export normal maps
which are very similar to most tools out there.
patch by Morten S. Mikkelsen
|
|
|
|
"Calculating previous (frame) vectors"
now it fits better with
"Calculating next frame vectors"
@jesterking: yes you are
@jesterking: yes you are!!
|
|
Node Materials: option "Front/Back" in geometry node failed for
"full osa" case in ZTransp.
|
|
Node materials with 'ray transparency' set now work again.
Fix provided by Ervin Weber, thanks a lot!
|
|
|
|
Shader nodes: option "backface" failed for materials using
full oversampling.
The usage of shi->flippednorm in render code is heavily messed
up... also flipping vertexnormals themselves feels wrong.
Marked it in code with XXX for future fixups.
|
|
|
|
Halo texture: disabling texture slot with [] button didn't work.
Note: halos only allow 1 texture slot, UI allows to add more. This
rna template stuff for texture slots I rather don't touch though...
|
|
intended as a standalone library for use in other applications that
want the same tangent space as Blender.
This also keeps blenkernel clean(er) from extra math functions.
|
|
|
|
the two files mikktspace.h and mikktspace.c. These are standalone files
which can be redistributed into any other application and regenerate the
same tangent spaces. The implementation is independent of the ordering
of faces and the vertex ordering of faces.
|
|
python functions.
- use NULL rather then 0 where possible (makes code & function calls more readable IMHO).
- set static variables and functions (exposed some unused vars/funcs).
- use func(void) rather then func() for definitions.
|
|
mostly replace strcpy with BLI_strncpy and multiple strcat's with a BLI_snprintf().
also fix possible crash if CWD isnt available.
|
|
* Renamed the old split uv's animate option "time" to "age" and added a new option to change the used split frame by frame. These are good changes were suggested/implied by Hannu Hoffren over 3 years ago in his tutorial video! (oh my how time flies)
* Also cleaned up the billboard ui quite a bit. For example now the uv channels can be properly chosen from the existing channels.
|
|
- modifier code was using sizeof() without knowing the sizeof the array when clearing the modifier type array.
- use BLI_snprintf rather then sprintf where the size of the string is known.
- particle drawing code kept a reference to stack float values (not a problem at the moment but would crash if accessed later).
|
|
wasn't checking for buffer overrun (though this would be very unlikely).
write to the stdout directly rather then building a string and writing that. (no functional change).
|
|
bump map kernel uses direction, this bug became a real issue, with bumps suddenly changing direction
Fix provided due to a long session on IRC with Morten S. Mikkelsen (sparky_)
|
|
the buffer to a smaller renderlayer.
This was reverted by Brecht r22541 because its inefficient but there is no way to work around this with povray at the moment so adding it back as optional args.
|
|
multiple textures in different bump-spaces.
kudos to M.L.Mikkelsen (sparky) for helping with the math! :)
|
|
New "auto render" now prevents calling anim-updates, that's
not needed (and popped back transformed keyed objects).
|
|
Fix in crashing displacement last friday, assumed wrongly that
the old 'new bump' failed for displacement too. It still did
work (somewhat). This restores the situation again.
|
|
rendering them was a real mess.
* After countless different bugs particles should now render correctly inside dupligroups.
* Only particles with metaball visualization are still problematic, this is mostly due to the ancient metaball code.
* I'll also add a test file for some of the situations, so that hopefully these cases stay fixed :)
|
|
- made doc generation always sumlink newly built docs to static URL. http://www.blender.org/documentation/250PythonDoc/
|
|
|
|
reordering to be consistent with the rest of the render engine. That means
the self intersection issues with non-planar quads should also be gone now.
|
|
These should not have any effect on render results, except in some cases with
you have overlapping faces, where the noise seems to be slightly reduced.
There are some performance improvements, for simple scenes I wouldn't expect
more than 5-10% to be cut off the render time, for sintel scenes we got about
50% on average, that's with millions of polygons on intel quad cores. This
because memory access / cache misses were the main bottleneck for those scenes,
and the optimizations improve that.
Interal changes:
* Remove RE_raytrace.h, raytracer is now only used by render engine again.
* Split non-public parts rayobject.h into rayobject_internal.h, hopefully
makes it clearer how the API is used.
* Added rayintersection.h to contain some of the stuff from RE_raytrace.h
* Change Isect.vec/labda to Isect.dir/dist, previously vec was sometimes
normalized and sometimes not, confusing... now dir is always normalized
and dist contains the distance.
* Change VECCOPY and similar to BLI_math functions.
* Force inlining of auxiliary functions for ray-triangle/quad intersection,
helps a few percentages.
* Reorganize svbvh code so all the traversal functions are in one file
* Don't do test for root so that push_childs can be inlined
* Make shadow a template parameter so it doesn't need to be runtime checked
* Optimization in raytree building, was computing bounding boxes more often
than necessary.
* Leave out logf() factor in SAH, makes tree build quicker with no
noticeable influence on raytracing on performance?
* Set max childs to 4, simplifies traversal code a bit, but also seems
to help slightly in general.
* Store child pointers and child bb just as fixed arrays of size 4 in nodes,
nearly all nodes have this many children, so overall it actually reduces
memory usage a bit and avoids a pointer indirection.
|
|
complain about the same named file in blenkernel.
|
|
Using displacement with new bump caused NaN values or crashes.
Since displace code doesn't provide derivatives, it now falls
back to "old bump" by default.
|
|
|
|
Render bug in spothalo (weird horizontal line).
Appeared to be precision error... even for doubles,
before doing division a check for FLT_EPSILON works
better than DBL_EPSILON (if there's an alternative).
|
|
* Tracing objects with IOR < 1.0 (like air bubbles under water) wasn't working correctly as a refraction was always assumed to be the first thing that happens for transparent materials.
* This fix is ok, but the fact that the internal renderer is not a physically based one is starting to show, as for example blurred reflections in this case are not really possible nicely without some slightly heavier modifications to the ray code.
* Also some cleaned up logic and better comments for my previous total internal reflection commit.
|
|
Compositor: using "read sample buffers" after load file, without
render layers in composite, crashed blender (NULL read)
|
|
* This was wrong since 2006!
* Raytrace code assumed refractions to go "air -> glass -> air -> glass -> air.." so actually only the first total internal reflection was calculated correctly, but everything after that was wrong.
* Now after a total internal reflection there needs to be an actual refraction before the ray escapes the "glass" object.
|
|
* Only the first object (in scene object order) that instanced a dupligroup was rendered properly, because particle instances were checked for only after creating the render object (and even this check was done wrong).
* Now the actual render object is created only after both object and particle instances have been checked.
|
|
|
|
New bump code: option "Texture space" only works for image textures.
It appears this option is some kind of "fake normal map" actually.
Needs nicer name... maybe "Image space".
Now it ignores the option when no image texture is used.
|
|
|
|
oldbump -> original
newbump -> compatible
*new* -> default (3tap)
*new* -> best quality (5tap)
the latter two have an option to apply bumpmapping in
viewspace - much like displacement mapping
objectspace - default (scales with the object)
texturespace - much like normal mapping (scales)
|
|
|
|
|
|
check and checking against incorrect pointer before use).
|
|
|
|
Raytracing didn't show soft shadow in reflections, nor did it do any
derivative even. Added a basic version for it in raytracer now, still
needs improvement on heavily curved surfaces. But it's better!
Examples:
Glass sphere, mirror cube and sphere, look how it ignores bump and shadow
http://www.blender.org/bf/derivative256.png
in svn now:
http://www.blender.org/bf/derivative-svn.png
|
|
|
|
also removed unused vars.
can_pbvh_draw() had a NULL check which is never needed (callers check for this), a NULL ob would have crashed the function anyway.
|
|
- move GS() define into DNA_ID.h
- add BLI_utildefines as an automatic include with makesrna generated files.
|