Commit Graph

655 Commits

Author SHA1 Message Date
6543d3e220 Render Monster support: (part 1)
Removed all limitations from render code for maximum threads. The only
define for this now is in BLI_threads.h, and currently set to 8.
Note that each thread renders an entire tile, and also allocates the
buffers for the tiles, so; more threads might work better with smaller
tiles.

IMPORTANT: node system won't work yet with more than 2 threads! So, don't
try material nodes or compositing with over 2 threads. That I'll commit
later today.

What does work (should work :) is AO and soft shadow now.
2006-11-29 17:01:09 +00:00
20e6dc7f57 Bugfix, own collection:
Random seeding is still not perfect in render, especially lack of good
thread support still.

- VectorBlur node was calling seed for each exec, causing other nodes to
  get fixed random too.
- added seed in non-OSA main loop for render
- use BLI_srandom, is better than BLI_srand
2006-11-21 15:52:45 +00:00
Nathan Letwory
88446eeca4 Patch 5105 by Joshua Leung (Aligorith), slightly modified by me
* Add WITH_BF_YAFRAY, which per default is 'true', so no visible changes for developers (and users).

Set WITH_BF_YAFRAY to 'false', and you'll save some major compile time :) Also handy if you're strapped for memory and compilation fails on yafray compilation due
 to this.

- this commit also has a few whitespace changes and
- made BF_NO_ELBEEM a proper BoolOption. This will be renamed to WITH_BF_ELBEEM in the near future...
2006-10-18 05:45:47 +00:00
e868f223dc New shadow feature: Irregular Shadow Buffers
Full log:
http://www.blender3d.org/cms/Irregular_Shadow_Buffe.785.0.html

In short: this is a shadow buffer approach that always results in crispy
shadows, independent of lamp buffer size or zoom level. This shadow buffer
system also supports transparent shadow.

This is part of work on refreshing Shadow Buffers in Blender. You now can
choose of two types (Classical, Irregular). More types will follow. Also
quality issues for Classical shadow buffers are going to be reviewed,
especially to solve the lousy Biasing.

For the CVS log record; it is based on articles:
Gregory Johnson et al, University of Texas, Austin. (Regular grid method).
Timo Aila and Samuli Laine, Helsinki University of Technology. (BSP method).
2006-10-14 10:21:19 +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
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
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
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
31870bf9a8 Bugfix #4715
After inserting border in entire image, the display update was missing.
2006-07-18 16:42:39 +00:00
224987b0fc == Frameserver ==
(serious) bugfix: make escape handling work in frameserver.
2006-07-13 19:36:38 +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
d22e4059e5 Random missed a seed per frame render. 2006-07-04 16:14:39 +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
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
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
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
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
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
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
713711b8be Bugfix #4463
Render Pipeline: the error "No camera" wrongly popped up when rendering a
scene that has only compositing inside (can skip 3d rendering).
2006-06-25 12:16:05 +00:00
93f2eb4487 Bugfix #4443
Mblur render without OSA set, still did render OSA.
2006-06-25 09:18:55 +00:00
47b5894e57 == Render ==
Bugfix:
- Frameserver rendering always got only the first frame, because
  re->cfra wasn't initialized.
2006-06-24 20:54:26 +00:00
193015653f bug #4380, border rendering was not correct.
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.
2006-06-22 03:12:48 +00:00
8d9d66f30f fix #4379
3D Preview didn't update correctly when switching between ortho and
perspective view (ortho render flag hanging)
2006-06-20 15:55:49 +00:00
36bedb3d7e Bugfix #4363
In windows, without temp path set, the 'save buffers' render option crashes.

I've coded a blenlib BLI_is_writable(char *filename) to check for such
cases. This is not much needed in Blender, since the open() command is
checked for. However, file saving happens deep inside the C++ exr lib, and
it throws an exception crash when a file cannot be written.
2006-06-19 13:53:00 +00:00
5f5ee11fcb Seems a large commit, but I also changed function names to match the new
naming convention for Compositing:

- Render Result node -> Render Layers node (name only appears in Add menu)
- Compositor image -> Viewer Node image

I've also added a version patch (2.41 saved files only) to rename existing
"Compositor" Images.
2006-06-19 08:45:11 +00:00
2a67e98359 Bugfix #4352
More Sequence render fixes:

- on load of .blend file, with Sequencer invoking a sequence render, the
  header window matrix was not set, giving "Insane icon" prints
- option "Do Sequence" had no re-display call in end
2006-06-18 12:27:06 +00:00
f4dcb244f5 Lens flare rendering back.... completely forgot about this antique
feature.

It doesn't render preview yet... for that we have to fix preview system.
2006-06-13 14:51:17 +00:00
bad72cec61 New feature! (Well, replacement for the exisiting cumbersome "DispView")
Next to the "DispWindow" there are now two new choices:

- Display render output to Image Editor
- Display render output to Screen-sized Image Editor

Both options won't open a 2nd window anymore, which makes work quite more
smooth even, especially because 'focus' isn't lost. Further it fits in the
'single window UI' paradigm of Blender. Should have been done 10 years ago!

Lastly it might bypass issues with X11... having 2 windows with opengl
context is not always stable in Linux.

This option uses an identical trick as for the Compositor viewer, using an
Image block with a fixed name ("Render Result").

The flow, when invoking a Render, goes as follows:
- first it checks if there's an Image Editor visible displaying the "Render
  Result", if so then it uses that area-window.
   (Use this option for dual-monitor setups for example, a render will always
   go to the same location then)
- else it checks if there's an Image Editor open in general, it then
  assigns that window the "Render Result" Image.
- else: it searches for the largest Area in the screen, and turns that into
  a temporal Image Editor showing render output.

After a render, an ESC will push back the former view, if the Area type has
changed.

Same rules apply for the "Full Screen" option. Here an ESC will always go
back to the regular Screen, and restore Area type if required.

While rendering, the queue for the renderwindow isn't handled yet, so you can
not zoom (nor get full redraws), as for the regular render window.

Existing conflicts:
- in FaceSelect mode, the Image editor enforces to display the face texture
  after rendering again.
- when using an Image window for compositing, you'll lose the Viewer output
  on a render.

Implementation note:
While rendering updates, nothing is drawn in frontbuffer anymore. That's
good news for b0rked OpenGL drivers (and faster). However, for the few
OpenGL cards that don't do a "swap copy" but a "swap exchange" you get
issues... has to be worked on. I'm afraid we have to drop frontbuffer
drawing altogether.

Other fixes:

- Hotkeys NumPad 1, 2, 4, 8 will set zoom levels (was half coded only?)
  Use SHIFT to zoom out (smaller).

- Rendering Tile updates still had draw errors on edges of tiles, in OSA
  only. (Caused by commit 4 days ago)
2006-06-12 14:39:08 +00:00
c2df22f306 Commit from Alfredo to support yafray sub-rect updating required an
additional initialize for scanline length in Blender.

(Error: only the entire tiles were visibly updated while render)
2006-06-11 19:53:24 +00:00
d9081db9e0 Thought to be nice for for backwards compat && users... so the old
"Backbuf" image render option is back :)
Nicer coded, using Image texture functions.

If you want 100% reliable pixel to pixel accuracy you have to use
compositing. (Old Backbuf didn't do this accuracy either btw).
2006-06-10 16:30:44 +00:00
77223515a9 Bugfix #4298
Uncommitted the feature I added for Plumiferos to be able to render
animated render-borders (which effectively means every frame can be a
different size).
For several reasons;

- it will crash movie rendering (when image sizes differ)
- it forced code to do a full initialize each frame, also for setting the
  renderwindow (which popped up on each frame)
- the render pipeline was not designed with per-frame python changes in
  mind for image sizes... it uses an "Initialize" stage which is only
  called once for an entire sequence.

That latter might be an omission, but for that I better code a new API
call (for use in Python) so a re-init can be enforced.

The old functionality (animated render borders) will still work when you
render in background, using small steps like blender -s 1 -e 5 -a etc.
2006-06-09 12:21:15 +00:00
8bc6697978 Fix in commit I did of May 29
To enable python to change border while render, I moved the initialize
call inside of the main loop that went over the frames.
Forgot to do move the movie-initialize call as well... which now got
called with zero'ed values.

Thanks Peter Schlaile for the poke!
2006-06-06 18:45:55 +00:00
6f0d7e8d1f bugfix #4072 added support for strandmapping, done by exporting the
strand texcoords as orco coords, so yafray doesn't have to be adapted for this.
bugfix #4254 added support for dupligroups, but might not work completely
correct yet at this point, more testing needed.

Also added some missing parts from the code apparently removed at some time.
Mainly having to do with dupliverts, cam.info for aspect ratio/ortho mode/etc.
Header stats (render window) should now work again too.
Fixed missing last tile draw of render window.
Added the missing const_cast in the win32 part of the xml export code.
2006-06-05 02:24:12 +00:00
db0f3846a5 Disabled the combination of "Border render" and "Save buffers" for now.
The latter uses OpenEXR tile-based files, but the EXR spec doesn't allow
tiles to differ in size... limiting the amount of OK resolutions for
images.
2006-06-02 16:01:25 +00:00
9c4eaf326f Buffix #4124
Changing render settings with python while Anim render now updates display
for each frame. So you can animate render borders, or even save different
sized images.
2006-05-29 17:22:05 +00:00
1495e7711b fix #4248
Render:
The "error no camera" was too strict, also popping up when only Composite
or Sequencer was meant to use.
2006-05-29 13:40:15 +00:00
649dcd94bb Yafray 'should' now work again. A bit more testing needed.
But seems to work sofar anyway, composit nodes should work as well.
2006-05-29 03:59:12 +00:00
eda218ecb4 Step one in bringing back Yafray Render in Blender. Need someone else
to take over now, but I'm available for help. Main notes for completing:

- Yafray module uses old global R all over... is now a pointer handle.
  It can be temporally bypassed by straight copying, which I do now.

- I am not sure in what pixel format Yafray renders... Blender now only
  uses float buffers. In the code, marked with XXX I've added the
  rudimentary code for retrieving buffers.

- This integration will skip compositing when Yafray render is used.
2006-05-28 12:30:09 +00:00
638bae4db4 Bugfix in last commit; preview renders didn't work render properly, parts
of tiles were black sometimes.
2006-05-27 17:05:03 +00:00
e5b39b69d1 So! Finally time to work on finishing render pipeline project.
This commit brings back:

- Field Render
- MBlur Render (old style)
- Border render with or without cropping

Note: Field Render is not supported in Compositor yet. Blurring or filter
will destroy field information.
Both MotionBlur as Field render are done before Compositing happens.

Fixes:

- The "Save Buffers" option only worked on single frame renders, not for
  Anim render.
- Found an un-initalized variable in Render initialize... this might have
  caused the unknown random crashes with render.

Code restructure:

Cleaned up names and calls throughout the pipeline, more clearly telling
what goes on in functions.
This is visible in the updated first image of the Wiki doc:
http://mediawiki.blender.org/index.php/BlenderDev/RenderPipeline
2006-05-27 13:35:03 +00:00
1b577b7f0d *python documention & bug fix
- added documentation to Render - saveRenderedImage has an option to save the zbuffer along with the image
(off by default)
- fixed a really annoying runtime error of uninitialized data being passed to a method in pipeline.c during a render
2006-05-25 21:10:28 +00:00
f13d63ca48 Brought back the Scene strip in Sequencer. Even does a full composite with
only images input in compositor. Currently still renders in the scene's
own resolution. It also doesn't show scanline/tile updates yet while
rendering.
2006-05-21 20:59:54 +00:00
6cc46d087e A stupid x/y mixup gave error "Sorry, exr tile saving only allowed with
equally sized parts" when the tiles were equally sized anyway.
2006-05-12 11:22:45 +00:00
a82910b1b9 Previewrender fix: when moving the mouse still while previews should render
the escape happened without resetting a variable correctly, resulting in
black preview.

This can still be coded better...
2006-04-01 09:36:18 +00:00
8383c44a85 Silly bug in using Compositor... the code that checked if a 3d rendering
was required (compositor can also be used with only image input) told
the pipeline not to render when no composite nodes were available at all,
and with button 'Use Nodes' on.
2006-03-21 11:29:03 +00:00
cf0408a4f6 More environment map stuff:
- added a zoom factor for Planar Environment Map, allowing to zoom in or
  out on the reflected object. The zoom is corrected when rendering, so it
  just gives control over the resolution.
- Planar maps don't cycle anymore, but only render the front plane, using
  standard image texture extend mode.
- threaded rendering is back in envmap render
2006-03-19 17:50:53 +00:00
e2660f614d Dang... on background rendering (renderfarm) the user preset for temp dir
isn't set. Hardcoded it to /tmp/ now. Have put on list this requires a
better solution (same issue open for yafray afaik)
2006-03-15 20:41:08 +00:00