Commit Graph

122 Commits

Author SHA1 Message Date
b3c238e8bc 2.5: merge with trunk, previous merge was only up to yesterday.
svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r17416:HEAD
2008-11-12 22:03:11 +00:00
2a331067cc resolve some compiler warnings with intel c/c++ compiler
* subsurf code had a lot of unused variables, removed these where they are obviously not needed. commented if they could be useful later.
* some variables declorations hide existing variables (many of these left), but fixed some that could cause confusion.
* removed unused vars
* obscure python memory leak with colorband.
* make_sample_tables had a loop running wasnt used.
* if 0'd functions in arithb.c that are not used yet.
* made many functions static
2008-09-29 17:08:11 +00:00
415868b5e2 Fix for gcc compiler warning about a call to do_lamp_tex() resulting in "overflow in implicit constant conversion" 2008-09-20 09:17:40 +00:00
65ddef19b9 Patch #13422, By Roland Hess, Shadow Color
Finally, after a long time new render candy for the non-game peoples! :)

Good doc is here: (url splits in two)
http://www.harkyman.com/2008/08/06/controllable-shadow-intensity-
and-color/

Note the colorpicker for shadow is in "Shadow and Spot" panel. A bit
hidden, could get more attention. For later. :)
2008-09-19 16:01:22 +00:00
1b00877051 Fix for bug #12077: tangent shading (which only affects specular) made
bump mapping not work for diffuse.
2008-05-22 15:30:35 +00:00
5cf41da316 Fix for bug #12334: the Disable Tex option didn't disable
textures for the Texface material option.
2008-05-22 13:46:05 +00:00
981d380fc4 This is an expanded patch of this:
[#8067] external texture plugin thread-safe modifications
Submitted By: David Anderson (davywavy)

It makes it so the "result" array is passed in, instead of a global var.
I expanded the patch so it will play nice with older plugins  that are not
thread safe as well.

I also updated the existing plugins in the release, so they are thread safe.

---------------  What do people think of this.... ------------------
This should maybe be talked about in the functionality board or something,
but what do people think of adding in default texture/sequence plugins.
or making a seperate tree like lib for plugins.

The reason I ask is we have had a couple of upgrades to the plugin system.
(supporting float buffers for sequencer, and this one for textures)

http://www.cs.umn.edu/~mein/blender/plugins does not store revisions of 
plugins I just make sure they work with the latest version.  This is
getting messy.  I haven't upgraded a lot of them to use floats (I know,
I'm lazy, and now this will also make modifications to the plugins)
It would be nice to have some of the standard ones under revision control.

We also seem to be having an explosion of platforms supported.  It would
be nice to have platform maintainers compiling plugins as well for releases.
(Its getting to be more work for me to keep up with things...)

I'll go back to my corner now and be quite. ;)

Kent
2008-04-18 19:10:03 +00:00
f8d1bc8ee7 Fix for bug #8463: object texture mapping for duplis was changed to
act as if the object was in its original position, instead of being
different for all instances. However, this is desired behavior in
some cases and so breaks compatibility. Now it only does the new
behavior when enabling the "From Original" option.
2008-04-12 18:44:03 +00:00
b04c58c81a Bugfix: image texture with texface would not render sometimes, wasn't
setting image user correct. Also found that this texface rendering was
not threadsafe for > 2 threads.
2008-03-17 12:27:17 +00:00
5b3dc15880 Normal map tangents are now not always averaged at vertices anymore,
but only when the UV's are connected. That fixes some artifacts when
baking and using tangent space normal maps. It does mean increased
memory usage because it now stores 4 tangents per face like UV's,
and increased processing time, but there's no simple way around that.
2008-03-07 15:38:56 +00:00
b26a767923 Bugfix: displacement with object texture mapping could crash. 2008-03-03 18:53:06 +00:00
0e233b3213 =Reversion of premul bugfix=
Reversion of premul bugfix, as it was apparently not
working all that well.

Note that this brings back the bug where the erase alpha
paint tool won't display correctly, since the UV image
editor just draws images in key alpha now.
2008-02-22 22:23:58 +00:00
d7088ce825 Bugfix: objects in groups with texture mapping Object now get texture
coordinates from the object as if they were in their original position,
untransformed by dupligroups or dupliverts. Otherwise the textures of
such objects would change depending on their position.
2008-02-22 13:21:42 +00:00
ccac67d3ea Further work on the premul option for ton. This option
(which basically tells the renderer and compositor to expect a
key image) is now done at the image user level.

This does have some caveats, as image users don't always work
the way I thought they would/should (for example, the same image user
structure is apparently used in the uv image editor for all images,
which is kindof odd).

The UV image editor also now smartly detects if the premul option is
set and draws the image using key alpha, instead of premul

The subversion level was upped to convert the old premul flag, which was at
the image level, to the new one, which is at the image user level.
2008-02-18 23:50:12 +00:00
0fe6abbfa3 texture forcefields had a bug where uninitialized values could be used.
do_texture_effector assumed multitex_ext would assign r/g/b colors which isnt true for grey textures.
Fallback to PFIELD_TEX_GRAD with grey textures, node this in tooltip also.
2008-02-17 23:53:48 +00:00
ac5d28a13c Added another 2 checks for if an image has the premul flag set, 1 in the image
compositor node, another in render_realtime_texture.  Note that multilayer images 
in the image compositor node do not respect the premul flag (though I did write 
commented out code for it).

As far as I can tell, the premul option never worked for multilayer images in the
image node, so I'm a little nervous about making it work properly there.

ton, any comments?
2008-02-14 13:36:59 +00:00
139b612b09 The "premul" option for images had a very bad implementation. It
basically flagged the image so that on next load/reload, the image
data would be converted to premul.  This was very confusing to the
user, as it meant premul wouldn't take effect will the image was
reloaded, and it would also change the image data, which the user
might've been painting.

To fix this, I've removed this behaviour and instead made the premul
option apply at render time.  During render while evaluating an image
texture, if the image has the premul flag set then the premul operation
is done on the texture result data, thus not touching the image data
at all.

Also, I've made premul be turned on by default.
2008-02-14 12:19:37 +00:00
ec04c09365 Fix for error in approximate AO in last commit, made it really slow.
Also, duplis are now taking into account, the proper way to exclude
them is to set the material to be not traceable.

Removed an unnecessary pointer from the VlakRen struct to save some
memory, not really that significant, but still, saves 70 mb for 10
million faces.
2008-01-21 23:17:19 +00:00
8cdfe865ec Approximate Ambient Occlusion
=============================

A new approximate ambient occlusion method has been added, next to the
existing one based on raytracing. This method is specifically targetted
at use in animations, since it is inherently noise free, and so will
not flicker across frames.

http://www.blender.org/development/current-projects/changes-since-244/approximate-ambient-occlusion/
http://peach.blender.org/index.php/approximate-ambient-occlusion/

Further improvements are still needed, but it can be tested already. There
are still a number of known issues:

- Bias errors on backfaces.
- For performance, instanced object do not occlude currently.
- Sky textures don't work well, the derivatives for texture evaluation
  are not correct.
- Multiple passes do not work entirely correct (they are not accurate
  to begin with, but could be better).
2008-01-17 19:27:16 +00:00
cd02005fe4 Adding the colorband Hue, Saturation, Value, Color blending modes
to the Material Texture blending as well.
2008-01-10 11:26:17 +00:00
ead7a33247 Misc Render Features
====================

- "From Dupli" option for orco and uv texture coordinates. For dupliverts,
  duplifaces and dupli particles, this uses the orco and uv at the point
  on the parent surface. Can for example be used for texturing feathers
  and leafs. Note that uv only works for duplifaces and particles emitted
  from faces, these are not defined at vertices.

- "Width Fade" option for strand render, to fade out along the width of the
  strand. Committing this so it can be tested, might be changed or removed
  even, if it doesn't give nice results.
2008-01-09 14:40:25 +00:00
6a5ce69a16 Error in previous commit: the texture filter size should not be scaled
at all if you use new 'minimal' option. The new option works much nicer
if it only sets the minimum. (use texture with 'refl' map)

Added option to env map too!
2007-12-28 19:38:47 +00:00
460dd7a7bb Render Instancing
=================

Big commit, but little user visible changes.

- Dupliverts and duplifaces are now rendered as instances, instead
  of storing all of the geometry for each dupli, now an instance is
  created with a matrix transform refering to the source object.
  This should allow us to render tree leaves more memory efficient.

- Radiosity and to some degree raytracing of such objects is not
  really efficient still. For radiosity this is fundamentally hard
  to solve, but raytracing an octree could be created for each object,
  but the current octree code with it's fixed size doesn't allow this
  efficiently.

- The regression tests survived, but with I expect that some bugs will
  pop up .. hopefully not too many :).

Implementation Notes
====================

- Dupligroups and linked meshes are not rendered as instances yet,
  since they can in fact be different due to various reasons,
  instancing of these types of duplis that are the same can be added
  for them at a later point.

- Each ObjectRen now stores it's own database, instead of there being
  one big databases of faces, verts, .. . Which objects that are actually
  rendered are defined by the list of ObjectRenInstances, which all refer
  to an ObjectRen.

- Homogeneous coordinatess and clipping is now not stored in vertices
  anymore, but instead computed on the fly. This couldn't work for
  instances. That does mean some extra computation has to be done, but
  memory lookups can be slow too, and this saves some memory. Overall
  I didn't find a significant speed impact.

- OSA rendering for solid and ztransp now is different. Instead of e.g.
  going 8 times over the databases times and rendering the z-buffer, it
  now goes over the database once and renders each polygon 8 times. That
  was necessary to keep instances efficient, and can also give some
  performance improvement without instances.

- There was already instancing support in the yafray export code, now it
  uses Blender's render instances for export.

- UV and color layer storage in the render was a bit messy before, now
  should be easier to understand.

- convertblender.c was reorganized somewhat. Regular render, speedvector
  and baking now use a single function to create the database, previously
  there was code duplicated for it.

- Some of these changes were done with future multithreading of scene
  and shadow buffer creation in mind, though especially for scene creation
  much work remains to be done to make it threadsafe, since it also involves
  a lot of code from blenkernel, and there is an ugly conflict with the way
  dupli groups work here .. though in the render code itself it's almost there.
2007-12-15 20:41:45 +00:00
0412d62309 Blending mode "Overlay" was not coded yet for material blending. 2007-12-03 16:06:34 +00:00
561319989e Render Baking
=============

A new "Selected to Active" option in the Bake panel, to (typically) bake
a high poly object onto a low poly object. Code based on patch #7339 by
Frank Richter (Crystal Space developer), thanks!.

Normal Mapping
==============

Camera, World, Object and Tangent space is now supported for baking, and
for material textures. The "NMap TS" setting is replaced with a dropdown
of the four choices in the image texture buttons.


http://www.blender.org/development/current-projects/changes-since-244/render-baking/
2007-11-28 22:21:12 +00:00
7da56f4a9b Particles
=========

Merge of the famous particle patch by Janne Karhu, a full rewrite
of the Blender particle system. This includes:

- Emitter, Hair and Reactor particle types.
- Newtonian, Keyed and Boids physics.
- Various particle visualisation and rendering types.
- Vertex group and texture control for various properties.
- Interpolated child particles from parents.
- Hair editing with combing, growing, cutting, .. .
- Explode modifier.
- Harmonic, Magnetic fields, and multiple falloff types.

.. and lots of other things, some more info is here:

http://wiki.blender.org/index.php/BlenderDev/Particles_Rewrite
http://wiki.blender.org/index.php/BlenderDev/Particles_Rewrite_Doc

The new particle system cannot be backwards compatible. Old particle
systems are being converted to the new system, but will require
tweaking to get them looking the same as before.

Point Cache
===========

The new system to replace manual baking, based on automatic caching
on disk. This is currently used by softbodies and the particle system.

See the Cache API section on:
http://wiki.blender.org/index.php/BlenderDev/PhysicsSprint

Documentation
=============

These new features still need good docs for the release logs, help
for this is appreciated.
2007-11-26 22:09:57 +00:00
d273ae0571 * New material option: TexFace Alpha
This is an additional option for 'TexFace', which uses the alpha of 
the UV assigned faces as well as the colour. It appears in material 
buttons as a little 'A' button next to 'TexFace', when 'TexFace is 
switched on. It's a bit horrible, but no point tweaking that layout in 
isolation at this stage.

This image is using texface alpha, with different assigned images, all 
sharing the one material:
http://mke3.net/blender/devel/rendering/texface_alpha.jpg

Usually I consider texface (and teaching people to use it for UV 
mapping) to be pretty evil, but in some cases, when you have lots of 
separate images that you want to control in the one material, it can 
be quite handy.
2007-11-15 00:11:00 +00:00
672a66905b Patch/Bugfix #7334 by 'gsr b3d:
Some more compiler warning fixes. Some of these seem to be specific to GCC 4.1
2007-09-17 06:11:06 +00:00
6e0d977977 Use texture constants in the interface and added some missing texture constants. 2007-07-19 22:02:22 +00:00
b22a6da7b8 initalize texvec[2] even though its not used, imagewrap checks to make sure its
in a given range.

Kent
2007-06-05 19:39:19 +00:00
afdd54fa37 moved source and text to american spelling
* colour -> color
* centre -> center
* normalise -> normalize
* modelling -> modeling
2007-04-04 13:18:41 +00:00
e04f5bda31 Bugfix #5962
New Image texture option for "Repeat Mirror" didnt work when the texture
"Map input" had a translation.
2007-02-09 10:35:04 +00:00
4bd42ca280 Bugfix #5912
Bugfix #5912

Fix for Angmap and Spheremap (sky render).

This is a rewind of bugfix #4999 (sept 18). That bug appeared to be a
user error... the option "real" for sky had to be set.
2007-02-04 17:11:18 +00:00
bd0f9a59f0 Important bugfix: Image mapping "repeat" didn't support mirrored tiling
yet: http://www.blender.org/bf/rep1.jpg

Psst psst... to solve this bug I had to add the buttons for the option too!
2007-01-14 11:51:52 +00:00
e61dec0767 Defocus Composite Node, by Alfredo de Greef
Log:
http://www.blender3d.org/cms/Composite__Defocus.836.0.html

An incredible quality composite effect, might be slow but worth waiting
for!
2006-12-21 18:11:07 +00:00
47bc3d1208 Added names to UV and vertex color layers, and display them as a list.
Added support for multiple UVs in the render engine. This also involved
changing the way faces are stored, to allow data to be added optionally
per 256 faces, same as the existing system for vertices.

A UV layer can be specified in the Map Input panel and the Geometry node
by name. Leaving this field blank will default to the active UV layer.

Also added sharing of face selection and hiding between UV layers, and at
the same time improved syncing with editmode selection and hiding.

Still to do:
- Multi UV support for fastshade.
- Multires and NMesh preservation of multiple UV sets.
2006-12-21 13:47:27 +00:00
253432bfc7 The Big Image refactor!
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.
2006-12-20 17:57:56 +00:00
40c77590f9 Small plumiferos wishlist item.
Adds a button next to the threads button to disable texture processing
in a render.  If anyone doesn't like the button feel free to revert this
one, its pretty simple.

Kent
2006-12-07 16:48:15 +00:00
3177c4f69f Next stage of RenderPipe refactor: now everything within the pixel was
tackled.

Resulting features:
- render passes
- new pass: Object Index, for masking
- sub-sample alpha masks

Docs:
http://mediawiki.blender.org/index.php/BlenderDev/RenderPipeline
http://www.blender3d.org/cms/Render_Passes.829.0.html
http://www.blender3d.org/cms/New_Render_features.774.0.html

Note that these changes might mean things to not render fully identical...
For the next days a lot of testing is needed!
2006-12-05 16:43:01 +00:00
20ac94e8f0 Two hours of fixing details based on Klocwork source review. Useful report,
although it has a lot of noise. Not to mention our bad string code gives
a load of warnings.

I've reviewed specifically:
- file reading/write
- dna and library code
- node system
- entire render module

Done a couple of files in src/ too, seemed to be nice errors.
2006-12-01 19:52:04 +00:00
8e7e7e209a Bugfix #4999 part 2
Sky texture mapping option "Sphere" or "Tube" map now correctly maps to
world space as well, so a camera orientation or mirroring works fine.
2006-09-18 12:53:52 +00:00
b50a32ce9d Bugfix #4999
The Sky render option "Ang Map", which should support spherical probes,
was always in local camera view space, instead of world space.

Check this report, it has cool images!
http://projects.blender.org/tracker/index.php?func=detail&aid=4999&group_id=9&atid=125
2006-09-17 15:28:32 +00:00
6f47e5fa84 New stuff!
- Tangent vectors now can also be derived from orcos (No UV needed)
- Normalmaps now properly support tangent space as well
  (Patch provided by Alfredo de Greef)

Full log is here:
http://www.blender3d.org/cms/New_Render_features.774.0.html
2006-09-05 13:28:59 +00:00
433f6c7043 Integration of the Google Summer of Code Modifier Stack Upgrade project. The
main features are:
* Modifiers can now be in any order in the modifier stack
* DerivedMesh now has a standard framework for custom element data to be passed
  through the stack with mesh data (being copied and interpolated as
  appropriate), so modifiers can access whatever data they need
* The modifier stack code has been refactored and a number of bugs have been
  removed
* The EdgeSplit modifier has been added:
  http://mediawiki.blender.org/index.php/BlenderDev/EdgeSplitModifier
* The DerivedMesh modifier has been added:
  http://mediawiki.blender.org/index.php/BlenderDev/DisplaceModifier
* The UVProject modifier has been added:
  http://mediawiki.blender.org/index.php/BlenderDev/UVProjectModifier

For more info, see:
http://mediawiki.blender.org/index.php/User:Artificer/ModifierStackUpgrade
(currently undergoing reorganisation)
2006-08-28 01:12:36 +00:00
8cd491750e Bugfix #4830
Preview render in 3d window: when window type changes (like 3d window to
UV window), and you change the window size, and restore to 3d view, the
rendered preview had to be re-initialized.

texture.c: a return was added without value.
2006-08-09 10:49:52 +00:00
e168d67b32 ImagePaint Refactoring:
- ImagePaint now uses ImBuf directly, and the rect blending functions
  were moved into the imbuf module.
- The brush spacing, timing and sampling was abstracted into brush.c, for
  later reuse in other paint modes.

Float ImagePaint support.

Textured Brushes:
- Only the first texture channel is used now.
- Options for size and offset should be added, but need to find some space
  in the panel, or add a second one ..
2006-07-31 15:53:03 +00:00
7692b9f21f Bugfix #4687
Repeat Image texture was broken... the repeat value for Y was accidentally
multiplied twice, typo... had to change a 1 into 2 :)

Error introduced in 2.41 btw, 2.40 and older were OK.
2006-07-13 15:41:36 +00:00
7b07fcca91 Bugfix #4564
Environment mapping on channel "Mirror color" didn't support stencilling.
2006-07-02 10:42:29 +00:00
0cbb917e60 Bugfix #4558
Thread render error: a flag was stored in read-only data to indicate
whether top or bottom hemisphere of sky was rendered. That can't work
with tiles (but did work when scanlines were threads).
2006-07-02 07:59:42 +00:00
fa8c779c2d Displacement didn't react correct for stencilling. Our confusing system
has both geometry-normal displace as texture-normal displace. The first
didn't get stencilled.
2006-06-25 16:54:06 +00:00