Is there something like Geometry- and Attachment constraint??

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
  10 October 2009
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
 
  10 October 2009
Originally Posted by ray: 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)

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.

Originally Posted by ray: The next problem then would be to find a good data structure for the uv->triangles lookup

Regarding that, I think I'm on to something:

http://vimeo.com/6977085

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
__________________
website | twitter

 
  10 October 2009
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)
__________________
Jester

Latest thread:


Fauna

Vampyre Portrait

Girl in Hood


Vampyre Hunter I
 
  10 October 2009
Originally Posted by j3st3r: 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).
__________________
Come, Join the Cult http://www.cultofrig.com - Rigging from First Principles
 
  10 October 2009
Thumbs up

Looks good so far ShaderOp. Keep going
__________________
Over one hundred polygons
 
  10 October 2009
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.
__________________
-----------------------------
Eric Thivierge
http://www.ethivierge.com/
http://www.exocortex.com/Species/
 
  10 October 2009
if you use the UVs as direct input, you look for the closest boundary.
__________________
Come, Join the Cult http://www.cultofrig.com - Rigging from First Principles
 
  10 October 2009
Originally Posted by EricTRocks: 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.

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.

Originally Posted by EricTRocks: Just wanted to see what your thoughts were on this and whether the script take this into account.

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.
__________________
website | twitter

 
  10 October 2009
@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.
__________________
-----------------------------
Eric Thivierge
http://www.ethivierge.com/
http://www.exocortex.com/Species/
 
  10 October 2009
Feedback needed

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.

http://www.vimeo.com/7118685

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
__________________
website | twitter

 
  10 October 2009
It looks good to me. would it have tangency and normal controls too?
__________________
Over one hundred polygons
 
  10 October 2009
Originally Posted by pooby: It looks good to me. would it have tangency and normal controls too?

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.
__________________
website | twitter

 
  10 October 2009
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:

http://cid-485226d6dd07a5e2.skydriv...x64.dll.rc1.zip

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.
__________________
website | twitter

 
  10 October 2009
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/uvgeo....1.xsiaddon.zip

Source code repository: http://bitbucket.org/shaderop/uvgeometryconstraint/
__________________
website | twitter

 
  10 October 2009
Nice work. Hope U're feeling better!

Thanks for making the source code public also. I'll so dig into it
 
Thread Closed share thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 08:22 AM.


Powered by vBulletin
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.