Age | Commit message (Collapse) | Author |
|
off.
GPUs need a full tree of mipmaps up to dimension 1xn to work. This will
make it so for all imbufs but cost is negligible and it's unlikely that
something could break due to that.
|
|
modifiers, nodes)
|
|
|
|
- Made them receive number of channels rather than number of planes.
This matches to how ImBuf structure stored planes and channels.
- IMB_premultiply_rect_float() was called with channels passed instead
of planes already :S.
|
|
Adding non-RGBA float buffers as texture crashes MipMap code.
Images with less than 4 channels not supported (yet). Not sure
if we ever should even... normals, Z, vectors, UV, Index, all
don't like downsampling.
|
|
This assumptions are now made:
- Internally float buffers are always linear alpha-premul colors
- Readers should worry about delivering float buffers with that
assumptions.
- There's an input image setting to say whether it's stored with
straight/premul alpha on the disk.
- Byte buffers are now assumed have straight alpha, readers should
deliver straight alpha.
Some implementation details:
- Removed scene's color unpremultiply setting, which was very
much confusing and was wrong for default settings.
Now all renderers assumes to deliver premultiplied alpha.
- IMB_buffer_byte_from_float will now linearize alpha when
converting from buffer.
- Sequencer's effects were changed to assume bytes have got
straight alpha. Most of effects will work with bytes still,
however for glow it was more tricky to avoid data loss, so
there's a commented out glow implementation which converts
byte buffer to floats first, operates on floats and returns
bytes back. It's slower and not sure if it should actually
be used -- who're using glow on alpha anyway?
- Sequencer modifiers should also be working nice with straight
bytes now.
- GLSL preview will predivide float textures to make nice shading,
shading with byte textures worked nice (GLSL was assuming straight
alpha).
- Blender Internal will set alpha=1 to the whole sky. The same
happens in Cycles and there's no way to avoid this -- sky is
neither straight nor premul and doesn't fit color pipeline well.
- Straight alpha mode for render result was also eliminated.
- Conversion to correct alpha need to be done before linearizing
float buffer.
- TIFF will now load and save files with proper alpha mode setting
in file meta data header.
- Remove Use Alpha from texture mapping and replaced with image
datablock setting.
Behaves much more predictable and clear from code point of view
and solves possible regressions when non-premultiplied images were
used as textures with ignoring alpha channel.
|
|
cost by ~30%
|
|
IMB_filterN now generates 32-bit int representation of float images for mipmap generation if such representation does not exist.
|
|
- style - multi-line ifs move braces onto new lines.
- iterators - convert some to macros, other split up and move brace.
|
|
|
|
|
|
|
|
|
|
|
|
else if's
|
|
|
|
avoid confusion with ImageFormatData.depth
|
|
http://markmail.org/message/fp7ozcywxum3ar7n
|
|
- remove redundant NULL checks on old code where it would crash if the result was NULL later on.
- add some missing NULL checks.
|
|
This patch adds:
* support for proxy building again (missing feature from Blender 2.49)
additionally to the way, Blender 2.49 worked, you can select several
strips at once and make Blender build proxies in the background (using
the job system)
Also a new thing: movie proxies are now build into AVI files, and
the proxy system is moved into ImBuf-library, so that other parts
of blender can also benefit from it.
* Timecode support: to fix seeking issues with files, that have
a) varying frame rates
b) very large GOP lengths
c) are broken inbetween
d) use different time code tracks
the proxy builder can now also build timecode indices, which are
used (optionally) for seeking.
For the first time, it is possible, to do frame exact seeking on
all file types.
* Support for different video-streams in one video file (can be
selected in sequencer, other parts of blender can also use it,
but UI has to be added accordingly)
* IMPORTANT: this patch *requires* ffmpeg 0.7 or newer, since
older versions don't support the pkt_pts field, that is essential
for building timecode indices.
Windows and Mac libs are already updated, Linux-users have to build
their own ffmpeg verions until distros keep up.
|
|
|
|
great as I first thought. This kernel is a more basic one (trite but true)
|
|
This commit fixes very noticeable seams caused by margins
calculated incorrectly. This commit changes way margin is
calculated in and makes textures really seamless.
Also margin limited to 32 isn't good now -- artists are baking
really large textures nowadays so margin is now limited to 64px.
Thank you, Morten!
|
|
=======================
Added option to baked named "Bake From Multires" which is avaliable for
normals baking and displacement baking.
If this option is enabled, then no additional hi-res meshes and render
structures would be created . This saves plenty of memory and meshes
with millions of faces could be successfully baked in few minutes.
Baking happens from highest level against viewport subdivision level,
so workflow is following:
- Set viewport level to level at which texture would be applied
during final rendering.
- Choose Displacement/Normals baking.
- Enable "Bake From Multires" option.
- You're ready to bake.
Displacement baker had aditional option named "Low Resolution Mesh".
This option is used to set if you want texture for realtime (games)
usage.
Internally it does the following:
- If it's disabled, displacement is calculated from subdivided
viewport level, so texture looks "smooth" (it's how default
baked works).
- If it's enabled, dispalcement is calculated against unsubdivided
viewport levels. This leads to "scales". This isn;t useful for
offline renders much, but very useful for creating game textures.
Special thanks to Morten Mikkelsen (aka sparky) for all mathematics
and other work he've done fr this patch!
|
|
Problem was caused by different limits for "last" mipmap: it was 1x1
for mkaing mipmaps and 2x2 for re-making.
2x2 should be enough for mipmap.
|
|
|
|
|
|
- move GS() define into DNA_ID.h
- add BLI_utildefines as an automatic include with makesrna generated files.
|
|
MAKE_ID, FILE_MAXDIR, moved the generic defines to BLI_utildefines.h.
no functional changes.
|
|
Old bug report:
Image Editor, Painting: crash when texture was visible in
Material or Texture preview. Was caused by paint code
freeing mipmaps. Now replaced with a mipmap tag (to be done
again), and a new mipmap function that doesn't re-allocate.
|
|
- removed deprecated bitmap arg from IMB_allocImBuf (plugins will need updating).
- mostly tagged UNUSED() since some of these functions look like they may need to have the arguments used later.
|
|
- remove MEM_guardedalloc.h from header files (include directly)
|
|
tile cache code in imbuf, but it is not hooked up to the render engine.
Imbuf module: some small refactoring and removing a lot of unused or old code
(about 6.5k lines).
* Added a ImFileType struct with callbacks to make adding an file format type,
or making changes to the API easier.
* Move imbuf init/exit code into IMB_init()/IMB_exit() functions.
* Increased mipmap levels from 10 to 20, you run into this limit already with
a 2k image.
* Removed hamx, amiga, anim5 format support.
* Removed colormap saving, only simple colormap code now for reading tga.
* Removed gen_dynlibtiff.py, editing this is almost as much work as just
editing the code directly.
* Functions removed that were only used for sequencer plugin API:
IMB_anim_nextpic, IMB_clever_double, IMB_antialias, IMB_gamwarp,
IMB_scalefieldImBuf, IMB_scalefastfieldImBuf, IMB_onethird, IMB_halflace,
IMB_dit0, IMB_dit2, IMB_cspace
* Write metadata info into OpenEXR images. Can be viewed with the command
line utility 'exrheader'
For the image tile cache code, see this page:
http://wiki.blender.org/index.php/Dev:2.5/Source/Imaging/ImageTileCache
|
|
because the mipmap was not being refreshed. Also this will be problematic
to support when I add tile/mipmap cache, so would not rather not try to.
Can be added back afterwards if someone wants to make it work.
|
|
|
|
Patch by Alfredo de Greef with high quality image texture filters.
This adds 3 new filters:
* SAT: Summed Area Tables. This is like mipmaps, but using somewhat
more memory avoids some artifacts.
* EWA: Ellipitical Weighted Average, anisotropic filter.
* FELINE: Fast elliptical lines for anisotropic texture mapping.
The one change I made to this was to try to fix an alpha/premul
problem, hopefully I didn't break anything, it looks compatible
with the existing filter now for me.
|
|
blocks that were previously missed; and b) greatly increase my
ohloh stats!
|
|
gave black borders.
|
|
that are not being baked (useful for multiple objects)
* Added support for baking alpha, as well as extending alpha margins.
|
|
value that is an offset along the normal when looking for the nearest
face, which allows baking faces further away, e.g. an ID badge onto a
shirt.
Also fixes a bug baking to float images, for things other than
displacement it didn't work sometimes, and a memory leak in the
extend filter.
|
|
|
|
This is an extension on the work Brecht already did to implement normal map baking. I've updated the release notes page here with info and pics:
http://www.blender.org/development/current-projects/changes-since-244/render-baking/
|
|
Please read:
http://www.blender3d.org/cms/Imaging.834.0.html
Or in short:
- adding MultiLayer Image support
- recoded entire Image API
- better integration of movie/sequence Images
Was a whole load of work... went down for a week to do this. So, will need
a lot of testing! Will be in irc all evening.
|
|
Here's the full release log with example file.
http://www.blender3d.org/cms/Render_Baking.827.0.html
For people who don't read docs; just press ALT+CTRL+B on a Mesh
with texture faces!
Todos:
- maybe some filter options extra?
- Make normal maps in Tangent space
|
|
The code that generated mipmaps took a real long time to do it... on a
5k x 5k image it took here (no optim, debug compile) 32.5 sec.
Recoded the very old filtering routine, which already brought it down to
2.8 seconds. Then tested if we even need this filtering... in many cases
the images are painted or photographs, which is filtered OK already.
Without the filter, the mipmap timing went down to 0.39 second. :)
http://www.blender.org/bf/filters/index1.html
Here's an example of two 'mips' generated with or without gauss filter.
Note that aliasing in an image remains there... which can be a wanted
effect anyway.
So; added the gauss filter as option in making mipmaps. Also had to
reshuffle the buttons there in a more logical manner.
There's also disabled code in the do_versions to set 'gauss' on in older
files. Will be enabled during release time.
|
|
- 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.
|
|
- 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)
|
|
Credits go to Gernot Ziegler, who originally coded EXR support, and to
Austin Benesh for bringing it further. Kent Mein provided a lot of code
for integrating float buffers in Blender imbuf and ImBuf API cleanup,
and provided Make and Scons and static linking.
At this moment; the EXR libraries are a *dependency*, so you cannot get
the Orange branch compiled without having OpenEXR installed. Get the
(precompiled or sources) stuff from www.openexr.com. Current default is
that the headers and lib resides in /user/local/
Several changes/additions/fixes were added:
- EXR code only supported 'half' format (16 bits per channel). I've added
float writing, but for reading it I need tomorrow. :)
- Quite some clumsy copying of data happened in EXR code.
- cleaned up the api calls already a bit, preparing for more advanced
support
- Zbuffers were saved 16 bits, now 32 bits
- automatic adding of .exr extensions went wrong
Imbuf:
- added proper imbuf->flags and imbuf->mall support for float buffers, it
was created for *each* imbuf. :)
- found bugs for float buffers in scaling and flipping. Code there will
need more checks still
- imbuf also needs to be verified to behave properly when no 32 bits
rect exists (for saving for example)
TODO:
- support internal float images for textures, backbuf, AO probes, and
display in Image window
Hope this commit won't screwup syncing with bf-blender... :/
|
|
I just fixed indentation (replaced spaces with tabs where needed) and removed
#include config.h stuff from the above files.
Kent
|
|
8192 pixels.
I dont have a lot of mem here though, so others should test too!
|