Commit Graph

783 Commits

Author SHA1 Message Date
0a74ce2c5a Bugfix #4927
Render: Flares were not corrected yet for border render.
2006-09-10 10:35:28 +00:00
e7d6537f1c Added support for threadsafe MEM_mallocN/MEM_freeN in the guardedalloc
module itself, replacing the special MEM_mallocT/MEM_freeT functions.
Mutex locking is only enabled when threads are running.

There was no good reason to have these separate, it just led to ugly
hacks when calling functions with non-threadsafe malloc from threads.
2006-09-06 19:13:23 +00:00
c54e20a86a Fix for new orco-tangent render option: then also 'orco' texture
coordinates should be calculated... it wouldn't work unless you assign
a texture to a Material using 'orco' map.
2006-09-06 17:32:53 +00:00
6f47e5fa84 New stuff!
- Tangent vectors now can also be derived from orcos (No UV needed)
- Normalmaps now properly support tangent space as well
  (Patch provided by Alfredo de Greef)

Full log is here:
http://www.blender3d.org/cms/New_Render_features.774.0.html
2006-09-05 13:28:59 +00:00
32c51f3338 Render feature request:
Auto-clip Lamp Buffer

Setting a good range for clipping start/end for Lamp buffers is important
for good quality shadow (depth details). That can be quite a hassle, when
many lamps or animated objects are involved.

This option allows to have the clipping range calculated based on the
visible vertices in the spotbundle. For clip start and clip end it can
be set individually. Typically the clip start defines quality most.

The shadow buffer 'bias' value is corrected for this automatic clipping
too, to ensure that ranges that differ give same biasing appearance.
(If this wasn't done, you would see lighted areas become darker or
lighter, or even artefacts, when the range changes suddenly

NOTE: since it only checks for vertices, be aware that large planes can
give errors.

Implementation note: zbuffer values are non-linear (1/z) because that
allows linear interpolation while filling scanlines. That's the main
reason for the precision to be highest close to the eye (or lamp).
It's even a useful feature, since you want details to be precise
when they're closeby.
Since these values are also in the -1 to 1 range, using floats here
wouldn't solve problems a lot. Maybe trying a 64 bits Z once might
be an interesting coding job.
2006-08-31 10:36:45 +00:00
433f6c7043 Integration of the Google Summer of Code Modifier Stack Upgrade project. The
main features are:
* Modifiers can now be in any order in the modifier stack
* DerivedMesh now has a standard framework for custom element data to be passed
  through the stack with mesh data (being copied and interpolated as
  appropriate), so modifiers can access whatever data they need
* The modifier stack code has been refactored and a number of bugs have been
  removed
* The EdgeSplit modifier has been added:
  http://mediawiki.blender.org/index.php/BlenderDev/EdgeSplitModifier
* The DerivedMesh modifier has been added:
  http://mediawiki.blender.org/index.php/BlenderDev/DisplaceModifier
* The UVProject modifier has been added:
  http://mediawiki.blender.org/index.php/BlenderDev/UVProjectModifier

For more info, see:
http://mediawiki.blender.org/index.php/User:Artificer/ModifierStackUpgrade
(currently undergoing reorganisation)
2006-08-28 01:12:36 +00:00
582f56d9c4 Bugfix #4798
Envmap type "Load" didn't work when a new envmap was created for this
type. Seemed to be a very old issue...

Todo still: previews skip envmap...
2006-08-14 13:41:22 +00:00
e47137ff42 Bugreport #4787 mentioned subpixel render issues, especially for small
images (like used for rendering icons).

When working during Orange on new render pipeline, I've left this topic
alone for a while... subpixel precision testing is very time consuming and
needs concentration for a while. :)

This commit brings back precision as it was for 2.41. Below a short
explanation of the solved issues.

- the window matrix for rendering is kept constant during all OSA passes,
  this to ensure clipping happens for each pass identically.
- a subpixel offset is only applied on filling in the z-buffer
- this offset is inverse corrected for shadepixel code, only on 2 places

Another nasty issue is that for filtered rendering (gauss etc), the tiles
(or entire image) is temporally increased 2 pixel in size. This caused a
'dark' (or sky color) edge on the rendering. During Orange that was solved
with a hardcoded clipping offset value, which only corrected for larger
pictures (like > 500 pixels in size).
Now this clipping offset is correctly calculated, based on render size.

Last issue: the view border in 3d window was calculated using integers,
giving small errors in display too. Now it uses float, so visually the
view border is more close to what a render shows.
2006-08-12 11:27:00 +00:00
411332d953 Sequence render fix (report Johnny Matthews):
When a sequencer has mixed use of 32 bits and float images (note, Scene
strip returns float image too), the old 32 bits image should be freed,
otherwise it keeps saving that image.
2006-08-10 13:48:04 +00:00
7440aba482 Compositor: finished work on node "File Output".
- It saves a file with indicated type on each change, with number
  appended denoting the current frame (like ANIM saving).
- Output filename button supports relative paths ("//")
- Shows optional preview image too
- For now, added a print on each file save as feedback

To make this option work nicely, changed the BKE_makepicstring() function
to have less globals inside, so it is more generic. Todo: allow amount of
digits in filenames to be set (to support files like tmp_123456.jpg)
2006-08-10 10:38:50 +00:00
8cd491750e Bugfix #4830
Preview render in 3d window: when window type changes (like 3d window to
UV window), and you change the window size, and restore to 3d view, the
rendered preview had to be re-initialized.

texture.c: a return was added without value.
2006-08-09 10:49:52 +00:00
fde5381a94 Fix for Bugfix #4797
In revision 1.13 of pipeline.c a 'return' was added in middle of function,
skipping the free Imbuf.
2006-08-08 12:56:44 +00:00
e168d67b32 ImagePaint Refactoring:
- ImagePaint now uses ImBuf directly, and the rect blending functions
  were moved into the imbuf module.
- The brush spacing, timing and sampling was abstracted into brush.c, for
  later reuse in other paint modes.

Float ImagePaint support.

Textured Brushes:
- Only the first texture channel is used now.
- Options for size and offset should be added, but need to find some space
  in the panel, or add a second one ..
2006-07-31 15:53:03 +00:00
Ken Hughes
118125cff8 ===Rendering===
Bugfix #4797: when rendered image could not be saved, do_write_image_or_movie() returned without calling IMB_freeImBuf(ibuf).
2006-07-26 05:03:53 +00:00
d2f8f51556 Removed leftover SDL include from render module. 2006-07-19 15:39:36 +00:00
31870bf9a8 Bugfix #4715
After inserting border in entire image, the display update was missing.
2006-07-18 16:42:39 +00:00
a7b3203e31 New Particle option for Fluids did not work on rendering animation yet.
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.
2006-07-14 13:44:23 +00:00
224987b0fc == Frameserver ==
(serious) bugfix: make escape handling work in frameserver.
2006-07-13 19:36:38 +00:00
7692b9f21f Bugfix #4687
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.
2006-07-13 15:41:36 +00:00
ec9b952582 Bugfix #4683
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.
2006-07-13 14:02:27 +00:00
3bc73506ea Thanks Brecht && Valgrind!
Octree filling code used an unitialized vector. Only when a quad once was
rendered it was filled with a value, explaining the weirdness we suffer...
2006-07-13 10:55:25 +00:00
2899d1da35 Paranoia commit to eliminate threads issues or uninitialized var stuff.
- 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.
2006-07-13 10:26:36 +00:00
841b5027aa Code cleaning: mixing short and floats in multiplying while building
octree.... might give issues, so made it all float.
2006-07-12 12:06:27 +00:00
500a68f0ad - ray.c: a string was assinged to stats drawing, but not cleared. could
create buffer overflows in string drawing
- removed static variable from renderwin.c. No fix, just nicer code.
2006-07-12 10:48:05 +00:00
cf313f867d Bugfix #4647
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.
2006-07-09 11:54:41 +00:00
775d3561b1 Another fix based on venomgfx fraka .blend:
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!
2006-07-07 12:28:23 +00:00
a156ecb7f5 Two fixes, venomgfx Fraka bird test!
- 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.
2006-07-06 21:18:06 +00:00
be3c3a24b5 Bugfix #4620
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. :)
2006-07-05 17:32:49 +00:00
034c197d61 bugfix #4604
Hemi light accidentally got shadow bias applied (to hide terminator probs).
This whilst this lamp type doesn't have shadow at all.
2006-07-05 09:20:46 +00:00
d22e4059e5 Random missed a seed per frame render. 2006-07-04 16:14:39 +00:00
cc85c0951e IRC report fix:
- 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.
2006-07-03 11:53:52 +00:00
bb9cafc257 Bugfix #4557
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 :)
2006-07-02 18:26:20 +00:00
7b07fcca91 Bugfix #4564
Environment mapping on channel "Mirror color" didn't support stencilling.
2006-07-02 10:42:29 +00:00
9f6f44938e Bugfix #4562
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. :)
2006-07-02 10:30:48 +00:00
9467a55d1a Fix: While checking on render stats timer, I found there was already stats
reserved for field and blur steps, but never used or printed.
2006-07-02 08:31:54 +00:00
fc1becdcd2 bug #4559
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.
2006-07-02 08:15:16 +00:00
0cbb917e60 Bugfix #4558
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).
2006-07-02 07:59:42 +00:00
6a5f637338 Hooray! Finally found the dreaded "Opengl crash" the poor orange team
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.
2006-06-30 14:21:25 +00:00
c0e26bd3c0 Bugfix, IRC report:
Render option "Key Alpha" did not work yet.
2006-06-29 17:22:29 +00:00
e5d4c789a1 Bugfix #4535
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.
2006-06-29 10:48:30 +00:00
a3e49a23d7 Hurmf, the previous commit to solve proper 3D preview re-renders broke how
buttons preview work. :)

The initialize of the variable should be in the initialize code, not in the
freeing code, tsk tsk!
2006-06-28 14:14:52 +00:00
9ecffb4314 Campbell report:
Not clearing the value for 'parts rendered' caused 3d previewrender to
sometimes fail doing updates (when an escape happens during converting
render data).
2006-06-28 12:53:57 +00:00
c93176260a Bugfix #4446
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!
2006-06-27 13:13:49 +00:00
8d2f04ac74 Bugfix #4495
Another old only-shadow material error: spot lights with ray-shadow still
calculated shadow on faces that were pointing away from the lamp.
2006-06-27 12:01:33 +00:00
f7c9c99877 Bugfixes from own collection:
- 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.
2006-06-27 09:48:54 +00:00
2670797e8a Plumiferos report:
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').
2006-06-26 17:50:48 +00:00
a6d6a35d3c Bugs #4488 and #4431
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!)
2006-06-26 14:57:56 +00:00
d6e7eb27ed == Frameserver ==
Set SO_REUSEADDR on server-socket, since otherwise, frameserver will barf on
second start.
2006-06-26 13:22:55 +00:00
dbc7dbb2b9 Bugfix #4457
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)
2006-06-26 13:19:04 +00:00
f1bd7928ba Bugfix, Campbell irc report; the 'error no camera' didn't halt actual
rendering completely. Making ESC (push window) work confusing or even
save images in Anim (and crash).
2006-06-25 17:37:31 +00:00