forked from bartvdbraak/blender
more softbody goodies:
SB collision targets may be picked up from modifier stack works fine with static targets having subsurf and/or array mofifiers see--> http://www.wund.homepage.t-online.de/hidden/Mstack.blend http://www.wund.homepage.t-online.de/hidden/Mstack_II.blend however when calulating the SB object dynamics the vertices of the 'deform only' m-stack result are used so SB <-> SB may look strange subsuf modifier is applied to SB object after doing SB dynamics (that is: colliding mesh is subsurfed, SB is not ) subsurfed SB cubes colliding link --> http://www.wund.homepage.t-online.de/hidden/ColSelfMod.blend or may give unwanted results subsuf and array modifier is applied to SB object after doing SB dynamics link --> http://www.wund.homepage.t-online.de/hidden/ColSelfMod_nobug.blend last, modifiers that change vertex locations in time (like waves) suffer from not beeing seen at needed time resolution (SBs see colliders static in a frame) well but that's beyond the limits of the current dep-graph use and needs to be resolved on design level anyhoo have fun BM
This commit is contained in:
parent
1730b7b41d
commit
57f01fdb46
@ -448,10 +448,10 @@ void ccd_build_deflector_cache(Object *vertexowner)
|
||||
DerivedMesh *dm= NULL;
|
||||
int dmNeedsFree;
|
||||
|
||||
if(1) { /* so maybe someone wants overkill to collide with subsurfed */
|
||||
dm = mesh_get_derived_deform(ob, &dmNeedsFree);
|
||||
} else {
|
||||
if(ob->softflag & OB_SB_COLLFINAL) { /* so maybe someone wants overkill to collide with subsurfed */
|
||||
dm = mesh_get_derived_final(ob, &dmNeedsFree);
|
||||
} else {
|
||||
dm = mesh_get_derived_deform(ob, &dmNeedsFree);
|
||||
}
|
||||
if(dm){
|
||||
DispListMesh *disp_mesh= NULL;
|
||||
|
@ -135,6 +135,7 @@ typedef struct SoftBody {
|
||||
#define OB_SB_SELF 512
|
||||
#define OB_SB_COLLISIONSET 1024
|
||||
#define OB_SB_EDGECOLL 2048
|
||||
#define OB_SB_COLLFINAL 4096
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@ -2268,6 +2268,7 @@ static void object_softbodies_II(Object *ob)
|
||||
uiDefButBitS(block, TOG, 1, B_REDR, "Deflection",10,50,150,20, &ob->pd->deflect, 0, 0, 0, 0, "Makes this object visible to softbody objects");
|
||||
if(ob->pd->deflect) {
|
||||
uiDefButF(block, NUM, B_DIFF, "Damping:", 160,50,150,20, &ob->pd->pdef_sbdamp, 0.0, 1.0, 10, 0, "Amount of damping during soft body collision");
|
||||
uiDefButBitS(block, TOG,OB_SB_COLLFINAL , B_DIFF, "Ev.M.Stack",10,30,150,20, &ob->softflag, 0, 0, 0, 0, "Pick collision object from modifier stack");
|
||||
uiDefButF(block, NUM, B_DIFF, "Inner:", 160,30,150,20, &ob->pd->pdef_sbift, 0.001, 1.0, 10, 0, "Inner face thickness");
|
||||
uiDefButF(block, NUM, B_DIFF, "Outer:", 160,10,150,20, &ob->pd->pdef_sboft, 0.001, 1.0, 10, 0, "Outer face thickness");
|
||||
}
|
||||
@ -2298,6 +2299,7 @@ static void object_softbodies_II(Object *ob)
|
||||
uiDefButBitS(block, TOG, 1, B_REDR, "Deflection",10,50,150,20, &ob->pd->deflect, 0, 0, 0, 0, "Makes this object visible to other softbody objects");
|
||||
if(ob->pd->deflect) {
|
||||
uiDefButF(block, NUM, B_DIFF, "Damping:", 160,50,150,20, &ob->pd->pdef_sbdamp, 0.0, 1.0, 10, 0, "Amount of damping during soft body collision");
|
||||
uiDefButBitS(block, TOG,OB_SB_COLLFINAL , B_DIFF, "Ev.M.Stack",10,30,150,20, &ob->softflag, 0, 0, 0, 0, "Pick collision object from modifier stack");
|
||||
uiDefButF(block, NUM, B_DIFF, "Inner:", 160,30,150,20, &ob->pd->pdef_sbift, 0.001, 1.0, 10, 0, "Inner face thickness");
|
||||
uiDefButF(block, NUM, B_DIFF, "Outer:", 160,10,150,20, &ob->pd->pdef_sboft, 0.001, 1.0, 10, 0, "Outer face thickness");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user