patch #2554: My Documents and Desktop folder automaticly added to the Folders
pulldown of the filesector
Only affects Windows builds.
Uses shell functions to correctly get the My Documents and Desktop folders and
then add them to the fsmenu, right below the drive letters.
Needs shell32.lib linked, which is already linked by default for VS7 project files.
Platform maintainer please check if it has to be added to scons and MSVC6 project files.
Patch provided by Martin Poirier (theeth) - many thanks!
eg
Blender -b c:\blends\test.blend -o "c:\renders\render_#.png" -x 0 -F PNG
-x 1/0 for extension enable/disable
-F for format/filetype
This is important because somebody elses Blend files can render anywhere on your PC, possibly a security risk.
And nice for renderfarms to be able to set the path without running a python script inside the blend file.
blender --help (render opts only)
Render options:
-b <file> Render <file> in background
-S <name> Set scene <name>
-f <frame> Render frame <frame> and save it
-s <frame> Set start to frame <frame> (use with -a)
-e <frame> Set end to frame (use with -a)<frame>
-o <path> Set the render path and file name.
Use // at the start of the path to
render relative to the blend file.
Use # in the filename to be replaced with the frame number
eg: blender -b foobar.blend -o //render_# -F PNG -x 1
-F <format> Set the render format, Valid options are..
TGA IRIS HAMX FTYPE JPEG MOVIE IRIZ RAWTGA
AVIRAW AVIJPEG PNG AVICODEC QUICKTIME BMP
HDR TIFF EXR MPEG FRAMESERVER CINEON DPX
Use // at the start of the path to
-x <bool> Set option to add the file extension to the end of the file.
Added details to the -v option
Eg
blender -v
Blender 2.41 Build
build date: 2006-03-20
build time: 16:16:34
build platform: linux-glibc2.3.6-i386
build type: dynamic
Also fixed bugs where nagative/realy big frames could be set- causing Blender to crash.
allowing to use it for planar mirrors. Enable it with the new "Plane"
option in the Environment Map Panel.
Current default is to render the cube side that points to the positive
Z axis direction. To make it work, it uses the same image for all
other cube sides, so it will 'wrap around'.
Also made maximum resolution for environment map to be 4096x4096 now.
Fixed BLI_exist: In Windows stat doesn't recognize
a dirname ending is a slash, exept when it's
the root dir ("C:\\"), where it is required.
So trailing slashes are only removed when filename
is longer than 3 chars.
Also fixed Python Sys.c that now uses BLI_exist
instead of calling stat directly.
grp.objects
To have an iterator assigned as well as a list. Since gp.objects is an ietartor this is expected.
grp.objects= someGroup.objects works now.
Some other small fixes made.
Made a wrapper for add_to_group() That handles the OB_FROMGROUP flag. Should be moved to group.c's add_to_group()
void add_to_group_wraper(Group *group, Object *ob) {
Base *base;
add_to_group(group, ob);
if (!(ob->flag & OB_FROMGROUP)) { /* do this to avoid a listbase lookup */
ob->flag |= OB_FROMGROUP;
base= object_in_scene(ob, G.scene);
if (base)
base->flag |= OB_FROMGROUP;
}
}
This is very confusing.
Since in object has
ob.setDupliGroup() # Enable/Disable Dupligroup
ob.getDupliGroup() # see if its enabled.
ob.dupliGroup # the group data this object is instancing.
Not yet added
ob.groups # Groups that use this object.
couple of bugs in the new float support in sequencer;
- when effects have float buffer input, the effect strip itself only got
byte buffers assigned, which bypassed the float versions of effects
- the float version of cross effect used ints to fade... should be float
- tests if an effect should be recalculated didn't check for float yet
- display of float buffer in sequencer preview showed black when no
byte rect was in imbuf
Peter; we need this urgent, so I commit now.. check if this is according
to how you thought floatbuffers to work? thanks!
render option "save result to disk" and ESC from rendering, it crashed...
Note; reading partially saved exr files still crash... but that's an issue
within the openexr lib. I've mailed the openexr dev list for assistance
how to properly close a partial saved tile-file.
now the button works as meant to be.
Still working on the feature though... I noticed exr files dont read
back when only part was saved (on user break). Working...
New option "Save Buffers", in first Output panel of renderbuttons, will not
allocate all render buffers, but instead save the rendered tiles to exr.
For each scene rendered, a single exr file then is created.
After rendering, the files get read, and only then the memory allocation is
done.
The exr files are saved in the temp dir (from user settings), and have
names derived from the filename+scene name. That way these buffers remain
relatively unique, and can be re-used later too.
Saving all render-layers and passes in a single file (as F3 command) will
be done later. Also reading back the current muli-layer exr files is not
supported yet (will read black). The purpose is that these files then can
be used as input for the Compositor.
One fun thing I added; after rendering once with this option, close
Blender, and restart it. If you have a Composite set up press 'R' on an
active RenderResult node. This will refresh the node(s) and load the exr,
so you can composite again without a re-render.
for faces can give inaccuracies resulting in UV values in the hundreds
range. The UV values now are being clipped.
This should fix weird 'shooting lines' for vectorblur on hair renders.
Schlaile; do you have a weird texteditor setting or so? It breaks up
function calls in a very strange way, with each argument of a call
on a new line. That's not code that way, that's movie credits! :)
(Check the diff below to see)
* move declaration to start of function. Again I repeat: these *have* to
be at the start. GCC users should check themselves always, as GCC allows
this kind of atrocities :)
/Nathan
* These changes bring cross-compiling Blender for Windows on Linux one step
closer to reality. The 'biggest' change is in makesdna SConscript to make
sure a linux native makesdna is built, that can be run, too. Next to that
proper checks for env['OURPLATFORM']=='linuxcross' are added in various
places.
Switch change in pluginapi.c was necessary, and AFAIK it should work like
that also on WIN32, if not, slap me.
Note: everything *compiles* now nicely, it is just that the final *linking*
doesn't work (yet). Anyone who fixes this will be the
hero of cross-compilers :)
- Renderwin still used a thread-unsafe malloc, in the header text print
- Setting clipping flags in vertices for parts required a mutex lock after
all... I thought it would go fine, but noticed on renders with small
amounts of faces that sometimes faces disappear from a render.
(was doing movie credits, so all faces are visible! Otherwise it would
have hardly been noticable...)
Note : this part of code was quite a mess with things called twice when
not needed, tests for not updating when we want to, and hsv sliders not
handled properly.
I tried to figure what was useful and what was not but cannot garantee i
spotted everything or even fixed it the most proper way, the event callback
nesting making hard to figure what really happen.
However it does work again now
standard for film scanning, 10 bits/channel and logarithmic. DPX is
derived from Cineon as the ANSI/SMPTE industry standard.
DPX supports 16 bits color/channel, linear as well as logarithmic.
Code has been gratefully copied from CinePaint and was integrated in
Blender by Joe Eagar.
According to CinePaint's dev Robin Rowe the DPX code defaults to log
colorspace. Can't find in the code clues yet how to enable/disable that.
However, tests with write/read of DPX seems to show no visible loss by
log conversion code. Might be because it uses the entire 16 bit range...
CinePaint dpx files have been succesfully imported in a Quantel IQ HD/2K
finishing/grading set without problem, so for now I guess we can
use it! :)
Changes in code: added tests for image magic numbers before entering
the actual reading code. Prevents error prints, and makes it faster too.
(Note; this because Blender doesn't check for extensions, but calls
reading functions on every file until one accepts it. :)
- Bug fix: the upper tile in a collumn for Panorama render didn't put the
mainthread to sleep properly. Now panorama renders 25% faster if you had
set Y-Parts to 4.
- Enabling Compositing in Scene for first time now adds a "Composite" node
too, so render output gets applied.
- An attempt to render with "Do Composite" without "Composite" node will
throw an error and stops rendering. In background mode it will just not
render at all, and print errors.
- Errors that prevent rendering now give a popup menu again.
- Having MBlur or Fields option on will now normally render, but with an
error print in console (not done yet...)
for leftover initialized max-speed values, and clears it. Also gives
a giant print then... I want to know when it happens, and howto redo!
(error print = "tsk tsk! PASS_VECTOR_MAX left in buffer...")
also could use correction for it.
The current perspective projected blur would look in 180 degree view like
this:
http://www.blender.org/bf/p2.jpg
(circle of planes rotating around camera)
After some fight with my rusty highschool gonio I got it fixed; nice
cylindrical projected speedvectors:
http://www.blender.org/bf/p1.jpg
Ctrl+RMB in local sticky mode now selects as if in sticky mode. This used
to work only in non-sticky mode, but now with local sticky as default,
it's nice to have this functionality working there also.
- if you add new theme colors, you need to initialize them correctly and
add that in the usiblender.c version patching for saved themes
- the code for detecting group membership was highly confusing
- group colors were even used for non-groups
Further; I didnt add group theme colors yet, that's not a bug. It's a todo
item I preferred to tackle with having a decent wirecolor system once.
Rotating UV coordinates with snapping was image aspect ratio 'corrected'
for non square images. Only snapping for translation should be affected
by the aspect ratio.
The bug reported here was already fixed some weeks ago, but there were
more issues. Modifier display in face select and paint modes was never
properly finished.
This fixes some small drawing update glitches, and only allows modifiers
that preserve a mapping to the original mesh to be applied. Otherwise
selection and painting isn't even possible.
A bug fix and an enhancement:
* fixed bug when adding or deleting faces from a mesh which has
vertexColors; mesh->mcol was not being updated
* changed edges.extend() and faces.extend() to accept integer vertex
indices in addition to MVerts; this should make scripts simpler and
in general make things run faster
front/back is selected), the UV coordinates for curves should also be
corrected.
This commit re-uses the same code as for Nurbs, to make sure UV coordinates
wrap around nicely.
BUT! I've noticed that Daniel's commit of august in this code actually
broke this UV correction... in his craze to cleanup old code, he missed
the actual functionality. Meaning that in 2.40 and 2.41, "UV orco" texture
coordinates wrap around ugly in Nurbs Surfaces, something that was fixed
in NaN days.
Got no time for tracker now... but I'm sure it's in there! :)
3773 - toolbox function name of 'select - non-triangles/quads'
changed to 'select - non-triangle/quad faces'
for clarity (user expected it to select verts and edges from the name)
counting, causing "Error Totblock" messages on exit due to memory not being
freed. Added a call to test_object_materials() after the new data is linked.
* Small CVS surgery, winblender_scons.rc renamed to winblender.rcscons on repository
and change also in this SConscript. In case it was not yet clear as why there is a second
resource file with the same icons: the SCons RES() function needs the paths to be able
to generate the proper resource object. Change suggested by Joseph Eagar to prevent
problems with the Makefiles.
Additions to BezTriple API: complete get/set access to all BezTriple settings
(knot and handles points, handle types, tilt/alfa, hide, weight and selection
status).
To be able to make good masks, it is important to separate the non moving
pixels from the moving ones. With fixes I did 2 weeks ago, a floating
point inaccuracy causes speed vectors to be not always zero perfectly...
and the masks to get badly shaped.
It was clearly visible on moving objects over a non-moving background.
Current commit includes minimal threshold to force speed to zero. Images
are nice and smooth again. :)
Bad:
http://www.blender.org/bf/vb1.jpg
Good again:
http://www.blender.org/bf/vb2.jpg
editor now screws up... smells like a bug in alignment code, will need
to be checked on.
(Campbell: you sure checked the buttons before committing this? ;)
with each having different scenes, changing screens didn't call the proper
set_scene() call, which left quite some stuff improperly initialized.
With depsgraph code even causes crashing.
a well supported feature for glDrawPixels(), especially on ATIs crashes
happen with it irregularly. (note; drawing float is a regular opengl 1.0
feature...).
Now all scanline/part updates in renderwindow is converted to 32 bits
before drawing, also the in the UV Image window only 32 bits RGBA is drawn.
What is still float: drawing the final image after render in renderwindow,
and drawing the Z or Alpha in renderwindow and UV image.
Of course we need to test this first. :) Will await reports...
This prevents eternal loops. It prints error message in console.
Note that the Shader nodes dont need this, since they're just executed in
presorted order. The compositing nodes use threading, with a call asking
for the next job... if this includes cyclic nodes, the 'next job' will
always return NULL.
now for OSX though... that's where we can verify if the irregular crashes
will stop (ATI issue, nvidia seems to be OK)
If ATI users for other platforms want to check; just extend the two
#ifdefs I added for frontbuffer drawing. Note; the syntax then becomes
#if defined(__APPLE__) || defined(_YOUR_PLATFORM_)
only in Face-Select mode. It then uses for rotate and scaling the face
center itself as reference.
Code uses a loop-in-loop to find the face that belongs to the vertex...
means it will be slow with operations on 10k or more faces. Acceptable
for now, will make it nicer later. :)
Added a new tool to the 'W-Key' popup menu in mesh editmode, 'Path Select'.
When exactly two vertices are selected, 'Path Select' will find the shortest
path of vertices between them. There are two methods for determining
the shortest path, one that finds the path with shortest physical
distance, and one that finds the path with shortest topological distance.
Examples:
Original Selection
http://www.umsl.edu/~gcbq44/pathselect.jpg
Path Select - Edge Length
http://www.umsl.edu/~gcbq44/pathselect-shortestphysical.jpg
Path Select - Topological
http://www.umsl.edu/~gcbq44/pathselect-topological.jpg
The tool uses a straightforward implementation of Dijsktra's algorithm
and may be a bit slow on extremely large meshes. As a speedup you can
hide the parts of the mesh that you are not working on and they will
not be searched.
- blur works again (this was a serious bug in gamwarp...)
- seperates all sequence effects into a seperate file with a clean interface
- thereby fixing some obscure segfaults
- seperates the scope views into a seperate file
- adds float support to all effects and scope views
- removes a bad level call to open_plugin_seq
- FFMPEG seeking improved a lot.
- FFMPEG compiles with debian sarge version cleanly
- Makes hdaudio seek and resample code really work
Spaces or to tabs.
Adds function void convert_tabs(struct SpaceText *st, int tab)
int tab is eather 0 or 1; 1 if converting to tabs
I was going to make this auto run when running a script but did not know what that would do to the GE or any thing else.
different layers, the layer flags of objects got mixed up on selection.
This caused groups to become unselectable or uneditable, also the original
group...
Sofbody simulation happens in global coordinate space, and this was also
used for baking softbodies. Too bad you cannot re-use or further animate
the baked softbody then... :)
If you now use the new "Local" button in the Bake menu, it will allow to
animate or move the baked object.
This modifier allows to make arrays of meshes, with multiple offset types:
- constant offset
- offset relative to object width
- offset with scale and rotation based on another object
The number of duplicates can be computed based on a fixed count, fixed length
or length of a curve. Duplicate vertices can be automatically merged.
Nice docs and example files available in the wiki:
http://mediawiki.blender.org/index.php/BlenderDev/ArrayModifier
Remove doubles didn't previously deal with vertex groups/weights properly. Now it averages the weights of vertices when they are doubles and share the same group. Verts that get merged but don't belong to all the same groups are dealt with as well.
in doing this in the first place. (1 conditional vs 1 per loop duh)
Thanks for calling me on this Alexander.
(I didn't actually benchmark it to see but its pretty obvious which is less
work for the computer.)
Kent
animation systems, all transforms of all duplicated group members have
to be set first, before drawing or converting for render. This because
then still deformation can be calculated.
Basically the check for a type of jpeg was messed up.
I added a imb_is_a_jpeg function since I was working on that bit and
it makes it a little more similar to the other filetypes.
I also changed a switch statement that had the same loop for all
cases, just moved the loop outside of the switch statement.
Kent
same composit3_pixel_processor() function. gcc even gives nice warning:
node_composite.c: In function `node_composit_exec_mix_rgb':
node_composite.c:1437: warning: passing arg 9 of `composit3_pixel_processor' from incompatible pointer type
floats were read as pointer...
Added new function in editmesh_mods.c, "loop multiselect" and can be
accessed via the CTRL-E popup menu in editmode. It is used to select
multiple edge loops/rings based upon the current selection set. It does
this simply by looping through a list of currently selected edges and
calls 'edge_loop_select' or 'edge_ring_select' for each one. This can
be used to build large selection sets quickly, as can be seen in
the following example images...
step 1 - http://www.umsl.edu/~gcbq44/multiselectA.jpg
step 2 - http://www.umsl.edu/~gcbq44/multiselectB.jpg
step 3 - http://www.umsl.edu/~gcbq44/multiselectC.jpg
-> Misc
While I was in there I fixed a couple of existing issues as well...
- "Select Less" now gets a proper undo push.
- countall() wasn't being called after inclusive selection mode conversion
- some strange formatting in EM_convertsel() in editmesh_lib.c fixed.
It still needs some work but at least now it doesn't crash.
Basically it changed composit3_pixel_processor so that its using full
vector instead of first element (fac variable in the code).
In reality though its just pushing where its looking at the first element
of the vector to another function (do_mix_rgb)
which is calling ramp_blend with fac[0].
Kent
of sequencer, except current frame. Apparently the cache limitor doesnt
work for floatbuffers yet... and while rendering, I prefer to have all
memory available for the render itself.
Schlaile; you might check on what is wrong, in case imbufs have have
a rect_float or zbuf_float, the cache doesnt work yet?
The old implementation was added quite hackish (talking about 10 yr ago).
You also had to make a small image slice, which was extended Xparts in
size. That also required to adjust the camera angle. Very clumsy.
Now; when enabling the Panorama option, it will automatically apply the
panorama effect on the vertically aligned tiles. You can just enable or
disable the "Pano" button, to get a subtle lens effect like this:
(without pano)
http://www.blender.org/bf/rt.jpg
(with pano)
http://www.blender.org/bf/rt1.jpg
For Panorama render, the minimum slice size has been hardcoded to be 8
pixels. The XParts button goes up to 512 to allow that. In practice,
rendering 64 slices will already give very good images for a wide angle
lens of 90 degrees, the curvature of straight lines then is equal to
a circle of 256 points.
Rendering a full 360 degree panorama you do by creating an extreme wide
angle camera. The theory says camera-lens 5 should do 360 degrees, but
for some reason my tests reveil it's 5.1... there's a rounding error
somewhere, maybe related to the clipping plane start? Will look at that
later. :)
Also note that for each Xpart slice, the entire database needs to be
rotated around camera to correct for panorama, on huge scenes that might
give some overhead.
Threaded render goes fine for Panorama too, but it can only render the
vertically aligned parts in parallel. For the next panorama slice it has
to wait for all threads of the current slice to be ready.
On reading old files, I convert the settings to match as closely as
possible the new situation.
Since I cannot bump up the version #, the code detects for old panorama
by checking for the image size. If image width is smaller than height, it
assumes it's an old file (only if Panoroma option was set).
issues in parallel... So this commit contains: an update of
the solver (e.g. moving objects), integration of blender IPOs,
improved rendering (motion blur, smoothed normals) and a first particle
test. In more detail:
Solver update:
- Moving objects using a relatively simple model, and not yet fully optimized - ok
for box falling into water, water in a moving glass might cause trouble. Simulation
times are influenced by overall no. of triangles of the mesh, scaling meshes up a lot
might also cause slowdowns.
- Additional obstacle settings: noslip (as before), free slip (move along wall freely)
and part slip (mix of both).
- Obstacle settings also added for domain boundaries now, the six walls of the domain are
obstacles after all as well
- Got rid of templates, should make compiling for e.g. macs more convenient,
for linux there's not much difference. Finally got rid of parser (and some other code
parts), the simulation now uses the internal API to transfer data.
- Some unnecessary file were removed, the GUI now needs 3 settings buttons...
This should still be changed (maybe by adding a new panel for domain objects).
IPOs:
- Animated params: viscosity, time and gravity for domains. In contrast
to normal time IPO for Blender objects, the fluidsim one scales the time
step size - so a constant 1 has no effect, values towards 0 slow it down,
larger ones speed the simulation up (-> longer time steps, more compuations).
The viscosity IPO is also only a factor for the selected viscosity (again, 1=no effect).
- For objects that are enabled for fluidsim, a new IPO type shows up. Inflow
objects can use the velocity channels to animate the inflow. Obstacles, in/outflow
objects can be switched on (Active IPO>0) and off (<0) during the simulation.
- Movement, rotation and scaling of those 3 types is exported from the normal
Blender channels (Loc,dLoc,etc.).
Particles:
- This is still experimental, so it might be deactivated for a
release... It should at some point be used to model smaller splashes,
depending on the the realworld size and the particle generation
settings particles are generated during simulation (stored in _particles_X.gz
files).
- These are loaded by enabling the particle field for an arbitrary object,
which should be given a halo material. For each frame, similar to the mesh
loading, the particle system them loads the simulated particle positions.
- For rendering, I "abused" the part->rt field - I couldnt find any use
for it in the code and it seems to work fine. The fluidsim particles
store their size there.
Rendering:
- The fluidims particles use scaled sizes and alpha values to give a more varied
appearance. In convertblender.c fluidsim particle systems use the p->rt field
to scale up the size and down the alpha of "smaller particles". Setting the
influence fields in the fluidims settings to 0 gives equally sized particles
with same alpha everywhere. Higher values cause larger differences.
- Smoothed normals: for unmodified fluid meshes (e.g. no subdivision) the normals
computed by the solver are used. This is basically done by switching off the
normal recalculation in convertblender.c (the function calc_fluidsimnormals
handles other mesh inits instead of calc_vertexnormals).
This could also be used to e.g. modify mesh normals in a modifier...
- Another change is that fluidsim meshes load the velocities computed
during the simulation for image based motion blur. This is inited in
load_fluidsimspeedvectors for the vector pass (they're loaded during the
normal load in DerivedMesh readBobjgz). Generation and loading can be switched
off in the settings. Vector pass currently loads the fluidism meshes 3 times,
so this should still be optimized.
Examples:
- smoothed normals versus normals from subdividing once:
http://www10.informatik.uni-erlangen.de/~sinithue/temp/v060227_1smoothnorms.pnghttp://www10.informatik.uni-erlangen.de/~sinithue/temp/v060227_2subdivnorms.png
- fluidsim particles, size/alpha influence 0:
http://www10.informatik.uni-erlangen.de/~sinithue/temp/v060227_3particlesnorm.png
size influence 1:
http://www10.informatik.uni-erlangen.de/~sinithue/temp/v060227_4particlessize.png
size & alpha influence 1:
http://www10.informatik.uni-erlangen.de/~sinithue/temp/v060227_5particlesalpha.png
- the standard drop with motion blur and particles:
http://www10.informatik.uni-erlangen.de/~sinithue/temp/elbeemupdate_t2new.mpg
(here's how it looks without
http://www10.informatik.uni-erlangen.de/~sinithue/temp/elbeemupdate_t1old.mpg)
- another inflow animation (moving, switched on/off) with a moving obstacle
(and strong mblur :)
http://www10.informatik.uni-erlangen.de/~sinithue/temp/elbeemupdate_t3ipos.mpg
Things still to fix:
- rotating & scaling domains causes wrong speed vectors
- get rid of SDL code for threading, use pthreads as well?
- update wiki documentation
- cool effects for rendering would be photon maps for caustics,
and motion blur for particles :)
Made some fixes and changes.
* The matricies returned were wrapped. Wrapping Display Mesh matricies segfaulted sometimes. - Made a copy instead.
* Added 1 missing epydoc from the patch.
* Renamed getDupliMatrices to getDupliObjects, and changed to return a list of (object, matrix) tuples instead of just the matrix. This is much more usefull because it allows python to know what objects are used for dupliGroups and for dupliverts where there is more then 1 child. also cleaned up this function a bit.
+ SCons support for pthreads-win32. Library will be committed shortly into
lib/windows, so be sure to check commit list and update that as well
when the pthread lib is available.
For some reason I thought SDL thread handling would be much simpler... but
the migration to posix pthread went very smooth and painless. Less code
even, and I even notice a slight performance increase!
All threading code is still wrapped in blenlib/intern/threads.c
Only real change was making the callback functions to return void pointer,
instead of an int.
The mutex handling is also different... there's no test anymore if a
mutex was initialized, which is a bit confusing. But it appears to run
all fine still. :)
Nathan Letwory has been signalled already to provide the Windows pthread
library and make/scons linking. For MSVC we might need help from someone
else later though.
the ones that get changed within threads, to communicate with the main
thread.
(Part of the long quest to get threaded render safe, especially in Linux)
passes in single file. Code is currently disabled, commit is mainly to
have a nicer method of excluding OpenEXR dependency from render module.
This should compile with disabled WITH_OPENEXR too.
Reason why EXR is great to include by default in Blender is its feature
to store unlimited layers and channels, and write this tile based. I
need the feature for saving memory; while rendering tiles, all full-size
buffers for all layers and passes are kept in memory now, which can go
into 100s of MB easily.
The code I commit now doesn't allocate these buffers while rendering, but
saves the tiles to disk. In the end is it read back. Overhead for large
renders (like 300 meg buffers) is 10-15 seconds, not bad.
Two more interesting aspects:
- Blender can save such multi-layer files in the temp directory, storing
it with .blend file name and scene name. That way, on each restart of Blender,
or on switching scenes, these buffers can be read. So you always see what was
rendered last. Also great for compositing work.
- This can also become an output image type for rendering. There's plenty of
cases where you want specific layers or passes saved to disk for later use.
Anyhoo, finishing it is another days of work, and I got more urgent stuff
now!
out moving transparent pixels by checking for alpha>0.95, now it also
checks the solid layer (if present), and if there's no solid face in a
pixel, the speed vector gets also added and used for transparent pixels.
This solves the 'ugly' hard outlines for vectorblur of moving hair.
Before:
http://www.blender.org/bf/h1.jpg
After:
http://www.blender.org/bf/h2.jpg
+ the code in writemovie.c no longer compiles (since the renderer
refactor). I have #if 0-ed it.
+ OpenGL on Irix doesn't have GL_ARB_vertex_program
+ mmap on Irix doesn't like MAP_ANON.
+ If using the MipsPro 7.3 compiler, the variable MIPS73_ISOHEADERS
can be set to point to the directory with those weird C++ headers
that don't have .h in the name
now that the command to put the object files into an archive is
exceeding 20k characters, which is a problem for some operating systems.
To avoid this, this modification causes make to change directories before
archiving, to avoid having to specify full file paths to the files
being archived.
If this causes problems on some systems, let me know and I'll find an
alternative.
filtersizes (below 2 pixels). This because Bokeh actually does 2 peaks...
/\ /\
/ \/ \
I've added some fixes in the filter calculus though, and made sure that
on size 1 at least the image gets copied straight away.
Also fixed error, Bokeh shifted image 1 pixel up.
Todo; make filters become real floats in size...
to my previous commit (whoops). The second part covers the changes I
have made to the code since then (all related to merge tools code).]
# Part One: Complete Log for Commit from 2/13/06
-> Upgraded merge tools.
The new merge tools add several options to blenders Merge submenu,
accessed via the WKEY whilst in Editmode for meshes. The new options
depend on current mode:
- Vertex mode: "At First" and "At Last"
When choosing "At First" or "At last" it will merge all selected
vertices at the first or last selected vertex.
(Note: Blender now keeps track of the last and first verts selected in
editMode (G.editMesh->lastvert and G.editMesh->firstvert
pointers. This meant additions were made to the undomesh code in
editmesh.c as well).
- Edge mode: "Collapse Edges"
When choosing this option, Blender examines the current set of
selected edges and groups them according whether or not they are
topologically connected. It then goes through each group and merges
them one by one to a single point.
- Face Mode: "Collapse Faces"
Works the same as "Collapse Edges", only works on groups of
topologically connected faces.
-> Inclusive selection mode conversion.
This feature extends the ability of blenders selection mode
conversions. Currently when you change selection modes from a "lower
order" mode to a "higher order" one (vertex->edge, vertex->face or
edge->face) blender only selects elements in the new mode whose
elements were completely selected in the previous mode.
This patch does not change blenders default behavior but offers
implicit selection mode conversion as an alternative. To access it,
hold either the left or right CTRL keys and click on a selection mode
in the view 3d selection mode header buttons. This can be accessed via
the CTRL-TAB selection mode switching as well, simply hold CTRL while
clicking the mode you want or entering its number on the keypad.
In some programs, such as Wings and Mirai, it has been demonstrated
that it can also be very useful to exploit selection mode switching to
implicitly select previously unselected elements as well. For instance
switching selection mode from vertex to edges will select all edges
currently associated with the currently selected vertices. The same
behavior is applied to switching between vertex->face and
edge->face. By exploiting this sort of selection conversion complex
selection sets can be built quicker.
Furthermore I modified blenders UndoMesh code to make selection mode
switching "undo coherent". Aside from its relevance to inclusive
selection mode conversion, this really counts as a "bug" in my
mind. Previously selection mode switch could cause the selection state
of the mesh to be invalid when certain modeling operations were
undone. An example of this would be "edge subdivide-> switch to face
mode-> undo"; you end up with edges selected while still in face mode!
# Part Two: Log for this Commit
-> Code Cleanup
As per Ton's request I reformatted all my code, changed variable names
and eliminated my use of "LinkNode" structs and replaced them with
"ListBase" instead. There should be no warnings while compiling now
either.
-> Remove doubles bug
Fixed small problem in removedoublesflag() in editmesh_tools.c that
caused editface structs to get their UV's scrambled. Vertex colors
might not be safe though? Need to investigate later.
-> Small bug in in the the code for merge last/first
It could cause a crash when exiting editmode, switching meshes, then
entering editmode again. "lastvert" and "firstvert" pointers are now
set to NULL whenever exiting editmode now (see load_editmesh() in
editmesh.c). I will find a better solution to this *soon*...
-> All merge tools now UV aware (optional)
The default behavior is to leave UVs alone, but if you hold CTRL while
clicking on the menu entry, UV's are merged. This works fine in most
situations, although some investigation into how to best handle
merging of UVs at the border of UV islands needs to be done.
This last item brings up a point about the current state of the
interface: several functions accessed through the WKEY menu now use
the CTRL modifier to change how they behave (This convention has been
in place for a while, see subdivide for example). Unfortunately there
is no way to communicate the way modifier keys change the behavior of
certain functions to the user. This makes such options invisible for
all intents and purposes...
object center, it doesn't generate displaylist (or derivedmesh). This
error showed especially on loading files, and you had to advance frame,
zoom out or press Numpad-9 to see stuff.
- Links now can be made between any socket type. The nodes recognize amount
of channels, and will convert types if needed.
Conversions from RGBA to 1 channel will use the 'RGB to BW' formula.
Also note that conversions only happen when required. So you can blur an
alpha channel, filter it, and put this in a 1-channel socket without any
conversion to happen, which saves memory & cpu time.
http://www.blender.org/bf/rt.jpg
The blur nodes don't accept Vector input yet... But filter does.
- RGB Curve Nodes now have the premultiply option resored, 2 x faster
- Fixed some confusing code in Node Group handling... much stabler now
At long last!
This new constraint is pretty simple. Following in the footsteps of such giants as Copy Loc and Copy Rot, it lets you constrain the size of an object/bone to another object/bone, with per axis restrictions.
- Texture Node
Allows to use any Blender Texture block as input for masks or color
blending. The texture node doesn't generate a real image, but adjusts to
the size as mapped with during an operation. So it won't work to use it
as Image input for Blur or Filter nodes.
Note; the Vector inputs for this node only work with manual input now!
- Translation Node
Give any image an offset in X or Y direction
For the Texture node to work, I needed to move the central 'pixel
processor' up one level... to allow differently sized images to merge
and allow 'procedural images' without size.
Temporal image of the day: http://www.blender.org/bf/rt.jpg
without initialization.
For Brecht:
source/blender/blenkernel/intern/subsurf_ccg.c:329: warning: left-hand operand of comma expression has no effect
This line I don't understand...
This now is a post-process option only (used to be in render).
It is only handled within the Imbuf/ module, on conversions from float
to byte rect, which atm mostly happens on saving images.
- Small fix: when using Scene RenderLayer nodes, the speed vectors for
these nodes were not created when that scene had "Do Composite" off.
(NOTE: new include dependency in Render module, might need MSVC update!
It has to include the imbuf/intern/openexr/ directory in search path)
-> New Composite node: "Hue Saturation".
Works like the former 'post process' menu. There's no gamma, brightness or
multiply needed in this node, for that the Curves Node functions better.
-> Enabled Toolbox in Node editor
This now also replaces the SHIFT+A for adding nodes. The nodes are
automatically added to the menus, using the 'class' category from the
type definition.
Current classes are (compositor examples):
Inputs: RenderResult, Image
Outputs: Composite, Viewer
Color Ops: RGB Curves, Mix, Hue Saturation, AlphaOver
Vector Ops: Normal, Vector Curves, Map Value
Filters: Filter, Blur, VectorBlur
Convertors: ColorRamp, RGBtoBW, Separate RGBA, Separate HSVA, Set Alpha
Generators: RGB, Value, Time
Groups: the list of custom defined nodes
-> OpenEXR tile saving support
Created an API for for saving tile-based Images with an unlimited amount
of layers/channels. I've tested it for 'render result' now, with the idea
that this can (optionally) replace the current inserting of tiles in the
main result buffers. Especially with a lot of layers, the used memory for
these buffers can easily go into the 100s of megs.
Two other advantages:
- all 'render result' layers can be saved entirely in a single file, for
later use in compositing, also for animation output.
- on each render, per scene, a unique temp file can be stored, allowing
to re-use these temp files on starting Blender or loading files, showing
the last result of a render command.
The option is currently disabled, needs more work... but I had to commit
this because of the rest of the work I did!
-> Bug fix
The Image node didn't call an execute event when browsing another image.
they work ok in testing here and get done what I need, any checks or fixes are welcome.
* Separate RGBA: Separates an input RGBA image into its R, G, B and A channels
* Separate HSVA: Separates an input RGBA image into H, S, V and A channels
* Set Alpha: Takes an input RGBA image and an alpha value channel and combines them
into a single RGBA image channel. You can also set the alpha for the entire image
with the number field when there's no input alpha channel. TODO: Allow input alpha
channel with no input image, in order to output a solid colour, with alpha.
Allow object.setMatrix() to accept 3x3 matrices by extending to a 4x4
internally. Also check the dimensions of the new matrix and throw an
exception if not a 3x3 or 4x4.
In Orange we've been fighting the past weeks with memory usage a lot...
at the moment incredible huge scenes are being rendered, with multiple
layers and all compositing, stressing limits of memory a lot.
I had hoped that less frequently used blocks would be swapped away
nicely, so fragmented memory could survive. Unfortunately (in OSX) the
malloc range is limited to 2 GB only (upped half of address space).
Other OS's have a limit too, but typically larger afaik.
Now here's mmap to the rescue! It has a very nice feature to map to
a virtual (non existing) file, allowing to allocate disk-mapped memory
on the fly. For as long there's real memory it works nearly as fast as
a regular malloc, and when you go to the swap boundary, it knows nicely
what to swap first.
The upcoming commit will use mmap for all large memory blocks, like
the composit stack, render layers, lamp buffers and images. Tested here
on my 1 GB system, and compositing huge images with a total of 2.5 gig
still works acceptable here. :)
http://www.blender.org/bf/memory.jpg
This is a silly composit test, using 64 MB images with a load of nodes.
Check the header print... the (2323.33M) is the mmap disk-cache in use.
BTW: note that is still limited to the virtual address space of 4 GB.
The new call is:
MEM_mapalloc()
Per definition, mmap() returns zero'ed memory, so a calloc isn't required.
For Windows there's no mmap() available, but I'm pretty sure there's an
equivalent. Windows gurus here are invited to insert that here in code! At
the moment it's nicely ifdeffed, so for Windows the mmap defaults to a
regular alloc.
- Button option "Single" in render-layer panel will enable to only render
the currently indicated render-layer. It will also skip compositing.
- Brought back the 'Local View' render. This will only render the visible
objects, but with lights from the original view-layers.
To make the option useful, it also temporal enables 'Single', which has
the a disadvantage that you need to set the correct render-layer.
It is a bit a tricky option though... since its quite invisble and
confusing for people who don't know the feature. This might become either
a button in 3d header, or use a popup requester to confirm, or... will
need to think over!
At least; both options display in render window a text to denote the option.
Small bug reported on irc, matrix.translationPart didn't check bounds
properly (needed to use || instead of &&). Also fixed similar bugs in
rotationPart and rich compare.
large scenes... this because it has to make 3 entire databases to find
the vertex-speed to previous and next frame. Even though most of the
prev/next database was freed, the parts I kept were spread all over
memory.
This commit copies from the prev/next database only the two screen aligned
speed vectors and stores that in temporal per-object structs. Even whilst
it takes more memory, it then can free the entire database, making space
for the next database to be built.
Tests reveiled it saves quite some... well, if you want to believe the
'virtual memory' total unix gives... :)
using 1 line per part rendered. Might go back to 1 line again, but at this
moment I need the logs for debugging.
Same prints are active now for UI rendering. Just temporal :)
keys with IKEY in buttons to not work.
- Crash in opengl while rendering was caused by the fact that scanline
updates are drawn in the main thread, whilst the actual render thread
then can already be doing different stuff.
Especially with many layers & passes it's getting confusing easily :)
Convention now is that scanline render updates only happen while the
thread is looping over scanlines. As soon as it reached the last, no
drawing happens, not even to update the last segment.
This isnt a problen, since any finished tile is drawn again entirely.