Scaling gives unrealistic results on coiled springs
anomalaus last edited by anomalaus
Urk! I appear to have overturned one too many 3D rocks and discovered something nasty underneath. In my OCD driven quest for virtual realism, I have come to the conclusion that scaling a coiled spring reduces the volume it displaces. (As opposed to its bounding volume, which correctly follows the scaling)
Here uncompressed, the coil cross-section is more or less circular:
When compressed, the coil cross-section becomes elliptical.
That cross-sectional compression is not what happens in the real world, instead, every minute segment of the coil gets twisted a little bit, storing energy, but the coil cross-section never changes (unless you squash it so far the coils meet and deform and weld/melt together).
Has anyone come across any esoteric algorithms for 3D volume invariant spring compression?
Hmm, just shooting in the dark for now:
Of course any scaling of the spring will reposition ALL vertices along the scaling axis; that's how it is supposed to work, or else you wouldn't be able to scale a higher resolution prop without distortions.
The problem is that scaling works strictly linear, just like morphs.
I could just think of one (complicated and untried) workaround:
(the scaling axes referred to suppose that the spring is oriented along the scene's X axis, as shown in your picture)
Make a duplicate of your spring.
Open the Morhing Tool, create a new morph target.
Set the morphing tool to:
(Don't check the "Accumulate" box because with it unchecked you have better control over your morph. Use the "Magnitude" setting instead)
Make sure your "Radius" is large enough: All brush dots must be pure red!
Give the spring a few strokes with the Morph Brush until you "feel" it looks OK. Close the Morph Brush.
Set your viewport to "Outline".
Switch to orthoganal cameras (side and front)
Adjust the yScale and zScale of the spring and fiddle around with your new "SpringCoilDisplacement" morph until you've got a convincing result.
Only thing left is to create the dependencies of the "xScale" (a.k.a. "compression"), the yScale & zScale and the "SpringCoilDisplacement" morph.
As said, I haven't tried this yet, but this how I would try.
This is just another workaround, like so many.
The "SpringCoilDisplacement" morph "thickens" the spring in all direction, so you must compensate this by adjusting the yScale and zScale until the spring has the same diametre as the uncompresed original.
Like this you compensate for the xScale compression because the morph is reduced to it's y and z axes.
Hope that helped.
Interesting problem! If only - if only I had more time!
I could be wrong, but this looks a Kalashnikov?
Belay above post!
I just made a quick test of my own medicine, and it doesn't deliver the desired results.
Instead, here's an alternative:
In the Props library, "Dimension 3D" folder, there's a spring ("Spiral.pp2") which behaves exactly as you want!
Check out how the morph works and try to port it to your own spring.
anomalaus last edited by
@karina thanks. I'll look at that when I've had some sleep.
I suppose the correct answer is to create a parametric morph which displaces vertices along the scale axis proportionally with how far along the coil curve they are, so all points at the same parametric value (a cross-section) will get the same displacement. Hmmm... Too tired to think now. Sleeeeeee.... p....
Sleep well my friend, and pleasant dreams!
I'll keep watching this thread because this is very interesting problem.
See you tomorrow!
anomalaus last edited by anomalaus
@karina Luger P08. I suspect most pre-WWI developed armaments share history and ideas.
I found the first free Luger on ShareCG and thought it was wonderful! My favourite childhood toy at one time was a Luger water pistol. No moving parts, of course, but it just felt so right in the hand. Wonderful ergonomics, despite the real thing being reputedly as lethal as a sewing machine. Accurate when it worked, but prone to jamming if not cleaned adequately.
I was disappointed when I found that the model had missing, and misplaced parts, so the firing chain was irreparably broken. Other free models have different pieces missing, including one egregious example with no centre/forward toggle link, so the innards can be seen.
I'm in the process of cannibalising and Frankensteining disparate models (even had to resort to Blender to get a working Collada DAE import into Poser, via OBJ, which supports Collada in name only, IMVHO (Boo, Hiss). I now hate SketchUp with a passion (mostly 'cause I can't afford a version which I can export from). I've even found versions of the Luger which can be 3D printed (though only in mechanical terms, not as an actual weapon)
I am constantly astounded by the brilliance and genius level inventiveness of mankind's passion for killing other humans. If only it could be transmogrified into more productive endeavours, like
bug-free software[No, Bad Hand!]
F_Verbaas last edited by
Not sure what will happen if you define your spring with a very cmall radius of the wire, say 1/10th of original, at the core, and applied thickness using a displacement value. of 0.45* the diameter of the wire.
The displacement would not be affected by the scaling (I presume) so the flattening would affect only the geometry and the flattening of the total wire would be limited.
There will be a deformation on the surface of course but as long as you do not have a distinct surface texture that will likely go unnoticed.
All right, because I was curious:
The morph isn't 100% mathematically exact, but it should work for the purpose.
You can download it from SASHA's site:
karina last edited by karina
Sorry for apparently ignoring your previous post, but I wanted to post the spring first.
Though I don't like the Luger very much because it's a German weapon, it is indeed a technically very interesting construction because of it's folding breechlock technique.
As you said, over-complicated and prone for errors. No wonder it was replaced by the Walther P-38 in the late 1930's. (though I like the thought of the Germans coming to Russia still equipped with the Luger - would have made the fighting much easier for my grandfather who served in the 3rd Ukrainian Front 1943-45).
Speaking of that, and because I mentioned the AK before, you are absolutely right:
If mankind would invest only 1% of their ingenuity into making this planet a better place to live instead of producing killing machines,,,
But I think this is Utopia.
As much as "bug free" software is XD
If you could need little assistance with your Luger project, just ask. I'm quite good with props in Poser.
shvrdavid last edited by
Many people don't know that the Luger was an "improvement" on another gun that used a toggle action, the Borchardt C-93.
The Borchardt C-93 was the first mass produced semi auto as well. It wasn't a very good design either....
Ha, you're right!
I almost forgot about that clumsy beast.
But speaking of the P08, there was another ordnance predecessor, the "Mauser C96".
Though it was technically a completely different working of the receiver, it may still serve as a good example for all the weird constructions invented before J.M.Browning's construction principle of the sliding receiver became the standard.
Reminds me of the battleship designs at around 1900 when a lot of inconventional, but utterly impractical ships were designed (and!) even commissioned .
The decisive breakthrough came with "HMS Dreadnought" which revolutionized battleship design ever after.
Like "Browning" did with his pistols, and later "Colt" with the M1911. They set the base mark.
I think handgun design hasn't changed much since then.
(and don't mention any "plastic toys" like Glocks etc - those aren't real weapons- but still work by the same old design)
Hey - good to see I'm not the only gun buff here!
anomalaus last edited by
@f_verbaas yes, that is, essentially, parameterising the helicoid (zero thickness path) of the spring as [ c.t, R.sin(t), R.cos(t) ], where R is the spring radius. The spring thickness (r) is applied to the helicoid as a surface normal displacement after the scaling (c) is calculated.
Displacement won't be affected by scaling provided the morph is applied after the transforms (afterBend flag set).
I think for existing spring props, I will have to analyse and provide some inputs, like R (helicoid radius = (OutsideDiameter + InsideDiameter)/4), r (spring wire radius = (OutsideDiameter - InsideDiameter)/2), chirality (CW or ACW spiral) and number of turns. A python script should be possible to derive an axial scaling morph.
@karina there's soooo much conflicting information about historical weapons, that I thought I should share this link. I don't expect it to change anyone's opinions, especially when there's family history involved.
I get most of my weapons intel via Quora, where much care must be taken to winnow opinion from fact.