View Full Version : help w/ script idea and pointOnSurfaceInfo
05-07-2003, 11:31 PM
I am wondering if it is possible to have an underlying surface (lets say a plan for ease) with geometry on top of it and for every piece of geo on the surface get the pivot point of each and call on the pointOnSurfaceInfo to create a locator and an aim constraint (ala rivet script on highend) and then parent each to the corresponding rivet.
I was thinking of using a for in loop by
getting all of the selected geometry to be riveted and cycle threw them getting there pivot points selecting the surface point on the surface and running the rivet script.
1.Is there already something that will do this? ( I don't want to reinvent the wheel)
2.Does my approach sound reasonable? Are there better ways to do it? (as I am new to this)
3.What approaches have other people here used in the past? How did they
05-07-2003, 11:34 PM
What is the effect that you are going for?
05-08-2003, 01:54 PM
The main problem you will have is figuring out what % on the POS node will yeild the right spot relative to the original object.
ie: do a rivet loop is easy. But figuring out what that surface point is etc, will be tricky. One cheat, not sure, is I think may the surface constraint already uses POS. First off you may just one to do a surface constraint, but if not, you might be able to do one temporarily, read the POS node data, then blow it away, and create your own with similar values.
That or do some brute force loop test to see what values yield the closest distance results.
05-08-2003, 06:33 PM
Thanks for the advice. Yeah after a little thinking I wasn't sure how I would get the pointOnSurface with the pivot point from another object. What I could do is just select all the surface points by hand (it wouldn't be to laborious) then convert the rivet script so that it will work on more than one selection. Then simply parent all of the geo to the rivets(by hand). I guess I could name them accordingly and use a loop to parent them by name.
Finally as requested....this is what I am after. I have to make a planet with a wack of tectonic plates covering it. (they should slide around a bit) a meteor hits it and spills out magma and chunks of debris. (a ton of emitters w/ instanced geo) that form into rings around the planet.
When the Mtr hits the planet the plates should slide and LOOK like they are buckling. (I don't even want to try this with rBodies, I just want to be able to deform the underlying sphere with various deformers to affect the plates on the surface...and hand animating a few if needed.)
I have thought about doing this by simply emitting particles from the surface and instancing geo but ....I don't get a great deal of placement control. The clients are pretty specific into what they are wanting it to look like. i.e.; the surface must be cracked with a number of circular placed plates. (I hope that makes sense)
As for placement of the plates I thought of simply making a blendShape of a sphere (planet) into a corresponding plane. Place all of the plates on the plane for easy placement. Make all of the rivet constraints on the plane and blendShape back into the sphere. When placement is ok ...blow away the blendShape.
Does my plan sound ok....am I making this to complex?
Are there better ways?
05-08-2003, 06:56 PM
>>> The clients are pretty specific into what they are wanting it to look like. i.e.; the surface must be cracked with a number of circular placed plates. (I hope that makes sense)
>>>As for placement of the plates I thought of simply making a blendShape of a sphere (planet) into a corresponding plane. Place all of the plates on the plane for easy placement. Make all of the rivet constraints on the plane and blendShape back into the sphere. When placement is ok ...blow away the blendShape.
I'm not quite following why you need to have the blendshape and I think it is unneccessary.
What I would do I think is to first create or get a drawing from the client as to how they want to cracks to look like and then just model them into a sphere. You could do this by projecting curves onto surface etc.
From what you are describing above you are trying to modle them on a flat plane and then uuse the blendshape to deform the plates back into a spherical shape.. while this might be possible I think it will have too many unexpected problems to be worthwhile.
Or am I totally off to what you are talking about?
Anyway once you have all the plates modelled group them individually this makes their center points the same as the planet and then you can rotate them around or rotate them on their more local axis for buckling effects.
I tmight be fun to try use rigid body dynamics.. try placing a smaller and a larger sphere so that the plates are sandwiched in between and amke them passive collision objects. Leave so romm for the plates to move around ..could be pretty cool and/or really really slow.
05-08-2003, 10:37 PM
I'm not quite following why you need to have the blendshape and I think it is unneccessary. >>
Yeah it may not be necessary. The only reason the blendShape is there is to try and make life easier, to work/model on a flat plane (like laying out tiles) than work on a sphere. I am still in an RnD stage and have not committed to any one approach. One thing that it doesn't do is conform the plates to the sphere meaning that they do not take on the shape of the spheres curvature. So this is a pretty big deal, I would need the plates to take on the sphere curvature I thought a simple wrap deformer would work....but it didn't, why it didn't I am not to clear on at this point. So the idea will not work until I can get the plates to conform to the sphere.
as for projecting curves on the surface...I am not to sure how the workflow would be. I believe that it would be a huge amount of work cleaning up the verts and all that. As I am assuming that you would make curves...loft them or planner them? How would you do this?
Your rigid body idea sounds koOl but I am really trying to steer away from a heavy simulation.
Thanks for the response.
I am still thinking. Still listening. ;)
05-08-2003, 10:52 PM
>>>as for projecting curves on the surface...I am not to sure how the workflow would be. I believe that it would be a huge amount of work cleaning up the verts and all that. As I am assuming that you would make curves...loft them or planner them? How would you do this?
Well draw or project the curves onto the sphere and then break it up into a a bunch trims.. make a copy of the trims and scale them down and then make lofts between them.
At some point you'll want to convert everything to polys so that you don't have all these trimmed surfaces.
What version of Maya are you using?.. I haven't done any real world tests but supposedly maya 5 has faster dynamics.
Anywho.. if you didn't use dynamics I think it wouldn't be too hard to animate the plates by hand...however tedious depending on how many there are.
05-08-2003, 11:04 PM
Yeah, trims would work....I generally don't like using them but in this instance it may be the best way.
We are using Maya 4.5 for this project.
As for animating by hand..i think I would prefer to do it this way. As with the other idea..surfaceInfo/rivet constraint... the idea was to be able to deform the sphere underneath and due to the rivet the plates would follow and if I needed to I could hand animate any kind of secondary animation.
01-15-2006, 03:00 AM
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.
vBulletin v3.0.5, Copyright ©2000-2014, Jelsoft Enterprises Ltd.