exel Posted April 12, 2004 Share Posted April 12, 2004 Got a little home project going with a tricky little problem to tackle: I basically want to copy a set of points all over a polygonal object's surface, scattered randomly (and uniformly, if possible) -- much like using a Source POP to generate particles by "Surface (random)" or by "Surface (attribute/area)" -- I don't want to use POPs because: (A) don't want to have to "runup" the particle simulation whenever I want to create these points ( I want the points to move with their source geometry, whenever it scales/transforms/bulges/deforms/whatever (see picture below) --I'm open to anything -- VOPs, VEX code... just no simulations if possible. Anyone got any tips for me? Many thanks in advance! -JS- Quote Link to comment Share on other sites More sharing options...
edward Posted April 13, 2004 Share Posted April 13, 2004 What are you going to do with these points? How many points do you have? Quote Link to comment Share on other sites More sharing options...
mike Posted April 13, 2004 Share Posted April 13, 2004 maybe this helps.... Quote Link to comment Share on other sites More sharing options...
mike Posted April 13, 2004 Share Posted April 13, 2004 sorry rand_points.rar Quote Link to comment Share on other sites More sharing options...
exel Posted April 13, 2004 Author Share Posted April 13, 2004 maybe this helps.... Thanks Mike for offering your help! raying the points onto the surface is a decent idea, but it wouldn't work well for convex surfaces or complex shapes (a body with arms+legs, for example)... thx for the idea though! Quote Link to comment Share on other sites More sharing options...
exel Posted April 13, 2004 Author Share Posted April 13, 2004 What are you going to do with these points? How many points do you have? Hey, Ed-- Think home-made cheesy hair solution... I saw a thread in the General forum that had a decent solution, by splattering particles all over a surface, then setting their state to "stopped", and then creeping them onto the surface. That looked pretty great except that the creep surface has to be mesh or nurbs, right? How about a way to creep points onto a polygonal object, not by parametric U/V but by texture U/V, is there any way to do that? Quote Link to comment Share on other sites More sharing options...
michael Posted April 13, 2004 Share Posted April 13, 2004 wolfwood had the idea that you could use the 'sticky' behavior of the particles... Quote Link to comment Share on other sites More sharing options...
FrankFirsching Posted April 13, 2004 Share Posted April 13, 2004 Hi! Perhaps this is something for you (although it might be too slow) I'm using some expressions to put the points onto the object. First I create random barycentric coordinates in the x- and y-coordinates of the points. Their z-coordinate will be random, too, and will be interpreted as a primitive number into the object to rebuild. The second point-SOP will then place the points on the triangles using the formula position = P0 + bary1*edge1 + bary2*edge2 Drawback of this technique is, that it is pretty slow. And it only works on triangle meshes :-( Hope I could help you pointsOverPolyObject.hipnc Quote Link to comment Share on other sites More sharing options...
exel Posted April 13, 2004 Author Share Posted April 13, 2004 WOOHOO Yeah, that looks pretty good! Rather slow, but it's the best solution I've got so far! I Duped your crazy point expressions to work with the normals too, so far it's working out really nice, thanks so much! Your free case of beer will arrive within 4 to 8 weeks. Thanks very much! -JS- P.S. why didn't you think of this, Wolfwood! Quote Link to comment Share on other sites More sharing options...
edward Posted April 14, 2004 Share Posted April 14, 2004 Antoine just recently made me realize that you can generate uv's for points by simply using the collision pop. I'm sure there there's a way to do it with xyzdist() within some attribcreate sops but it's way too late for me. It was supposed to work with polygons too but I think the uv method for polygons isn't consistent between the collision pop and the primuv() function. So here's what I've got so far. I've added comments to all the operators so please read them. Hit play when you load the hip file for fun. even_birth.hipnc Quote Link to comment Share on other sites More sharing options...
mike Posted April 16, 2004 Share Posted April 16, 2004 maybe another solution, without long "cooking-times" point4hair.rar Quote Link to comment Share on other sites More sharing options...
mike Posted April 16, 2004 Share Posted April 16, 2004 ...and a picture.... ( it is only to show the points,not real hair ! ) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.