Commit Graph

635 Commits

Author SHA1 Message Date
a9cd5b808c = Multires =
Fixed bug #5756, Rendering artifacts when MRM is not set to maximum

Several changes were made:
* Added function multires_level_n to get the nth level from a multires mesh
* Removed the changes I made some time ago to init_render_mesh for multires meshes. Previously it was making a full copy of the mesh object in order to be able to apply deformations to the Pin level and propagate them to the Render level.
* Added two functions to DerivedMesh.c, multires_render_pin and multires_render_final. These two functions work together in the mesh_create_derived_*_render functions to apply all modifiers to the Pin level, then create the DerivedMesh from the Render level, and lastly restore the mesh to its original (undeformed) state.
* Added a check in multires_del_lower and multires_del_higher to ensure that level indices are properly clipped to the actual range of available levels.
2007-01-21 23:46:00 +00:00
f7708a2692 bugfix #5545
Bake Render now works for dupli-verted lamps.
Note, shift+z shaded view too!
2007-01-10 21:09:42 +00:00
fb17663988 Bugfix #5548
New option to use "Tangent Space normalmap" normals now works for node
materials.
2007-01-08 20:53:43 +00:00
bef18061ec Select Grouped editdata- minor fix in the menu.
Updated Python Mesh API to support UV and Color layers with names.
Similar to vertex group's

renamed a function in customdata.c CustomData_free_layers -> CustomData_free_layers_active and made CustomData_free_layers accept an index, this is needed so python could free layers that arnt active.
2006-12-23 17:07:02 +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
5ffa4dd55a Warning fixes for previous Image commit, also fixed verse_image.c 2006-12-20 18:29:23 +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
80ee52e444 Multiple UV and vertex color layers: (still work in progress)
These can be created and deleted in the Mesh panel in the same place as
before. There is always one active UV and vertex color layer, that is
edited and displayed.

Important things to do:
- Render engine, material support
- Multires and NMesh now lose non active layers

Also CustomData changes to support muliple layers of the same type, and
changes to layer allocation, updated documentation is here:
http://mediawiki.blender.org/index.php/BlenderDev/BlenderArchitecture/CustomData
2006-12-12 21:29:09 +00:00
12c0fb9312 Bugfix: Object "restrict render" option was missing in vectorblur
Plumiferos request: Made individual duplicated group objects still check on
the restriction flag, *after* the group-duplicator itself was checked for.
So it works both. (Matt; was urgent feature, hope you're OK? These options
showed in outliner for groups anyway :).
2006-12-12 16:47:18 +00:00
2edcd75f9c Crash fix in adding lightgroups: previewrender.c sets ob->data to NULl for
a lamp it uses for preview... something I never thought of could get
rendered!
2006-12-08 22:00:44 +00:00
4cdf96ae19 Lightgroups!
Functionality was a bit limited still; now added the option to bind
a group of Lamps entirely to a Material, excluding them from any other
Material. Note that Lamp visibility layer options still work as for
Lamps usually.

In preview.blend: made a lightgroup for all lamps, and set them to be
the "RenderLayer override". That way it will ignore local material
lightgroups for previews.
2006-12-08 18:37:55 +00:00
902a69a7d3 Numerous fixes in Render code:
- Bug: material emit was ignored (showed in preview render backdrop)
- Bug: world exposure was ignored
- Bug: lamp halo was ignoring 'render layer light override'.

Further reshuffled the way shadows are being pre-calculated, this to enable
more advanced (and faster) usage of Material lightgroups. Now shadows are
being cached in lamps, using a per-sample counter to check if a recalc is
needed. Will also work (later) for Raytracing node shaders.

- New: Material LightGroup option "Always", which always shades the lights
  in the group, independent of visibility layer. (so it allows to move such
  lights to hidden layer, not influencing anything).
2006-12-08 09:40:44 +00:00
17231f83f3 Work on RenderLayer and Pass control:
Full log:
http://www.blender3d.org/cms/Render_Passes.829.0.html

In short:
- Passes now have option to be excluded from "Combined".
- RenderLayers allow to override Light (Lamp groups) or Material.
- RenderLayers and Passes are in Outliner now, (ab)using Matt's nice
  'restriction collumns'. :)
2006-12-07 14:17:38 +00:00
4f8079d49c Modifier Stack: Limit calculation to required data.
This commit upgrades the modifier stack to only calculate the data which is
needed, either by modifiers further down the stack or by other functions at
the end of the stack (e.g. drawing functions).

This speeds up modifier stack recalculation, especially where vertex
groups and UV coordinates are concerned. For example, a mesh with an Armature
modifier followed by a Subsurf modifier would previously have required the
Subsurf modifier to interpolate all the vertex groups in the mesh, slowing
down modifier calculations considerably. With this update, vertex group data
is not propagated beyond the Armature modifier, so calculations are faster.

Note that this depends on the order of modifiers in the stack. If the Armature
and Subsurf modifiers were swapped in the above example, the Subsurf modifier
would have to interpolate vertex groups, as they are needed by the Armature
modifier.
2006-12-05 17:42:03 +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
b4b6dd2654 Simplified/fixed code for rendering with multires+modifiers, no more unfree memory warnings 2006-12-01 21:35:27 +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
6543d3e220 Render Monster support: (part 1)
Removed all limitations from render code for maximum threads. The only
define for this now is in BLI_threads.h, and currently set to 8.
Note that each thread renders an entire tile, and also allocates the
buffers for the tiles, so; more threads might work better with smaller
tiles.

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

What does work (should work :) is AO and soft shadow now.
2006-11-29 17:01:09 +00:00
c57d5bca73 Step one in migrating to use glArray calls in Blender
- Curve/Nurbs/Font/MBall now all draw arrays.
- had to flip abgr to rgba in shaded drawing
- Mesh drawing can't be easily done; the indices for faces are not in
  in one chunk. Also need a way to gether trias/quads, per material.

Speedup results are mixed. Something between 2-4 times. Especially for
text it seems to help.
2006-11-20 21:25:02 +00:00
5428f2eb6c * Object level restrictions in outliner
This adds the ability to restrict an individual object from:
- being visible in the 3D View
- being selectable in the 3D View
- being renderable
with 3 columns of buttons in the outliner.

These restrictions are further down the hierarchy than layers, so for example if an object is in an invisible layer, it will be invisible regardless of whether the object's own visibility setting is on or off. This works on a different conceptual level than layers, being better for more quick interaction (like temporarily making a mesh unselectable while you're posing its armature), rather than so much for scene organisation.

The 3 columns of icons can be turned off in the Outliner View menu.

Along with this is some small cleaning up in interface_icons.c and outliner.c.
2006-11-20 05:12:58 +00:00
e435fbc3c5 Added custom vertex/edge/face data for meshes:
All data layers, including MVert/MEdge/MFace, are now managed as custom
data layers. The pointers like Mesh.mvert, Mesh.dvert or Mesh.mcol are
still used of course, but allocating, copying or freeing these arrays
should be done through the CustomData API.

Work in progress documentation on this is here:
http://mediawiki.blender.org/index.php/BlenderDev/BlenderArchitecture/CustomData


Replaced TFace by MTFace:

This is the same struct, except that it does not contain color, that now
always stays separated in MCol. This was not a good design decision to
begin with, and it is needed for adding multiple color layers later. Note
that this does mean older Blender versions will not be able to read UV
coordinates from the next release, due to an SDNA limitation.


Removed DispListMesh:

This now fully replaced by DerivedMesh. To provide access to arrays of
vertices, edges and faces, like DispListMesh does. The semantics of the
DerivedMesh.getVertArray() and similar functions were changed to return
a pointer to an array if one exists, or otherwise allocate a temporary
one. On releasing the DerivedMesh, this temporary array will be removed
automatically.


Removed ssDM and meshDM DerivedMesh backends:

The ssDM backend was for DispListMesh, so that became obsolete automatically.
The meshDM backend was replaced by the custom data backend, that now figures
out which layers need to be modified, and only duplicates those.


This changes code in many places, and overall removes 2514 lines of code.
So, there's a good chance this might break some stuff, although I've been
testing it for a few days now. The good news is, adding multiple color and
uv layers should now become easy.
2006-11-20 04:28:02 +00:00
4ebf5223ba Render Baking:
- Bugfix: vertex normals were still flipped around, to match viewpoint
  rendering.
- New: option to bake a texture+material only
2006-11-19 18:44:54 +00:00
c47fa4d0ec Long waited feature: Render Baking
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
2006-11-19 14:12:56 +00:00
206f2cab67 Group duplicator fix: the invisible group objects didn't draw, but were
still visible in render.
2006-11-15 08:20:53 +00:00
a56b95c049 Bugfix #5107
Autosmooth didn't copy additional texture coordinates such as sticky
correctly. This was part of the vertex struct in 2.41 and older, but it
became dynamic in 2.42.
2006-11-12 11:41:43 +00:00
8e97a2955b Merged Google Summer of Code sculptmode/multires/retopo tools.
From the tracker:
https://projects.blender.org/tracker/index.php?func=detail&aid=5018&group_id=9&atid=127
2006-11-06 01:08:26 +00:00
Nathan Letwory
88446eeca4 Patch 5105 by Joshua Leung (Aligorith), slightly modified by me
* Add WITH_BF_YAFRAY, which per default is 'true', so no visible changes for developers (and users).

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

- this commit also has a few whitespace changes and
- made BF_NO_ELBEEM a proper BoolOption. This will be renamed to WITH_BF_ELBEEM in the near future...
2006-10-18 05:45:47 +00:00
9fa438b4e9 Another shadowbuffer goodie: the "Halfway trick"
http://www.blender3d.org/cms/Shadow_buffer__Halfway.786.0.html

Simply said: by using the average of the nearest and 2nd nearest Z value
in Shadowbuffers you can reduce bias errors very well.
For backwards compatibility it is a new buffer type though.
2006-10-15 11:50:46 +00:00
05ee7d9053 =translate hoek to angle=
renamed the dutch variable hoek to angle globally arithb.c changes done by Matt Plough
2006-10-14 23:27:18 +00:00
e868f223dc New shadow feature: Irregular Shadow Buffers
Full log:
http://www.blender3d.org/cms/Irregular_Shadow_Buffe.785.0.html

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

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

For the CVS log record; it is based on articles:
Gregory Johnson et al, University of Texas, Austin. (Regular grid method).
Timo Aila and Samuli Laine, Helsinki University of Technology. (BSP method).
2006-10-14 10:21:19 +00:00
c54e20a86a Fix for new orco-tangent render option: then also 'orco' texture
coordinates should be calculated... it wouldn't work unless you assign
a texture to a Material using 'orco' map.
2006-09-06 17:32:53 +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
32c51f3338 Render feature request:
Auto-clip Lamp Buffer

Setting a good range for clipping start/end for Lamp buffers is important
for good quality shadow (depth details). That can be quite a hassle, when
many lamps or animated objects are involved.

This option allows to have the clipping range calculated based on the
visible vertices in the spotbundle. For clip start and clip end it can
be set individually. Typically the clip start defines quality most.

The shadow buffer 'bias' value is corrected for this automatic clipping
too, to ensure that ranges that differ give same biasing appearance.
(If this wasn't done, you would see lighted areas become darker or
lighter, or even artefacts, when the range changes suddenly

NOTE: since it only checks for vertices, be aware that large planes can
give errors.

Implementation note: zbuffer values are non-linear (1/z) because that
allows linear interpolation while filling scanlines. That's the main
reason for the precision to be highest close to the eye (or lamp).
It's even a useful feature, since you want details to be precise
when they're closeby.
Since these values are also in the -1 to 1 range, using floats here
wouldn't solve problems a lot. Maybe trying a 64 bits Z once might
be an interesting coding job.
2006-08-31 10:36:45 +00:00
a7b3203e31 New Particle option for Fluids did not work on rendering animation yet.
N_T: the implementation of this feature isn't 100% nice, it currently does
a full recalc on each redraw, and it doesn't work properly unless it is
recalculated for each frame.
2006-07-14 13:44:23 +00:00
a3e49a23d7 Hurmf, the previous commit to solve proper 3D preview re-renders broke how
buttons preview work. :)

The initialize of the variable should be in the initialize code, not in the
freeing code, tsk tsk!
2006-06-28 14:14:52 +00:00
9ecffb4314 Campbell report:
Not clearing the value for 'parts rendered' caused 3d previewrender to
sometimes fail doing updates (when an escape happens during converting
render data).
2006-06-28 12:53:57 +00:00
c93176260a Bugfix #4446
Wire render crashes in Linux (only!), but why? Using a calloc instead of
malloc fixes it, but that doesn't solve the real issue in the code.

I can only imagine that bsearch() in linux has a completely different
implementation...

Anyhoo; let's commit the calloc, at least then we got stable wire render!
2006-06-27 13:13:49 +00:00
2670797e8a Plumiferos report:
The new Material "LightGroups" only worked with lamps in visible layers.
Now also lamps from the group that are not visible are included for
rendering, ensuring that a lightgroup always works on that material,
disregarding layer settings (unless lamp is type 'layer lamp').
2006-06-26 17:50:48 +00:00
d6e7eb27ed == Frameserver ==
Set SO_REUSEADDR on server-socket, since otherwise, frameserver will barf on
second start.
2006-06-26 13:22:55 +00:00
dbc7dbb2b9 Bugfix #4457
When faces (like in cubes) have exactly 90 degrees angles with other
faces, the check for a vertex-normal flip became random, caused by the
infamous bad floating point resolution.
Solved with including FLT_EPSILON in the check.

Also: minor optimize for readability and removed dutch function name
(contrpuntnorm -> check_vnormal)
2006-06-26 13:19:04 +00:00
a966a72cd6 Many buttons assumed G.vd existed. found all? buttons that cheashed Blender and made them test for G.vd 2006-06-25 13:58:42 +00:00
985db6c4ef Bugfix #4367
Creating texture coordinates for Curve bevels didn't allocate a correct
sized memory block when both U and V directions of a bevel are circular.

This will also fix "UV orco" for such curves (like donut shapes).
2006-06-21 10:02:47 +00:00
f7d38ee181 Bugfix #4370
Silly: when using vector blur on a curve or text object, without having a
material assigned to it, the default material didn't get initialized OK
for vector blur, causing random streaks.
2006-06-20 15:44:25 +00:00
bbc6468b34 Restored the pretty lousy but still popular stars render in blender.
Hope our sky guru can come with something cooler for next release!
2006-06-13 20:00:14 +00:00
7c8008da58 Bugfix 4312
Preview render in 3d window could crash when a re-render was invoked before
the render was initialized even, reading a NULL pointer for scene.
Happened on frantic & quick editing.
2006-06-11 10:13:00 +00:00
908389b787 Bugfix #4293
And more particle issues... the attempts to allow particle systems to be
part of duplicators (groups especially) isn't easy to get working!
This commit solves regular animated particle systems... they rendered on
the wrong location, using wrong object transform.
2006-06-09 11:15:52 +00:00
6f0d7e8d1f bugfix #4072 added support for strandmapping, done by exporting the
strand texcoords as orco coords, so yafray doesn't have to be adapted for this.
bugfix #4254 added support for dupligroups, but might not work completely
correct yet at this point, more testing needed.

Also added some missing parts from the code apparently removed at some time.
Mainly having to do with dupliverts, cam.info for aspect ratio/ortho mode/etc.
Header stats (render window) should now work again too.
Fixed missing last tile draw of render window.
Added the missing const_cast in the win32 part of the xml export code.
2006-06-05 02:24:12 +00:00
86af9a0065 Fix #4269
Using displacement mapping caused VectorBlur (speed vectors) to go haywire.
2006-06-04 17:22:19 +00:00
2e901061d9 More render pipeline finishing up;
- Shaded drawmode is back (shift+z).
  Note it still only uses orco texture; but lighting/shading is using
  the internal render module entirely.

- "Make Sticky" option back.
  (Also fix in sticky texture render, was wrong scaled)
2006-05-28 11:49:22 +00:00
4043934d2c Brought back the option "remove all used texture images". It was
committed to be default, but should react to the button in scene panels.
2006-04-10 18:27:51 +00:00