Commit Graph

5068 Commits

Author SHA1 Message Date
Campbell Barton
7bb69869e0 Made numbuts use non linear rate of change when dragging.
The further you drag the bigger the number gets (like gimp/photoshop brush size slider)
Works for ranges: float buttons bigger then 11 and int buttons bigger then 129.
2006-01-24 22:07:41 +00:00
Ton Roosendaal
f0dae325c3 Orange: enabled compositing in render pipeline.
- New Node "Composite" is output node that puts composited result back
  in render pipeline.
- This then also displays in the render window while editing
- But, only with Scene buttons option "Do Compositor" set
- Then, just press F12 or render anims to see the magic!

For clarity, the former 'Output" node is renamed to "Viewer".
2006-01-24 21:50:23 +00:00
Johnny Matthews
3909f1d4a3 Prevent a mod by 0, should fix preview render crashes 2006-01-24 17:17:44 +00:00
Ton Roosendaal
74f76981bf Orange: preparation commit for Output nodes type "Render" and "File".
They dont work yet, but i accidentally committed parts of it with a bugfix.
2006-01-24 17:09:04 +00:00
Ton Roosendaal
9a20e5466c Orange bug: forgot to restore inverse matrix calculus for OpengGL render
in a window... didn't know what it was for, but now I do! It uses the
inverse to do pre-clipping on objects.
2006-01-24 17:07:39 +00:00
Ton Roosendaal
26b718654d Orange: fixes in Compositor:
- Curves in Image window didn't copy alpha (when no 32 bits rect for
  display was made already).
- Code was missing to validate grouped nodes in Compositor, didnt work
  at all yet
- Loading new Images in a Node (using filewindow) didn't assign the image

Image window now displays Alpha for float images too
2006-01-24 15:24:38 +00:00
Ton Roosendaal
771c7f3549 Orange fix: Render OGL skipped last frame... 2006-01-24 12:51:29 +00:00
Ton Roosendaal
a126178fd8 Orange: made Image window react nicer to compositor output and own Curves;
- Image curves are only applied now when curves panel is in use. Closing
  the panel will disable curves, reopen Panel enable curves.
  You can minimize the Curves panel to keep it active. That latter then
  works as visualization curves are being applied.

- Compositor output now also uses Image window curves, if active.
2006-01-24 10:35:43 +00:00
Ton Roosendaal
b1342e30b1 First bugfix in 3d previewrender; going full-window and back crashed.
Thanks Campbell! :)
2006-01-23 22:59:22 +00:00
Ton Roosendaal
9eadefee11 Scons changes needed to get it compile, works here! :) 2006-01-23 22:44:44 +00:00
Ton Roosendaal
042d612df2 Giant commit!
A full detailed description of this will be done later... is several days
of work. Here's a summary:

Render:
- Full cleanup of render code, removing *all* globals and bad level calls
  all over blender. Render module is now not called abusive anymore
- API-fied calls to rendering
- Full recode of internal render pipeline. Is now rendering tiles by
  default, prepared for much smarter 'bucket' render later.
- Each thread now can render a full part
- Renders were tested with 4 threads, goes fine, apart from some lookup
  tables in softshadow and AO still
- Rendering is prepared to do multiple layers and passes
- No single 32 bits trick in render code anymore, all 100% floats now.

Writing images/movies
- moved writing images to blender kernel (bye bye 'schrijfplaatje'!)
- made a new Movie handle system, also in kernel. This will enable much
  easier use of movies in Blender

PreviewRender:
- Using new render API, previewrender (in buttons) now uses regular render
  code to generate images.
- new datafile 'preview.blend.c' has the preview scenes in it
- previews get rendered in exact displayed size (1 pixel = 1 pixel)

3D Preview render
- new; press Pkey in 3d window, for a panel that continuously renders
  (pkey is for games, i know... but we dont do that in orange now!)
- this render works nearly identical to buttons-preview render, so it stops
  rendering on any event (mouse, keyboard, etc)
- on moving/scaling the panel, the render code doesn't recreate all geometry
- same for shifting/panning view
- all other operations (now) regenerate the full render database still.
- this is WIP... but big fun, especially for simple scenes!

Compositor
- Using same node system as now in use for shaders, you can composit images
- works pretty straightforward... needs much more options/tools and integration
  with rendering still
- is not threaded yet, nor is so smart to only recalculate changes... will be
  done soon!
- the "Render Result" node will get all layers/passes as output sockets
- The "Output" node renders to a builtin image, which you can view in the Image
  window. (yes, output nodes to render-result, and to files, is on the list!)

The Bad News
- "Unified Render" is removed. It might come back in some stage, but this
  system should be built from scratch. I can't really understand this code...
  I expect it is not much needed, especially with advanced layer/passes
  control
- Panorama render, Field render, Motion blur, is not coded yet... (I had to
  recode every single feature in render, so...!)
- Lens Flare is also not back... needs total revision, might become composit
  effect though (using zbuffer for visibility)
- Part render is gone! (well, thats obvious, its default now).
- The render window is only restored with limited functionality... I am going
  to check first the option to render to a Image window, so Blender can become
  a true single-window application. :)
  For example, the 'Spare render buffer' (jkey) doesnt work.
- Render with border, now default creates a smaller image
- No zbuffers are written yet... on the todo!
- Scons files and MSVC will need work to get compiling again

OK... thats what I can quickly recall. Now go compiling!
2006-01-23 22:05:47 +00:00
Andrea Weikert
5668480c99 small fix for icons to correctly use alpha instead of converting grey background to alpha.
Also checking in cleaned up blenderbuttons from Matt.
2006-01-22 23:27:43 +00:00
Matt Ebb
091af5911c * fix: The timeline now redraws when auto-recorded keys are set in transform. 2006-01-20 14:38:09 +00:00
Matt Ebb
6aff25e014 * Got rid of the silly 'Set' button in curve edit buttons and made the DefResolU update automatically when modified. 2006-01-19 21:32:18 +00:00
Matt Ebb
827895280f * Added a command to copy NLA strips to the Copy Attributes (Ctrl C) menus. Will be useful for updating versions of armatures, and transferring animation between them. 2006-01-18 13:44:51 +00:00
Andrea Weikert
d40162bc1a Fixed crash in pupmenu for image icons
* Scaled down image can be smaller than icon - bad memory access
* Also needed to copy float buffer for exr images
* rectcpy only copied first row

There probably is some unnessary copying, will check with a little more time.
For now better be safe since it's no huge amount of mem that is copied.
2006-01-17 17:23:44 +00:00
Matt Ebb
eb839608be * commented the version number check for empty display types so they are properly read on current files. This can be uncommented before this is released (a la camera stuff last time) 2006-01-16 20:11:40 +00:00
Matt Ebb
2af2c2c700 Orange: Display types and variable size for Empties.
This is using instructions from Ton, so hopefully the implementation is ok.
This is really needed here where we are using all sorts of wacky scales, and
empties look too big or too small. Of course we don't want to scale the
empties because there are often things parented to them.

New options are in edit buttons for empties to control the display style
and the size. New styles are easy to add, too. Just needs useful ideas and
minor effort from anyone who wants to.

Support for copying these values has also been added to the Copy Attributes
->Drawtype menu command.
2006-01-13 15:50:32 +00:00
Chris Want
cc2a332907 Optimization -frerun-cse-after-loop (included with -O2) was
causing render to crash on cygwin with gcc 3.4.4. Changed
declaration of shadepixel() argument "int facenr" to volatile.
Can anybody recommend a more elegant solution?
2006-01-12 18:34:07 +00:00
Ton Roosendaal
715794859a Orange:
- cleanup of color curves code; goes at least twice faster now!
  (includes black/white point stuff)
- When using 'Curves' in image window on a byte rect, it creates a (temp)
  float rect to operate on. So curves work for regular pictures too now.
2006-01-12 15:46:29 +00:00
Kent Mein
402518c66c convert IMB_rectop to IMB_rectcpy since IMB_rectop has been retired in
orange.

Kent
2006-01-12 15:36:02 +00:00
Kent Mein
8cdf8096b8 Ken's 64bit patches weren't merged over to orange for some reason.
This fixes that.

I'm going to see if there are other things that weren't merged over
as well.

Kent
2006-01-12 15:27:20 +00:00
Ton Roosendaal
d4f48f43ef Orange: Ortho camera now gives correct z values for buffers too. 2006-01-11 23:15:48 +00:00
Ton Roosendaal
0665f0d647 Orange;
Until now, the zbuffer was written straight from the internal zbuffer,
which has values that are inverse-proportional (like 1.0/z) which makes
it very hard to use it for postprocess, like zblur or other composit effects
that require Z.

Based on info from ILM, the values stored for Z in exr files is the
actual distance from a camera. I think that's about time to migrate to that
convention!

By default now, after render, the z values are converted to floats. This
saves in exr files now, but not in the Iris Z files. That latter was a
blender-only anyway, so might be not a real hassle to drop. :)

You can see the difference in the image window, but notice the range now
is linear mapped from camera clipstart to clipend.

Note; I just discover that ortho Z values need a different correction...
2006-01-11 22:36:31 +00:00
Ton Roosendaal
b92fa41516 Orange: more float buffer support;
- Image textures use float colors now, when present. Works for mipmap too,
  and for AO skycolor (probes)
- Backbuffer option uses float buffers too. Note that rendering OSA will
  resample the backbuffer, filtering it... will need to be solved with the
  new composit stage
- LMB sampling in image window now shows float color too

+ bugfix in imbuf, filtering for float buffers had an error.
2006-01-11 18:39:19 +00:00
Matt Ebb
ebe728d8b5 Orange: Added an option in View Properties panel to disable drawing of 'relationship lines' - i.e. the dashed lines that connect objects in parent/constraint/hook/IK relationships. After talking to the others I rolled the Armature-specific one into the same setting for simplicity's sake. We can see how it goes, always possible to put it back. 2006-01-11 14:51:24 +00:00
Matt Ebb
dac868985e Orange: Added an option in View Properties panel to disable drawing of 'relationship lines' - i.e. the dashed lines that connect objects in parent/constraint/hook/IK relationships. After talking to the others I rolled the Armature-specific one into the same setting for simplicity's sake. We can see how it goes, always possible to put it back. 2006-01-11 14:44:23 +00:00
Ton Roosendaal
1eee258449 Orange: ImageWindow goodies
- options to show with alpha-over (checkered backdrop), only alpha (BW) and
  when available: the zbuffer.
  Note: it's icons in the header, I just re-used existing ones, no time now
  for fancy design. :)

Also: recoded the way alpha-only draws, also in renderwindow. Mucho faster!

Oh, and sampling the buffer with LMB now displays z values in float range
of 0.0 to 1.0. Note that we still save signed int in files for Z...
2006-01-11 14:20:35 +00:00
Ton Roosendaal
305fdec0eb Orange: tested all EXR demo images from openexr.com, found two issues;
- images with a so-called "data window" (have negative start coordinate)
  did not read correctly
- negative colors were not clamped yet in imbuf

Now there's still some compliancy issues with zbuffers... you can save
it either as unsigned int or as float, whilst blender renders zbuffer in
signed int. :)
2006-01-11 10:41:04 +00:00
Chris Want
638b625d14 For windows, NAN_NO_KETSJI was always set to false (as a result of
some strange merging). Unfortunately, Bullet doesn't build correctly
for gcc under cygwin (some private vs public stuff), so it is
important to be able to disable the game engine in these circumstances.
2006-01-11 03:23:47 +00:00
Ton Roosendaal
09549c4538 Orange: Added Alpha viewing option in Image window. 2006-01-11 00:08:02 +00:00
Ton Roosendaal
e7285229b8 Tuesday merger of bf-blender into orange branch. 2006-01-10 22:10:14 +00:00
Ton Roosendaal
d594594cbe Orange: more work on float/exr buffers;
- EXR now saves and reads Zbuffers correctly
- EXR reading didn't set alpha to 1 yet when no alpha buffer was present

- ImageWindow: the "black point" only checked for the r value... now is OK
- ImageWindow: Curves panal has button "reset"
- ImageWindow: hold LMB drag shows rgba and z values. With SHIFT or CTRL it
  applies black/white point whilte dragging too
- ImageWindow: saving file copied the entire buffer... removed that. Also
  made the header print clear; this save only saves in own file type.

- Curves: zoom and drag now gets clamped by the Clipping value

- Imbuf: duplicate buffer only copied one quarter of to new buffer
2006-01-10 21:41:37 +00:00
Ton Roosendaal
a0a3597b8b Orange:
Accidentally didn't disable the tests I did for 'translucent raytrace',
a cheapskate SSS method;

http://www.blender.org/bf/rt.jpg
http://www.blender.org/bf/rt1.jpg

It slowed down render too much, was default on... but invisible! It needed
the F10 buttons "rt" to be huge (600-1000)
2006-01-10 19:23:11 +00:00
Kent Mein
daca2eb787 ifdef check for WITH_OPENEXR was removed from readimage for some reason
causing building without OPENEXR to fail.  (Hopefully this doesn't mess up
current scons stuff, shouldn't but I haven't tested it after latest
changes in scons)

(I also cleaned up the Makefile a tad so it didn't check twice for WITH_OPENEXR)

Kent
2006-01-10 16:52:21 +00:00
Brecht Van Lommel
b3eef4f9f1 MSVC compile error fix for subsurf UV. 2006-01-10 12:25:07 +00:00
Ton Roosendaal
ff8ab2d9df Orange: tip from Nathan to get exr working in scons compiles... 2006-01-10 11:39:03 +00:00
Brecht Van Lommel
dd7e0b6bfe Apply Subsurf to UV's.
This fixes most of the UV distortion issues with subsurf. Near seams
however there might still be some distortion, but this should at least
not be worse than before. Subsurf UV is enabled by default on new meshes,
and can be enabled in the modifier panel for existing ones.

Before and after:
http://users.pandora.be/blendix/notsmooth.png
http://users.pandora.be/blendix/smooth.png
2006-01-10 11:36:57 +00:00
Erwin Coumans
b7be6620d6 applied patch from snailrose, related to multi-platform OpenGL extensions. 2006-01-10 06:34:42 +00:00
Chris Want
ca8da580a8 OpenEXR support for Windows Makefiles 2006-01-10 06:29:57 +00:00
Campbell Barton
30633421d2 Fixed bug in convert function with Mesh objects.
Objects with no modifier could still be converted, but resulting meshes were corrupt and segfaulted Blender when cycling edit mode.
This tests each mesh object for modifiers before converting.

Resulting metaballs meshes were not visible in wireframe.

Also made the selection context nicer, All new converted objects are selected while objects that are converted are deselected.
2006-01-10 02:01:24 +00:00
Kent Mein
7e94fd8254 added prototypes for bottom_sel_action and friends.
Steath Apprentice said its needed for MSC.  Bug # 3687

Kent
2006-01-10 01:36:36 +00:00
Ton Roosendaal
3b4907415c Orange: and now for the real exr fun: float buffer support in Image window!
Image as loaded in Blender (from openexr.com):
http://www.blender.org/bf/exrcurve1.jpg

Image with different white point:
http://www.blender.org/bf/exrcurve2.jpg

Image with white and black point and a curve:
http://www.blender.org/bf/exrcurve3.jpg

Use SHIFT+click to set the black point, and CTRL+click for white point.
The buttons in the panel work too, of course.

The curves work after the black/white range was corrected, so you can
stick to curves with a normal 0-1 range.
There's also now a general color curve, marked with 'C' button.

Note; this currently only maps the float colors to a visible 8 bits per
channel rect. You can save it, but when the blender file loads the curve
or mapping is not executed until you click in the curves... have to look
at that still.
Speed for this is also quite unoptimized... still WIP, but fun!
2006-01-09 23:52:51 +00:00
Ton Roosendaal
a094eb4e9a Orange: Silly error in patch... the buffer for wpaint/vpaint got allocated
with only half the size...
2006-01-09 21:51:17 +00:00
Ton Roosendaal
e62fed936e Orange: more exr & imbuf cleanup
- Reading exr images now goes OK. I've unified the code for reading
  'half' and 'float' (was nicely possible!). And removed useless copying
  of data around.

- Fixed bug in allocating new rects, like for making mipmaps. flag issues.

- filter code accidentally incremented wrong pointer (crash on mipmap too)
2006-01-09 19:17:37 +00:00
Ton Roosendaal
bdef14bf81 Orange fix: Lamp ipos were also not duplicated when indicated... old stuff
here! :)
2006-01-09 15:56:47 +00:00
Ton Roosendaal
44fb9d1860 Orange: Avi writing crashed... very weird code in here with imbufs, made
it not using imbufs for now, so I know what goes on! :)
2006-01-09 15:46:43 +00:00
Campbell Barton
7ee9caf523 There was a problem with typing over text selections, where you had an object with 21 letter name (19 is the max but 21 is supported, just copy a mesh a few times)
After this click on the object name and start typing, even though the selection makes it that the new string would be overwritten, it dosent let you type in any text.

from
if(len <= but->max) {
to...
if(len-SELWIDTH+1 <= but->max) {

- Tested and works well.
2006-01-09 15:24:23 +00:00
Ton Roosendaal
24b45cfc10 Orange: code for building the image-type menu was wrong for non-quicktime
cases. :)
2006-01-09 12:53:05 +00:00
Ton Roosendaal
b9eabd976d Orange bugfix:
On duplicating an object with material ipos that has drivers, the new ipos
(if material and ipos were copied) didn't get the correct pointer to the
new driver object (if that was copied!)
2006-01-09 12:18:42 +00:00