Of course I don’t mind! If anything, I’m grateful for all the work you’re doing to keep that list up to date.
Is there something like Geometry- and Attachment constraint??
Wouldn’t this approach limit the “randomness” to only where a UV existed? It seems to me that unless the mesh was extremely dense, it might be pretty easy to spot the UV pattern. Imagine a grid of 8 by 8. If you then applied some rivets to that based on the UV map, would they end up scattered along the UV lines only?
No, that shouldn’t be an issue. At least it wouldn’t be if things work out.
The only feature I will not attempt to touch is having it work with live subdivided surfaces. The workaround would be the same one suggested with the geometry constraint plug-on, and that is to apply the “mesh subdivide with center” operator to the mesh, and then use the resulting object as the constraining mesh. I hope that would be a reasonable compromise.
just realized—I never tried this, but there could be a chance things with subdivs might work out transparently when you use CGeometryAccessor with the current subdiv level as the in_subdLevel parameter.
(This is assuming it works as advertised and I didn’t completeley misunderstand the sdk docs)
The next problem then would be to find a good data structure for the uv->triangles lookup
I haven’t tried it myself, but that’s not the problem really. The issue is that I’m relying heavily on the Point Locator API, which doesn’t have any provisions for querying for point locators on the subdivided mesh. At least none that I can find.
Regarding that, I think I’m on to something:
The video above shows a very naive implementation of a scripted operator that constraints an object to a point on the surface of a polygonal mesh determined by the U and V coordinates on the mesh’s texture map.
It’s working well I think. But it will not follow the surface if the constraining geometry is deformed. And the data structures were pre-generated using an external python script.
I’ll try to finish it as time permits, but I doubt I’ll have any time to spare for the next week or so due to some crunch time coming at work.
That said, I think it looks very promising so far. Fingers crossed 
I haven’t read the whole thread so far but it’s easy task with the Object To Cluster constrain.
Just select the object to constrain, then the object with component to constrain, and select the component (all is suggested in the mouse status line)
Then adjust the Tangency and the normal. That’s all. It’s included at leaste since v 4.2 (when I started with softimage)
Object to cluster will only take a component or the average of several as in input.
Constraining to a mesh and offering access to barycentric interpolation on face is a whole different deal and isn’t possible out of the box (outside of ICE that is, which doesn’t offer supported kine access yet).
So what happens if the input U/V coordinate falls on an empty section? Maya’s rivet setup goes nuts and it defaults to an odd location. Same if you cross over an empty section back to a section that has UVs laid out in it.
Just wanted to see what your thoughts were on this and whether the script take this into account.
Eric T.
That’s a valid concern. Unfortunately, I don’t have a concrete answer at this stage. Aside from the small test posted earlier in this thread, all I have is an idea that seems to make sense to me, and it should work reasonably well in the scenario you’ve mentioned.
Thank you. Any chance to get out of the echo chamber and bounce ideas around is highly appreciated.
I should mention that’s it’s no longer a script
I’m writing this one as a compiled plug-in, and it’s taking me a while to get back on the C++ saddle. As I mentioned before, things are a little busy at work these days. But I’m still able to put an hour or so of work into this every day. If anyone feels like geeking out, you can view the source code at this repository hosted on bitbucket.org.
@Jaco: Cool. Wish the rivet script did that. Would have helped a lot while I was back in school.
@ShaderOp: Glad the discussion helps you. It’s great to see more people building plug-ins and scripts for Softimage. Look forward to seeing more of your work.
Cheers,
Eric T.
Hi everyone,
I think I have a working solution for the UV geometry constraint. But I would greatly appreciate some feedback at this stage.
The following video shows a cylinder with a nontrivial texture map and a null constrained to the surface of the cylinder, with its position controlled by the UV coordinates.
Shown above is the behavior when the UV parameters move across gaps in the texture map. I think the behavior is decent given the irregularity of the map. But that’s just my opinion.
If you guys (and gals) think it’s usable, then I can finish it up, as there isn’t much work left to make this into a proper plug-in. Otherwise, I think I ought to cut my losses and move on to something else.
Either way, it was an interesting ride 
No, I haven’t worked on those yet. Aligning to normals is doable, but I’m not sure about tangency.
These two features aside, only thing missing right now is the command to wire up the constraint. I could have that done and release the plug-in by tomorrow or the day after. And depending on feedback, figure out a sensible way to implement normal and tangency controls. I would rather do take that route than keep hacking at it until I get all the features in.
BTW, I don’t have access to 7.0, and I don’t know if plug-ins compiled against 7.5 are backward compatible with 7.0. I also don’t have access to a Linux machine, and even if I did, my subscription is Windows only. So if anyone can volunteer to build binaries for 7.0 and Linux, I would be very grateful.
Happy Windows 7 and SI2010 SP1 launch day everyone!
Sorry for missing my self-imposed deadline, but I’m not feeling too well these days.
Regardless, I’ve managed to finish up the basic features. You can download the plug-in from here:
Unfortunately, I wasn’t able to build a 32-bit version, but I’ll get around to this as soon as I can.
About the plug-in: Install it by extracting the only file in the zip archive into your plug-ins folder, just as you would with any regular JS or Py plug-in. Once that is done, you should see a new menu item under the Constraints menu in the MCP, titled “UV Geometry Constraint.”
Under that you’ll find two submenu items, “Generate UV to Geometry cache” and “Constrain to Geometry using UV coordinates.” You might have noticed that capitalization is all over the place, and I promise you it will get fixed as soon as I regain most of my currently misbehaving brain cells.
Using the constraint is a two-step process:
Step 1: Setting up the constraining object:
Prerequisites: Constraining object should be a polygonal mesh with one or more texture maps.
a. Select the object you’ll be using as a constraining object. Invoke the aforementioned “Generate UV to Geometry cache” menu item.
b. A dialog box will appear asking you to select a cache map resolution and a texture map. The default resolution of 256x256 should be good enough for most cases.
c. Click OK and wait for a few seconds.
d. Once the command is finished, you should see a new property created under the constraining object with a name that starts with "UvToGeoCache_"
Step 2: Apply the constraint to the constrained object
a. Select the constrained object(s).
b. Run the “Constrain to Geometry using UV coordinates” menu item.
c. This will start a pick session. Go to the explorer and pick the property that was created in Step 1 above (the one with a name beginning with “UvToGeoCache_”.
d. Done! Navigate to the kine.global property of the constrained object, where you should know see a scripted operator named “SO_UvGeometryConstraintOperator” under it. Inspect it, and play with the U and V parameters.
Feedback is always appreciated, and I’ll do my best to finish the remaining work as soon as I feel better.
Hi everyone.
Apparently I f-ed up big time with my last post, since the provided DLL had a serious bug that rendered the whole plug-in unusable. That is all fixed now, and there’s also a 32-bit build.
Watch the demo here: http://vimeo.com/7226590
Info page: http://shaderop.com/softimage/uv-geometry-constraint/
Direct download: http://bitbucket.org/shaderop/uvgeometryconstraint/downloads/SO_UvGeometryConstraint_v1.1.xsiaddon.zip
Source code repository: http://bitbucket.org/shaderop/uvgeometryconstraint/
Nice work. Hope U’re feeling better!
Thanks for making the source code public also. I’ll so dig into it 
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.