Age | Commit message (Collapse) | Author |
|
|
|
faces,
Noted that a floating point exception caused by this r28953.
With the render engine using DerivedMesh normals this came up as a memory error when rendering some files.
for now zero the normals, could interpolate between vertex normals if needed.
|
|
promoted to doubles, adjust to use floats.
|
|
|
|
|
|
header static for blenlib, blenkernel and editors.
|
|
python functions.
- use NULL rather then 0 where possible (makes code & function calls more readable IMHO).
- set static variables and functions (exposed some unused vars/funcs).
- use func(void) rather then func() for definitions.
|
|
we add extra creasing in the UV mesh, to keep it from shrinking, leading to
distorted UVs, but this wasn't always working right, so tweaked the conditions.
|
|
- omit render code from this warning (cmake only), until render branch is merged.
- moved -Wunused-parameter warning to apply to all C code in blender (not just ./source/blender), (cmake only).
|
|
if there are >= 1 million faces estimated in the resulting mesh.
(merge from render25 branch)
|
|
for now, it's too fine grained and so becomes a performance bottleneck on some
platforms, while only providing a modest speedup on others. Couldn't find a
simple enough solution to solve this, so for now no multithreading here.
|
|
|
|
arrays are now allocated with regular guardedalloc.
|
|
face edges.
|
|
subsurf derivedmesh to regular (derived)mesh, causing drawing errors on
apply and following modifiers to work incorrect.
|
|
|
|
* Smooth brush works again for multires.
* Optimal Display option for multires modifier, same as subsurf.
|
|
* Multithread parts of multires and subsurf. Only loops working on
face grid data and do no memory allocation have been multithreaded,
others would be more complicated.
* Force some CCGSubsurf functions to be inlined, gives a small overall
speedup in subsurf code.
* Fix sculpting not working correct with transformed objects.
* Fix a few cases of "spikes" on lower level multires levels. There's
still cases where it happens, usually on boundary cornders. The
problem is that in such cases the limit surfaces can be very different
from the low res surface, so the tangent space is very different too..
* Fix crash deleting multires higher levels with level set to 0.
* Fix crashes that happened sometimes when adding faces in editmode.
|
|
svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r24483:24889
|
|
levels, copy coordinates from face grids, and stitch together face grids.
|
|
Subsurf FLT_EPSILON from float.h was too high, using a smaller value fixes
|
|
fix a divide by zero in the subsurf code found in the process.
|
|
* 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
|
|
since no additional crashes were reported!
|
|
edges
Removed an incorrect check for original vertices on whether any faces used them.
|
|
also took an unused value.
removed loop and unused var, since this is a sensitive (and not my) area - I did some mesh comparisons and ran a comparison with the old function passing random values, so this should be ok.
|
|
Mostly was unused variables, unused functions, missing prototypes and
missing include files.
|
|
This fixes most of the UV distortion issues with subsurf. Near seams
however there might still be some distortion, but this should at least
not be worse than before. Subsurf UV is enabled by default on new meshes,
and can be enabled in the modifier panel for existing ones.
Before and after:
http://users.pandora.be/blendix/notsmooth.png
http://users.pandora.be/blendix/smooth.png
|
|
- added user settable defaultEdgeData (for auto edge creation
in CCGSubSurf)
- bug fix, possible crash on meshes with loose edges but
in mface not in medge
- missed file in last commit, for proper updating in image
window
|
|
mapping (instead of Edit{Vert,Edge,Face} pointers)
- dropped convertToDispListMeshMapped (whew, glad of it too)
- added DerivedMesh drawMappedFaces function
- dropped EM suffix for DerivedMesh functions, it was neither
particularly correct nor descriptive
- converted test_index_mface to test_index_face that also corrects
MCol and TFace. Good thing we had three versions of this routine,
you never know when one might burn down.
- removed flipnorm_mesh, not used anymore (and was incorrect to
boot)
- Getting face select to work with modifiers turned out to be much
more complicated than expected. Reworked mapping architecture for
modifiers - basically elements in a DispListMesh are now required
to be stored in an order that corresponds exactly to original
ordering. MVert/MEdge/MFace all have a new flag ME_XXX_STEPINDEX
that is set on each element that is set on the first derived element
of each original element. I can't say the code to follow these
requirements for subsurf is particularly transparent, but on the
upside it is a reasonably consistent and simple system that is memory
efficient and allows keeping the DispListMesh structure.
- rewrote mirror modifier to be simpler/conform to new requirements
for mapped DispListMesh structure. This also means that mirror interacts
much better with incremental subsurf calculation (it used to recalc
one entire side on any topology change, now it generally avoids that).
- added EM_{init,free}_index_arrays and EM_get_{vert,edge,face}_for_index
functions to handle mapping indices back into appropriate EditMesh
structures.
- bug fix, make edges didn't recalc object data
- bug fix, initial image assignment to TFace's didn't recalc object data
- new feature, added circle select support for FACESELECT
- bug fix, creating new faces in editmode duplicated the TFACE active
flag - but there should only be one active tface
- bug fix, possible crash when deleting all faces in faceselect mode
on mesh with tfaces...
Still todo: TFace edge drawing is still not always correct in face
mode, in particular with a mirror modifier when mesh has edges (and
no preceeding subsurf). Have not yet decided how to deal with this.
Best solution is probably to do switch to meshes all having MEdge's,
in which case I can get rid of TFace edge flags (and need to recalc
modifiers on tface selection change).
|
|
- removed DerivedMesh.drawLooseEdges and replaced with much more
general drawEdgesFlag function that draws based edge flags.
- switch DerivedMesh.drawFacesTex to give user control over which
faces are drawn
- added object_uvs_changed and object_tface_flags_changed functions
to do object recalc flag flush/redraw queueing and added calls
in appropriate places
- added various edge flags to mark TFace information. This is used
by the drawEdgesFlag routine and was the best way I could come
up with to deal with drawing TFace information from modifier stack.
Unfortunate side effects are (1) uses a lot of MEdge flags (although
not needed in file so thats fine) and (2) requires recalculation
of modifier stack on UV selection changes. #2 is disappointing
but I could not find a better solution.
- update UV mesh shadow drawing to use modifier result. At the moment
just uses the final result but probably should be integrated with
the editmode cage option.
- convert draw_tfaces3D to use drawEdgesFlag routine which cleaned
up the code quite a bit.
- convert draw_tface_mesh to draw using result of modifier stack.
Same comment about which result actually gets draw in FACESELECT
mode as for UV editor shadow drawing applies.
There is a still a bug in that selection is using the wrong
mesh to draw.
|
|
that face... this situation should still not happen with well
written modifiers but at least it won't crash now
- bug fix in mirror modifier, calculation during editmode did not
check to make sure built mface's had valid indices... grr the
==0 tagging system is really a pain.
- convert a few uiDefBut calls to use explicit type
|
|
- added modifier_supportsMapping function
- update CCG to set actual vertex normal (and not just
interior face vertex normal, bla bla bla no one knows
what this means nevermind).
- renamed modifierType_get_info to modifierType_getInfo for
consistency and to increase my commit line count.
- update EditMeshDerivedMesh to calculate (and use new) normals
when given deformed vertices
- added
- update editmode modifier calculation to also calculate a cage,
not working 100% atm, in particular if a deformer follows a modifier
that returns a DerivedMesh the cage is not accurate.
- added ccg derivedmesh drawMapped{Vert,Face]NormalsEM functions
- currently UI for selecting the cage mesh is rather irritating,
will be updated
|
|
to write one that is based on geometry (and not just vertex position)
- added editmode versions of modifier deform/apply calls and flag
to tag modifiers that support editmode
- added isFinalCalc param to applyModifier, basically a switch to let
subsurf know if it is calc'ng orco or not (so it can deal with cache
appropriately). This is kinda hacky and perhaps I can come up with
a better solution (its also a waste to do a complete subdivide just
to get vertex locations).
- changed ccgsubsurf to not preallocate hash's to be approximately correct
size... this was probably not a big performance savings but means that
the order of faces returned by the iterator can vary after the first
call, this messes up orco calculation so dropped for time being.
- minor bug fix, meshes with only key didn't get vertex normals correctly
calc'd
- updated editmesh derivedmesh to support auxiliary locations
- changed mesh_calc_modifiers to alloc deformVerts on demand
- added editmesh_calc_modifiers for calculating editmesh cage and final
derivedmesh's
- bug fix, update shadedisplist to always calc colors (even if totvert==0)
- changed load_editMesh and make_edge to build me->medge even if totedge==0
(incremental subsurf checks this)
todo: add drawFacesTex for ccgderivedmesh
So, modifiers in editmode are back (which means auto-mirror
in edit mode works now) although still not finished. Currently
no cage is computed, the cage is always the base mesh (in
other words, Optimal edge style editing is off), and the final
mesh currently includes all modifiers that work in edit mode
(including lattice and curve). At some point there will be toggles
for which modifiers affect the final/cage editmode derivedmesh's.
Also, very nice new feature is that incremental subsurf in object
mode returns a ccgderivedmesh object instead of copying to a new
displistmesh. This can make a *huge* speed difference, and is very
nice for working with deformed armatures (esp. with only small
per frame changes).
|
|
- added ModifierTypeInfo.freeData function
- added modifier_{new,free] utility function
- added ccgSubSurf_getUseAgeCounts to query info
- removed subsurf modifier faking (ME_SUBSURF flag is no
longer valid). subsurf modifier gets converted on file load
although there is obscure linked mesh situation where this
can go wrong, will fix shortly. this also means that some
places in the code that test/copy subsurf settings are broken
for the time being.
- shuffled modifier calculation to be simpler. note that
all modifiers are currently disabled in editmode (including
subsurf). don't worry, will return shortly.
- bug fix, build modifier didn't randomize meshes with only verts
- cleaned up subsurf_ccg and adapted for future editmode modifier
work
- added editmesh.derived{Cage,Final}, not used yet
- added SubsurfModifierData.{mCache,emCache}, will be used to cache
subsurf instead of caching in derivedmesh itself
- removed old subsurf buttons
- added do_modifiers_buttons to handle modifier events
- removed count_object counting of modifier (subsurfed) objects...
this would be nice to add back at some point but requires care.
probably requires rewrite of counting system.
New feature: Incremental Subsurf in Object Mode
The previous release introduce incremental subsurf calculation during
editmode but it was not turned on during object mode. In general it
does not make sense to have it always enabled during object mode because
it requires caching a fair amount of information about the mesh which
is a waste of memory unless the mesh is often recalculated.
However, for mesh's that have subsurfed armatures for example, or that
have other modifiers so that the mesh is essentially changing on every
frame, it makes a lot of sense to keep the subsurf'd object around and
that is what the new incremental subsurf modifier toggle is for. The
intent is that the user will enable this option for (a) a mesh that is
currently under active editing or (b) a mesh that is heavily updated
in the scene, such as a character.
I will try to write more about this feature for release, because it
has advantages and disadvantages that are not immediately obvious (the
first user reaction will be to turn it on for ever object, which is
probably not correct).
|
|
|
|
correct (although fairly unnoticable).
- bug fix, vertex normal calculation didn't normalize face normals before
summing... silly mistake
p.s. perhaps the Crystal Space bla bla naming conversation is not most
appropriate for the commit list?
|
|
go wacky.
|
|
didn't really add value. hardcoded to use float[3] now.
|
|
before it would follow subsurf code path by creating fake displistmesh,
etc... kinda fun for testing but just annoying now.
- change to creasing behavior, to make sure that with full creasing effect
is just simple subdivision.
|
|
using regular ccgsubsurf but with crease set to full.
|
|
is fast, but can be rather tedious to work with...)
- vertex normals for smooth faces draw correctly now... this code also
switched to drawing with GL_QUAD_STRIP which can be quite a bit faster
(depends how fast graphics card calcs lighting, I get 50% faster here)
|
|
|
|
subsurf (always on)
- bug fix, creasing wasn't evaluated properly after incremental change
|
|
- some subsurf settings not correctly changed in editmode
|
|
- added G.editMesh->derived pointer... idea is to use this
for mesh derived from editmesh instead of Mesh->derived (as the
derived mesh tends to vary depending on what it came from).
This part could be cleaner, also there may problems with it not
being invalidated correctly.
- And most importantly: In case people were beginning to worry all
these edits were just crazy zr stuff, the big point comes about:
Incremental subsurf calculation is now enabled. This gives massive
speed improvements when editing a large mesh.
For the eye-candy happy: try setting G.rt==52 before entering editmode
and the edges and vertices (in optimal mode) will switch to displaying
visually the age since a region has last been calculated. Lots of
fun!
|
|
happy about coercing (xxx**) to (void**) (sadly enough)
|
|
|
|
I would like to have proper creasing (following what appears to be
the informal standard in the subdivision surface literature) but
I do not know when I will get to this or how complicated it will
be. With this patch CCGSubSurfs should now have the same capabilities
as regular subsurfs (barring possible bugs) and so replacing the
old implementation is a reasonable possibility.
|
|
|