Brilliant little script. Thank you very much.
Where do I put this so that Soft loads up with it under Constrains tab?
Brilliant little script. Thank you very much.
Where do I put this so that Soft loads up with it under Constrains tab?
Someone asked for an on/off switch to be added to the constraint. I added that yesterday and updated the file and plug-in version. Just redownload the file and make sure you have version 1.1 and not 1.0.
How cheeky would it be to request a blend slider too?
Thank you 
If you place it in the plug-ins directory, then it should install under the Constrain tab in the MCP panel by default, under the label “To polygon mesh surface.” Send me an PM if it’s not working for you.
Not cheeky at all 
But how do you see using it? I imagine the main use case being the ability to blend between this constraint and another, like a pose or position constraint. I tried doing that yesterday and got a “Cycle breaking point” warning. It continues to work, and it does blend between the constraints, but because of the warning message I think it’s best to be safe rather than sorry and just keep it as it without blending support.
Am I correct in assuming that blending between constraints would be the main scenario here? And did I make any kind of sense?
Thanks, it works perfectly!
They guys here at Luma are very excited about this script…Thank you again.
Am I correct in assuming that blending between constraints would be the main scenario here? And did I make any kind of sense?
Yes, but also just blending back to its original keyed location before it stuck to the nearest surface.
I managed to add blending, but the catch is that you’ll need to constrain the object between a surface and another object.
Here it is in action: http://vimeo.com/6872514
Info and download are on the same page as before: http://shaderop.com/softimage/geometry-constraint/
Please note you will need to overwrite the old file with the new one. Objects using the old geometry constraint should continue to function just fine.
Really nice work ShaderOp.
I cant seem to get the new blended version to work though.
I select the object to be constrained, select the poly surface, then the other mesh, as demoed in the video. Script editor gives me this error message:
// WARNING : Scripted operator creation canceled.
SO_ApplyBlendedGeometryConstraint();
Am I doing something wrong here? The non blended geometry constaint script works fine.
XSI 7.01, but tried in trial 2010 and same thing.
Cheers.
I should have made it clearer in the video. Sorry about that. Anyways, Here’s how to do it…
Select the object to be constrained, click the menu item, left mouse click on the constraining surface, then middle mouse click on the constraining object.
It should work then. PM me if you’re still having problems.
Ah great, works fine. I should have noticed at the bottom of the screen, that middle click was needed.
Thanks for the clarification.
Mohammad, this is wonderful! Thank you so much for doing this! If you ever find yourself in the mood to take it a step further, any chance we could get the option to instance the to-be-constrained object so we can scatter them across the surface? (I’m assuming this would require the use of Softimage “models.”) I’m thinking either random placement, like we’d see in a forest of trees, or uniform placement as we’d see by constraining rivets to a curve. (If we could constrain to a mesh’s edge, and have those objects move accordingly when sub-divided, I’d fall over with happiness!)
If you can do all this, you could release it as Softimage 2010 SP1 as far as I’m concerned. 
Thanks David 
I did a quick little test to make sure, and yes, it is possible to use this constraint on a cloned object. And since cloned objects have their own kinematic state, they can move independently of the original.
So in principal, it can be done, but I’m not too sure about the specifics of your request. Would you mind elaborating a bit?
Here’s the workflow I was thinking about:
Say, for example, you have an airplane fuselage and you want to put some rivets along the various section seams. It would be great to be able to select one of the edges as a path, then invoke your tool, select a rivet model and have your tool create instances of that along the edge. Options would include total number divided evenly, number per point span, or something like that.
The second with was to be able to do the same thing on a surface. In that case, you’d select the surface, invoke your tool, choose the model and then choose setting with regard to number of instances and placement randomization. Say, for example, 0% randomization places the instances in a perfect array, whereas 100% places them totally randomly. (Of course no two instances would ever be placed at the same point.) 
Does that make more sense?
It does make a lot of sense actually.
I think I have an idea. It’s not exactly what you want, but it would probably be more general, and hopefully more useful. I’ll see if I can run a few tests this weekend.
I have a feeling that something very usefull will come from this.
Thanks again ShaderOp…for all your effort.
That’s exactly the kind of stuff that ICE does really well at
And would be a lot leaner than generating a ton of geometry or N instances instead of a single point cloud of size N.
Say, for example, you have an airplane fuselage and you want to put some rivets along the various section seams. It would be great to be able to select one of the edges as a path, then invoke your tool, select a rivet model and have your tool create instances of that along the edge. Options would include total number divided evenly, number per point span, or something like that.
An offset value would be good also.
That is my number one issue…how to have the best of Nurbs, Solids and Polygons(SubD’s) modeling in one place.
In several CAD packages it is possible to use a line to do that easily , even with History and follow any later change in surface topology.
Don’t thank me yet. I already have one failed idea under my belt 
Anyways, the idea I had in mind was trying to find a way to constrain an object to a mesh, but use the UV coordinates of the mesh to control the constrained object’s position. Sort of like the built-in surface constraint, but for polygonal meshes.
To better illustrate my point, here’s what can already be done with the built-in surface constraint:
If the same thing can be done with polygonal meshes, then it would be a lot more flexible, since a polygon mesh can have multiple UV maps and you can lay them out however you please.
So if this hypothetical constraint existed, you would need to specify the constraining geometry and the UV map, and then just animate or position objects by changing the UV coordinates on the constraint.
That’s the idea I had in mind, but it’s not easy to implement. Biggest issue is mapping a point on the UV map to the corresponding position on the mesh’s surface. There’s away to obtain the UV coordinates from the XYZ coordinates on a surface (sort of at least), but not the other way around. At least none that I could find in the SDK.
Thoughts? Ideas?