possible to remove rigid groups with a ds script?

MistaraMistara Posts: 38,675

is it possible to remove rigid groups with a ds script after clothing is loaded into scene?

or with a preset/injection file?

i've been manually deleting rigid groups with the dson editor.  not a convenient way of doing it.

thanks.

Comments

  • Matt_CastleMatt_Castle Posts: 2,674

    My opening question would be "why?"

    I could see occasionally needing to remove or fix a rigidity group that has problems, but to remove them wholesale on a regular basis, I don't understand.

    As is, my main suggestion if you just want to be rid of all rigidity is to blank the rigidity map; rigidity relies on both groups/references and the weight map that tells DS how strong their influence should be.

  • MistaraMistara Posts: 38,675

    how do i blank the map?

    thanks.

  • Matt_CastleMatt_Castle Posts: 2,674

    Node Weight Map (Alt+Shift+W) tool with the root of the asset selected, find the rigid weights map on the Tool Settings pane, right-click and "Remove selected".

    If you want to isolate specific rigidity groups, then the geometry editor (Alt+Shift+G) in Vertex Selection mode (Ctrl+\) will show you the groups in the Tool Settings pane, which is probably easier than the DSON editor.

    I'm not entirely following what the goal is here though, as often these groups are fixing quite serious problems with auto-follow morphs.

  • MistaraMistara Posts: 38,675

    a script would be more convenient

  • Matt_CastleMatt_Castle Posts: 2,674

    Unfortunately, I don't know enough about scripting in DS to answer that one way or another.

    My instinct is that a script could probably could strip out the groups or the map, but I don't know for sure. As far as getting anyone to write that script... well, like I say, it seems like a pretty niche purpose. (About the only time I have needed to remove rigidity groups is when it's an asset I've made and screwed up first time; enlighten me if you will, but I can't imagine it being something enough people need to do on a regular basis that anyone's likely to script it).

    As is, the best suggestion I've got is, alas, heading to the Node Weight tool and deleting the rigidity map, which is the quickest way I can currently think of to disable rigidity.

  • OmnifluxOmniflux Posts: 389

    Here is a script which will remove all rigidity groups from an object.

    // DAZ Studio version 4.15.0.2 filetype DAZ Script(function(){	function removeRigidityGroups (oNode)	{		// The rigidity groups we are looking for belong to shapes which belong		// to objects which belong to nodes, one of which we were just given.		var oObject = oNode.getObject();		if (!oObject)			return;		var oShape = oObject.getCurrentShape();		if (!oShape)			return;		// For each rigidity group we find		for (var i = 0, nRigidityGroups = oShape.getNumRigidityGroups(); i < nRigidityGroups; i++)		{			var oRigidityGroup = oShape.getRigidityGroup (i);			var sRigidityGroupName = oRigidityGroup.getName();			oShape.removeRigidityGroup (oRigidityGroup);			App.log (qsTr ("Removed Rigidity Group \"%1\" from \"%2\"")				.arg (sRigidityGroupName)				.arg (oNode.getLabel()));		}	}	// Get selected nodes	var aNodes = Scene.getSelectedNodeList();	if (aNodes.length > 0)		aNodes.forEach (removeRigidityGroups);	else		MessageBox.warning (qsTr ("You must select one or more nodes to perform this action."), qsTr ("Selection Error"), qsTr ("&OK"), "");})();

     

  • MistaraMistara Posts: 38,675

    Omniflux said:

    Here is a script which will remove all rigidity groups from an object.

    // DAZ Studio version 4.15.0.2 filetype DAZ Script(function(){	function removeRigidityGroups (oNode)	{		// The rigidity groups we are looking for belong to shapes which belong		// to objects which belong to nodes, one of which we were just given.		var oObject = oNode.getObject();		if (!oObject)			return;		var oShape = oObject.getCurrentShape();		if (!oShape)			return;		// For each rigidity group we find		for (var i = 0, nRigidityGroups = oShape.getNumRigidityGroups(); i < nRigidityGroups; i++)		{			var oRigidityGroup = oShape.getRigidityGroup (i);			var sRigidityGroupName = oRigidityGroup.getName();			oShape.removeRigidityGroup (oRigidityGroup);			App.log (qsTr ("Removed Rigidity Group \"%1\" from \"%2\"")				.arg (sRigidityGroupName)				.arg (oNode.getLabel()));		}	}	// Get selected nodes	var aNodes = Scene.getSelectedNodeList();	if (aNodes.length > 0)		aNodes.forEach (removeRigidityGroups);	else		MessageBox.warning (qsTr ("You must select one or more nodes to perform this action."), qsTr ("Selection Error"), qsTr ("&OK"), "");})();

     

    omg  almosrt missed it.  thanks!!! 

  • Matt_Castle said:

    Node Weight Map (Alt+Shift+W) tool with the root of the asset selected, find the rigid weights map on the Tool Settings pane, right-click and "Remove selected".

    If you want to isolate specific rigidity groups, then the geometry editor (Alt+Shift+G) in Vertex Selection mode (Ctrl+\) will show you the groups in the Tool Settings pane, which is probably easier than the DSON editor.

    I'm not entirely following what the goal is here though, as often these groups are fixing quite serious problems with auto-follow morphs.

    Misty like me is a Carrara user, it crashes Carrara

    they are found on otherwise compatible stuff for Genesis 2 as well 

  • Thanks Omniflux for the scriptheart

  • MistaraMistara Posts: 38,675

    oh. we could use one of the removal scripts for geografts groups.enlightened

    is another thing i delete with dson editor.  its in the geometry section. 
    dunno how to make a preset ignore the geograft part. 

  • OmnifluxOmniflux Posts: 389

    Mystiarra said:

    oh. we could use one of the removal scripts for geografts groups.enlightened

    is another thing i delete with dson editor.  its in the geometry section. 
    dunno how to make a preset ignore the geograft part. 

    I'm not sure what you are referring to here. Do you mean removing all geografts from a node? If not, can you give instructions for creating this in a scene or point me to a free product that has this?

  • Omniflux said:

    Mystiarra said:

    oh. we could use one of the removal scripts for geografts groups.enlightened

    is another thing i delete with dson editor.  its in the geometry section. 
    dunno how to make a preset ignore the geograft part. 

    I'm not sure what you are referring to here. Do you mean removing all geografts from a node? If not, can you give instructions for creating this in a scene or point me to a free product that has this?

    I believe she means turn geografts into conformers.

    In Carrara they destroy the UV mapping but also in DAZ studio geografted clothing drives me nuts as it hides the underlying mesh so you cannot use opacity maps on it. 

  • MistaraMistara Posts: 38,675

    for example horns.  there is geograft section under geometry.  dont really need horns as a geograft.

    found that if i use dson editor to delete the geograft section, the horns become a nuetral conforming item.

    as Wendy mentioned, in Carrara, the geograft mesh doesnt merge.  it punches a hole where the merge doesnt hapen, destroys the uv map.  skin renders with artifacts.  it can be compensated somewhat with projections.  been trying to work out geografts for years. weld tolerance, etc.  there are items, like the male pro anatomical bits, would rather have a working geograft. sure Mike would too.

    been playing exporting the merged mesh, then kitbashing the nodes together, but then the morphs on the geograft part arent recognized.  out of ideas at this point. enlightened  Mike4 doesnt  seem to mind not being geografted to his parts.

  • OmnifluxOmniflux Posts: 389

    Where is the section you are deleting located? In the scene file, or in the /data/Vender/Product/Item/Item.dsf file?

    If the latter, is this what you are removing?

    {	"geometry_library" : [	{		"root_region" : {			"graft" : {				"vertex_count" : 123,				"poly_count" : 123,				"vertex_pairs" : {					"count" : 3,					"values" : [ [ 1, 2 ], [ 3, 4 ], [ 5, 6 ] ]				},				"hidden_polys" : {					"count" : 3,					"values" : [ 1, 2, 3 ]				}			}		}	}}

     

  • MistaraMistara Posts: 38,675

    its in the dsf file.  thanks.

    the only thing i still using ds for is to save shader presets.  it would be nice to not have to do everything manually in dson editor.  

    some things i use vba to prep.  import the dsf file into a table in ms access.  do what i need, then export again to a text file.  for some reason, the internal names don't always match the internal ids.  the duf file cant always find its parent node in the dsf file.  example tongueBase looking for #tongue01  sends verts out into infinity.  used to see that in the poser4 days.

Sign In or Register to comment.