Creating Type of Cord

Discussions regarding modelling with SOFTIMAGE©
Jesse
Posts: 30
Joined: 18 Jun 2009, 21:51

Re: Creating Type of Cord

Post by Jesse » 13 Oct 2012, 03:27

Another option you can try is to animate a null spiraling the way you would like (null 'a' offset and parented to null "b" then rotating and translating null "b" upwards for example) then plot animation as a curve and extrude along curve. I use animation to generate spiraling shapes all the time.

Falam

Re: Creating Type of Cord

Post by Falam » 13 Oct 2012, 03:55

Jesse wrote:Another option you can try is to animate a null spiraling the way you would like (null 'a' offset and parented to null "b" then rotating and translating null "b" upwards for example) then plot animation as a curve and extrude along curve. I use animation to generate spiraling shapes all the time.
I don't need a spiral shape.

Jesse
Posts: 30
Joined: 18 Jun 2009, 21:51

Re: Creating Type of Cord

Post by Jesse » 13 Oct 2012, 04:17

then a coil or helix, or whatever you want, I'm just saying that you can derive a curve from animated nulls (or any other object) and that can easily give you your foundation for an extrude along curve operation.

Falam

Re: Creating Type of Cord

Post by Falam » 13 Oct 2012, 05:05

Jesse wrote:then a coil or helix, or whatever you want, I'm just saying that you can derive a curve from animated nulls (or any other object) and that can easily give you your foundation for an extrude along curve operation.
I know I can extrude from a curve, that is not the problem at heart, your solution I can't extrude from three curve profiles, one for the radius of the curve, the other for the extrusion and a final for the profile of the extrusion.

Jesse
Posts: 30
Joined: 18 Jun 2009, 21:51

Re: Creating Type of Cord

Post by Jesse » 13 Oct 2012, 05:23

I'm not sure I understand:
*Edit* why would you need 3 curves? You need one profile and one path, I'm saying use animation to generate the path. I used the nulls in the image below to generate the coil curve
cordsoft.jpg
testcord.jpg

Falam

Re: Creating Type of Cord

Post by Falam » 15 Oct 2012, 00:04

Jesse wrote:I'm not sure I understand:
*Edit* why would you need 3 curves? You need one profile and one path, I'm saying use animation to generate the path. I used the nulls in the image below to generate the coil curve
cordsoft.jpg
testcord.jpg
The results are exactly what I want. I created two nulls and made one of the nulls the parent, then I created the spiral curve within Softimage Curve > Spiral etc. Constrained path the null to the curve, plotted out the curve, after animating the PathCNS, then created a disc and did extrude along path, my results not even close, to yours. If I create the spiral with the null by hand, it's frustrating. I don't understand the second null as a child of the first null and why it needs to be offset, something I'm obviously missing, nice technique I need it to work.

[rimg=]http://i.minus.com/j30ZLvH11eSCu.jpg[/rimg]

Jesse
Posts: 30
Joined: 18 Jun 2009, 21:51

Re: Creating Type of Cord

Post by Jesse » 15 Oct 2012, 05:28

Hrmm, yeah sorry, it's a bit tough to explain cus it's more of an animation thing, I also miss-used the term spiral I simply meant the spring/coil shape you needed. What you want to do is animate 1 null at least 360 degree's on Y (I did 1080). then translate it up on Y also (can't recall how far I translated up but it doesn't take much, this will determine how tight the coil is). Then you need to parent another null a few units outward on x (this will determine the width) to the animated one. Make sure your animation is all linear. Plot the path (Animate>Plot>animation curve I think, I could be missing a step in the menu) of the outer null, and that should give you your curve.

Draw your profile shape out and extrude it along the path.

IF THE PATH TWISTS (this can happen sometimes) Duplicate the profile shape out multiple times and constrain them to the path evenly and loft (I use constrain to path because it has tangent and up vector options so I canget the alignment I need).

To evenly distribute multiple profile curves first constrain your copies to the curve under constraint menu. They'll all stack at the beginning so you'll have to select them all and open the constraint ppg, in the input that moves them along the path type, L(0-1) . This should distribute each copy along the curve evenly, you may want to make a decent number of copies depending on the number of spans you want when you loft. And don't forget to turn up vector and tangent options on to control orientation.

But yeah after that just loft em.

Falam

Re: Creating Type of Cord

Post by Falam » 16 Oct 2012, 04:12

Jesse wrote:Hrmm, yeah sorry, it's a bit tough to explain cus it's more of an animation thing, I also miss-used the term spiral I simply meant the spring/coil shape you needed. What you want to do is animate 1 null at least 360 degree's on Y (I did 1080). then translate it up on Y also (can't recall how far I translated up but it doesn't take much, this will determine how tight the coil is). Then you need to parent another null a few units outward on x (this will determine the width) to the animated one. Make sure your animation is all linear. Plot the path (Animate>Plot>animation curve I think, I could be missing a step in the menu) of the outer null, and that should give you your curve.

Draw your profile shape out and extrude it along the path.

IF THE PATH TWISTS (this can happen sometimes) Duplicate the profile shape out multiple times and constrain them to the path evenly and loft (I use constrain to path because it has tangent and up vector options so I canget the alignment I need).

To evenly distribute multiple profile curves first constrain your copies to the curve under constraint menu. They'll all stack at the beginning so you'll have to select them all and open the constraint ppg, in the input that moves them along the path type, L(0-1) . This should distribute each copy along the curve evenly, you may want to make a decent number of copies depending on the number of spans you want when you loft. And don't forget to turn up vector and tangent options on to control orientation.

But yeah after that just loft em.
How did you create the curve so successfully ?:) When I do it manually it turns out horribly, trying to get it nice on all three axis, on the Y. When I use a implicit curve, and I add more angles, well the image can speak for it's self :)

Image

Is is a good technique, although I'm having difficulty, especially trying to get the curve as nice as Jesse did. iI would be nice if there was a script to do this, just to speed things up.

User avatar
AceMastermind
Posts: 160
Joined: 15 Jun 2009, 00:57
Contact:

Re: Creating Type of Cord

Post by AceMastermind » 28 Dec 2012, 02:36

It seems you are confused by Jesse's instruction. It looks like you're trying to generate the geometry from a spiral object(Primitive>Implicit>Spiral), that's not what he said to do. If you want to get a coil curve like Jesse's then do this, for example:

Code: Select all

Application.GetPrim("Null", "", "", "")
Application.SetValue("null.Name", "AnimatedNull", "")
Application.GetPrim("Null", "", "", "")
Application.Translate("", -3, 0, 0, "siRelative", "siView", "siObj", "siXYZ", "", "", "", "", "", "", "", "", "", 0, "")
Application.SetValue("null.Name", "ChildNull", "")
Application.CopyPaste("ChildNull", "", "AnimatedNull", 1)
Application.SelectObj("AnimatedNull", "", "")
Application.SaveKeyOnKeyable("AnimatedNull", 1, "", "", "", False, "")
Application.SetValue("PlayControl.Key", 30, "")
Application.SetValue("PlayControl.Current", 30, "")
Application.Rotate("", 0, 1080, 0, "siAbsolute", "siPivot", "siObj", "siY", "", "", "", "", "", "", "", 0, "")
Application.SaveKeyOnKeyable("AnimatedNull", 30, "", "", "", False, "")
Application.Translate("", 0, 7, 0, "siRelative", "siView", "siObj", "siXYZ", "", "", "", "", "", "", "", "", "", 0, "")
Application.SaveKeyOnKeyable("AnimatedNull", 30, "", "", "", False, "")
Application.SetValue("PlayControl.Key", 1, "")
Application.SetValue("PlayControl.Current", 1, "")
Application.SelectObj("ChildNull", "", "")
Application.ActivateObjectSelTool("")
Application.PlotCurve("ChildNull", "CurveFromChildNull", 1, 30, 1)
Application.SelectObj("CurveFromChildNull", "", True)
This only creates the curve from which you will extrude the profile curve which creates the geometry.

Falam

Re: Creating Type of Cord

Post by Falam » 28 Dec 2012, 05:29

AceMastermind wrote:It seems you are confused by Jesse's instruction. It looks like you're trying to generate the geometry from a spiral object(Primitive>Implicit>Spiral), that's not what he said to do. If you want to get a coil curve like Jesse's then do this, for example:

Code: Select all

Application.GetPrim("Null", "", "", "")
Application.SetValue("null.Name", "AnimatedNull", "")
Application.GetPrim("Null", "", "", "")
Application.Translate("", -3, 0, 0, "siRelative", "siView", "siObj", "siXYZ", "", "", "", "", "", "", "", "", "", 0, "")
Application.SetValue("null.Name", "ChildNull", "")
Application.CopyPaste("ChildNull", "", "AnimatedNull", 1)
Application.SelectObj("AnimatedNull", "", "")
Application.SaveKeyOnKeyable("AnimatedNull", 1, "", "", "", False, "")
Application.SetValue("PlayControl.Key", 30, "")
Application.SetValue("PlayControl.Current", 30, "")
Application.Rotate("", 0, 1080, 0, "siAbsolute", "siPivot", "siObj", "siY", "", "", "", "", "", "", "", 0, "")
Application.SaveKeyOnKeyable("AnimatedNull", 30, "", "", "", False, "")
Application.Translate("", 0, 7, 0, "siRelative", "siView", "siObj", "siXYZ", "", "", "", "", "", "", "", "", "", 0, "")
Application.SaveKeyOnKeyable("AnimatedNull", 30, "", "", "", False, "")
Application.SetValue("PlayControl.Key", 1, "")
Application.SetValue("PlayControl.Current", 1, "")
Application.SelectObj("ChildNull", "", "")
Application.ActivateObjectSelTool("")
Application.PlotCurve("ChildNull", "CurveFromChildNull", 1, 30, 1)
Application.SelectObj("CurveFromChildNull", "", True)
This only creates the curve from which you will extrude the profile curve which creates the geometry.
Are one of the nulls suppose to animate from that script ? I get an error on Line (6) all that is in the scene is two nulls, that do nothing.
Error on line (6) when I run the script, I have (2) nulls, that's it.

User avatar
AceMastermind
Posts: 160
Joined: 15 Jun 2009, 00:57
Contact:

Re: Creating Type of Cord

Post by AceMastermind » 28 Dec 2012, 07:27

Maybe that line is different in your version of Softimage, this was done in Mod Tool 7.5. Drag any object over the other in an Explorer window to create a parent child relationship and see what gets logged in the script editor, then change line 6 accordingly.

Also, theres no need to keep quoting the entire post you're replying to if it's directly above yours.

User avatar
myara
Posts: 403
Joined: 28 Sep 2011, 10:33

Re: Creating Type of Cord

Post by myara » 28 Dec 2012, 09:01

The code is in Python and works well.

If you run it in JScript you'll get an error in the 8th line because JScript boolean uses Lowcase only and is case sensitive. Python uses the first character in uppercase (False) and is also case sensitive.

BTW, since this code is just a lot of xsi commands running one after another, if you change all booleans values it should work in Jscript. Not that anyone would care :P
M.Yara
Character Modeler | Softimage Generalist (sort of)

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests