formula operation add and mult the same?

Is it true that "mult" and "add" operation are the same? I looked it up here:

http://docs.daz3d.com/doku.php/public/dson_spec/object_definitions/operation/start

It seems to be not only a copy/paste error in the documentation, since in some products "mult" seems to work like "add". Otherwise this would make no sense

(code snippet from agentunawares pose g3f to g8f converter)

			"formulas" : [				{					"output" : "lShldr:/data/DAZ%203D/Genesis%208/Female/Genesis8Female.dsf#lShldr?rotation/z",					"operations" : [						{ "op" : "push", "url" : "Genesis8Female:#Left%20Arm%20Bend?value" },						{ "op" : "push", "val" : 45.75 },						{ "op" : "mult" }					]				}			],

 

Comments

  • That mutliplies two values ( a cosntant and a rotation) together and uses the result - if that is the entirety of the code. I'm not sure why you think it needs to be acting as Add to make sense. certainly mult does generally act as mult, otherwise its role in many cases would fail (e.g. subtracting a morph value from one and multiplying rotations by the result to ensure that the morph can lock certain rotations that would look bad in combination with the morph, or with a correction morph adding one of the morphs involved and mutliplying by the other to get a positive value only if both are non-zero).

  • Thank you, Richard, for your fast answer. While I try here to explain why I thought it performs an addition rather than a multiplication; I understand my misapprehension :)

    The snippet is taken from a morph file for Genesis 8 Female, which is called "G3F Pose". If you load a G3F Pose on G8F, her arms and legs are in the wrong positions. If you now activate this morph, 45.75 degrees will be added to the left shoulder rotation and everything is fine. What I did not understand so far is that this addition DOESN'T HAPPEN IN THIS SNIPPET. This snippet renders only the multiplication between the 45.75 degrees and the position of the "G3F Pose" slider which has to be set to 1.0 so that the correction is working. The ADDITION HAPPENS THEN IN THE FORMULA STACK as described in the documentation of "formula".

    Thank you again for triggering my thinking!

    (What remains is the error in the documentation but I think this is no real problem.)

     

  • The documentation has been corrected, thank you for pointing the mistake out.

Sign In or Register to comment.