Age | Commit message (Collapse) | Author |
|
Previously, the shading and material was set once per PBVHNode when
drawing. This is still the case, but PBVHNodes are now built to
contain only one material and shading mode.
This is done with an extra partitioning step; once the number of
primitives in the node falls below the PBVH leaf limit, it's
primitives are checked for matching materials. If more than one
material or shading mode is present in the node, it is split and
partitioned (partitioned by material rather than 3D location.)
Given a sufficiently 'annoying' input, like a dense mesh with
thousands of materials randomly scattered across it, this could
greatly increase PBVH build time (since nodes might end up containing
a single primitive), but in general this shouldn't come up.
In order to support materials for grids, the CCGDM is building another
grid array (of DMFaceMat structs). This could be used to replace
CCGDM.faceFlag for some small memory savings (TODO).
|
|
This function pointer isn't called anymore, so removing it and the
cddm/ccgdm/gpu code associated with it.
|
|
|
|
- spelling - turns out we had tessellation spelt wrong all over.
- use \directive for doxy (not @directive)
- remove BLI_sparsemap.h - was from bmesh merge IIRC but entire file commented and not used.
|
|
added some missing functions too - which are not used yep but should be there for api completeness.
* CDDM_set_mloop
* CDDM_set_mpoly
* BLI_mempool_count
|
|
Not used anymore, both have BMesh replacements (DerivedMesh.getPolyMap
and create_vert_poly_map.)
|
|
|
|
without the underscores these clogged up the namespace for autocompleation which was annoying.
|
|
* add DM_to_bmesh_ex, DM_to_bmesh for converting a derived mesh to a BMesh (rather than a BMEditMesh)
* have a generic variable for allocsize: bm_mesh_allocsize_default, rather than copying the values about.
|
|
the input to be a CDDM.
remove conversions to CDDM for edge split and bevel (will give some
speedup).
|
|
currently only works for 3/4 sided faces.
|
|
polygon version of dm->getFaceMap(ob, dm)
sculpt uses this for checking connectivity.
|
|
Noted preview code for DynamicPaint is currently disabled, will see if I can re-enable it…
|
|
of how modifiers can generate preview.
User side:
* Preview for DynamicPaint should keep the same behavior (for now). Weight preview should be somawhat quicker, though.
* Preview for WeightVG modifiers is only active in WeightPaint mode, and if the affected vgroup is the active one.
* Last active preview modifier in stack wins!
Note: that modifier preview topic is yet to be further refined, quite raw/incomplete for now.
Dev side:
* In draw code, renamed DRAW_DYNAMIC_PAINT_PREVIEW flag to DRAW_MODIFIERS_PREVIEW
* Removed use of MOD_DPAINT_PREVIEW_READY in DynamicPaint code (seems unecessary, and if it was, should be of more general scope).
* Added eModifierTypeFlag_UsesPreview to ModifierTypeFlag, for modifiers that can generate some preview data.
* Added three new modifier funcs, to handle preview modifiers in draw code / mod stack.
* For weights preview: added the generic DM_update_weight_mcol func, which can update WEIGHT_MCOL layer with either a given array of weights (currently used by DynamicPaint only), or from current active vgroup(s).
So now, draw code is fully generic (i.e. no more modifier-type checking in it). Mod stack code is generic to some extent, but will need more work.
|
|
|
|
through Object.dm_info('SOURCE/DEFORM/FINAL')
this is to help tracking down issues with modifiers where loosing data
layers between modifiers can cause bugs, also to helo with comparing
bmesh/trunk's modifier stack.
|
|
removal of tessface recalculation after each modifier runs.
|
|
|
|
|
|
without this all merges in this area have to be done manually.
|
|
|
|
Added compareDrawSettings callback to driver mesh's callbacks which are
drawing textured faces (mapped and not mapped). This new callback checks
if two faces are drawing with the same settings (testures, shading etc)
and if they not, flush of faces happens into ogl using glDrawArrays and
next face would be drawn with it's own settings.
Currently implemented compareDrawSettings is used to resolve issue from
bug report only, probably there are extra places where this callback is
needed, but haven't seen configuration where current logic will fail,
so it should be ok.
Also reordered arguments passing to drawMappedFaces DM's callbacks,
so now all drawing callback are accepting list of callbacks and then
userData, instead of using mixed order of callbacks and userData which
was a bit confusing to work with.
This commit fixes:
- #26410: VBO & multitexture doesnt work
- #29464: VBO enabled causes UV coruption
|
|
seems like it might be fixing the recent CDDM_copy corruption/leak bug
|
|
members of the DerivedMesh struct
|
|
confusion
This is the first step in a few changes to cleanup confusing/missing DM funcs
|
|
|
|
than 3 float pointers.
also make particle draw use a float vec.
|
|
BLI_array_append / BLI_array_append_r, the latter returning the new array location.
|
|
|
|
|
|
|
|
still need to manually update some funcs
|
|
effect for a render engine using new shading nodes. In short:
* No longer uses images assigned to faces in the uv layer, rather the active
image texture node is what is edited/painted/drawn.
* Textured draw type now shows the active image texture node, with solid
lighting.
* Material draw mode shows GLSL shader of a simplified material node tree,
using solid lighting.
* Textures for modifiers, brushes, etc, are now available from a dropdown in
the texture tab in the properties editor. These do not use new shading nodes
yet.
http://wiki.blender.org/index.php/Dev:2.6/Source/Render/TextureWorkflow
|
|
|
|
http://markmail.org/message/fp7ozcywxum3ar7n
|
|
- only pass if the mesh has vertex colors to drawParams() rather then the mcol its self, this saves a lookup on the color.
- drawing textures in editmode with no vertex colors would still lookup vertex colors on each face, instead cache this info for all faces.
|
|
|
|
Added callback to drawMappedFaces which checks if two faces have got equal draw options.
After discussion with Brecht we found it's nicest solution for now:
- Disabling VBOs in edit mode for this case wouldn't be nicer for this case -
some additional flag stored in DM should be added in this case.
- Adding new callback in DM isn't nicer that this solution.
- Handling face selection in drawobject would lead to duplicated code
which is also not nice.
Hopefully, this callback could handle all cases in the future.
Also, Brecht mentioned current VBO implementation isn't perfect, so maybe
when we'll redesign this area dealing with edit mode wouldn't be so tricky.
|
|
|
|
macro.
|
|
Removed the DerivedMesh face iterators (they sucked).
This should make subsurf faster. Also sped up multires
a bit (not sure if it's strictly correct, need to look
at it later).
|
|
|
|
|
|
weighted normals as the render engine, and the render engine will copy
normals from the mesh rather than always recalculating them.
Subsurf/multires still use regular vertex normals, but they are expected
to be sufficiently high resolution to not need this.
This means that normal maps displayed in the viewport actually match the
render engine exactly and don't have artifacts due to this discrepancy.
It of course also avoids unexpected surprises where your render normals
look different than your viewport normals.
Subversion bumped to 4 for version patch to recalculate normals.
Patch by Morten Mikkelsen, with some small changes.
|
|
|
|
|
|
the two files mikktspace.h and mikktspace.c. These are standalone files
which can be redistributed into any other application and regenerate the
same tangent spaces. The implementation is independent of the ordering
of faces and the vertex ordering of faces.
|
|
==========================
Removed limitation of armatured-only objects for sculpting -- now all
deformation modifiers are allowed in sculpt mode. Use crazyspace corrections
like from transformation modules was used to support all deformation modifiers.
Internal change: all crazyspace-related functions were noved to crazyspace.c
P.S. Brush could make quite unexpected deformation for meshes which are
deformed in specified way. Got patch for this and discussing with Brecht
if it's really needed or maybe it could be done in better way.
|
|
Some naming changes to make naming more uniform. No functional changes.
It's necessery for further crazyspace changes and improvenments.
|
|
Used a crazyspace approach (like in edit mode), but only modifiers with
deformMatricies are allowed atm (currently shapekeys and armature modifiers only).
All the rest modifiers had an warning message that they aren't applied because
of sculpt mode. Deformation of multires is also unsupported.
With all this restictions users will always see the actual "layer" (or maybe
mesh state would be more correct word) they are sculpting on.
Internal changes:
- All modifiers could have deformMatricies callback (the same as deformMatriciesEM but
for non-edit mode usage)
- Added function to build crazyspace for sculpting (sculpt_get_deform_matrices), but it
could be generalized for usage in other painting modes (particle edit mode, i.e)
Todo:
- Implement crazyspace correction to support all kinds of deformation modifiers
- Maybe deformation of multires isn't so difficult?
- And maybe we could avoid extra bad-level-stub for ED_sculpt_modifiers_changed
without code duplicating?
|