Tue, Jan 7, 12:12 AM CST

Renderosity Forums / Poser - OFFICIAL



Welcome to the Poser - OFFICIAL Forum

Forum Coordinators: RedPhantom

Poser - OFFICIAL F.A.Q (Last Updated: 2025 Jan 06 7:01 am)



Subject: Loop-making script


Spanki ( ) posted Thu, 15 April 2010 at 12:22 AM

Quote - Here's an update for the chain maker script.

Excellent work Cage (and others) - cool script!

Quote - ...I had to extend their UV's beyond 1.0 on v.  I'm sure this is probably frowned upon, but it does texture stretching, giving a final result with the correct proportions.

You may or may not know this, but any UV value beyond 1.0 will "wrap" back to the other side (tiling, not really stretching).  So for example a value of "1.2" would effectively texture the same as a value of "0.2".  This form of UV-mapping is particularly effective with 'tiled' (seamless) textures.

Cinema4D Plugins (Home of Riptide, Riptide Pro, Undertow, Morph Mill, KyamaSlide and I/Ogre plugins) Poser products Freelance Modelling, Poser Rigging, UV-mapping work for hire.


Cage ( ) posted Thu, 15 April 2010 at 12:35 AM

Quote - You may or may not know this, but any UV value beyond 1.0 will "wrap" back to the other side (tiling, not really stretching).  So for example a value of "1.2" would effectively texture the same as a value of "0.2".  This form of UV-mapping is particularly effective with 'tiled' (seamless) textures.

Interesting.  I assumed that setting a lower value for a tiled texture would spoil it.  If it loops back, then the code can be improved.  I'll tinker with it.  Thanks.

===========================sigline======================================================

Cage can be an opinionated jerk who posts without thinking.  He apologizes for this.  He's honestly not trying to be a turkeyhead.

Cage had some freebies, compatible with Poser 11 and below.  His Python scripts were saved at archive.org, along with the rest of the Morphography site, where they were hosted.


Spanki ( ) posted Thu, 15 April 2010 at 1:13 AM · edited Thu, 15 April 2010 at 1:15 AM

Sure thing.  The negative values also wrap, btw... a value of -0.2 would be the same as 0.8 (for example).  Note that this wrapping (tiled texturing) is a function of the application in question - Poser in this case, but most other 3D apps as well - but in most UV-editing utilities/apps (UVMapper, BodyPaint, etc), you'll see the UV polygon outlines drawn outside of the 0.0 -> 1.0 space.

Cinema4D Plugins (Home of Riptide, Riptide Pro, Undertow, Morph Mill, KyamaSlide and I/Ogre plugins) Poser products Freelance Modelling, Poser Rigging, UV-mapping work for hire.


Cage ( ) posted Thu, 15 April 2010 at 12:26 PM · edited Thu, 15 April 2010 at 12:28 PM

My experiments suggest that the coordinate effectively wraps around, as you say, but with a scaling factor inherited.  Right now I extend the long polygons proportionately, rounding up to the nearest integer value.  The rounding accomodates the wrapping.  But if 1.2 == 0.2, then 4.0 should equal 1.0.  And 1.0 is seen previously (an image posted earlier in the thread) to produce compressed textures, whereas 4.0 scales them appropriately.  So "stretching" is not the correct term, perhaps, but that seems to be what effectively happens.  There's wrapping and there's scaling, apparently.  Compare the "sparse" link in the image, twelve posts above this one, to the sparse link in the image four posts above.  The 1.0 and 4.0 values are aligned (wrapped to the same v position), but differently scaled.  Presumably going out of bounds in the negative would flip the UV's for the texpoly, while scaling.

I assumed going out of bounds was an incorrect approach, primarily based on UV Mapper's prompting to place texvertices in-bounds when it finds any out-of-bounds, upon opening a file.  It's good to know that it is common practice.  I won't feel flinchy about using the approach.

===========================sigline======================================================

Cage can be an opinionated jerk who posts without thinking.  He apologizes for this.  He's honestly not trying to be a turkeyhead.

Cage had some freebies, compatible with Poser 11 and below.  His Python scripts were saved at archive.org, along with the rest of the Morphography site, where they were hosted.


Spanki ( ) posted Thu, 15 April 2010 at 1:18 PM

I'm not quite sure how to respond to your scaling issue (at least without looking into it with respect to Poser's interpretation), but from my past experience, a 1.0 value and a 4.0 value should produce the exact same results.  If it's not, then it may be something specific to Poser.

re: out-of-bounds...

Yeah, UVMapper does bring up that dialog when it senses values outside the 0.0 -> 1.0 range, but you can just cancel that dialog and it's perfectly happy to deal with (display) them as expected.  I often use 'tiling' to (for example) move the Head UVs out a tile, to separate them from the Body UVs (and Transmap UVs and Mouth/Teeth UVs, etc. - each get moved out into thier own tiled space), so they aren't all piled up on top of each other (visually).  If you do that, Poser (and other apps) still work(s) fine.

Cinema4D Plugins (Home of Riptide, Riptide Pro, Undertow, Morph Mill, KyamaSlide and I/Ogre plugins) Poser products Freelance Modelling, Poser Rigging, UV-mapping work for hire.


Spanki ( ) posted Thu, 15 April 2010 at 1:35 PM · edited Thu, 15 April 2010 at 1:38 PM

...erm... wait - I think I understand what you' talking about re: scaling....

Let's say that you have a square (polygon) and the UVs go from 0.0 on the left edge to 1.0 on the right edge... when rendered, the texture will be rendered once, from edge to edge on the polygon, using the entire texture.

Now if we take that same polygon and make the UVs go from 0.0 on the left edge to 4.0 on the right edge... when rendered, the texture will be rendered (tiled) 4 times, from edge to edge across the polygon, so it will be shrunk by a factor of 4, to fit in the same space 4 times - you're absolutely correct.

I was only thinking about the case where you would (using the example above) move the left edge to 3.0 and the right edge to 4.0.... that would be the same as from 0.0 to 1.0.  Sorry for the confusion.

Cinema4D Plugins (Home of Riptide, Riptide Pro, Undertow, Morph Mill, KyamaSlide and I/Ogre plugins) Poser products Freelance Modelling, Poser Rigging, UV-mapping work for hire.


nruddock ( ) posted Thu, 15 April 2010 at 3:11 PM

Quote - You may or may not know this, but any UV value beyond 1.0 will "wrap" back to the other side (tiling, not really stretching).

Strictly speaking this is the case when the UVs are used for textures, but for procedural shaders, Poser does preserve out of range UVs, i.e it's the image node that does the tiling (if set for that).


Cage ( ) posted Fri, 16 April 2010 at 10:46 PM

file_451420.jpg

Here's an image from an initial test of the skinning/cocooning application of the ideas behind the loops script, which I've talked about.  The UV process needs to be reworked and I need to control where each loop starts indexing, to prevent the snarly-looking polygons.  But the basic process works and it's fairly fast.  Kind of nifty.  :laugh:

===========================sigline======================================================

Cage can be an opinionated jerk who posts without thinking.  He apologizes for this.  He's honestly not trying to be a turkeyhead.

Cage had some freebies, compatible with Poser 11 and below.  His Python scripts were saved at archive.org, along with the rest of the Morphography site, where they were hosted.


Cage ( ) posted Fri, 16 April 2010 at 11:12 PM

Content Advisory! This message contains nudity

file_451422.jpg

Another test.

Nudity for naked low-res Antonia wireframe.  :lol:

===========================sigline======================================================

Cage can be an opinionated jerk who posts without thinking.  He apologizes for this.  He's honestly not trying to be a turkeyhead.

Cage had some freebies, compatible with Poser 11 and below.  His Python scripts were saved at archive.org, along with the rest of the Morphography site, where they were hosted.


odf ( ) posted Fri, 16 April 2010 at 11:17 PM

That looks pretty nifty. I think Glad wrap fetishist will love it. :laugh:

-- I'm not mad at you, just Westphalian.


Cage ( ) posted Fri, 16 April 2010 at 11:28 PM · edited Fri, 16 April 2010 at 11:28 PM

Quote - That looks pretty nifty. I think Glad wrap fetishist will love it.

Err... ix-nay on the etish-fay talk.  :ohmy: Do you want to tempt fate, and bring the Mod squad into the thread somehow?  :scared:  :lol:

I didn't set out to make kinky scripts.  I don't think I did, anyway.  Hmm.  Yet I've kind of ended up with ropes and chains and, er, wrap-fetish-y things, here.  :huh:  I guess it's all in how people use the scripts, ultimately.

===========================sigline======================================================

Cage can be an opinionated jerk who posts without thinking.  He apologizes for this.  He's honestly not trying to be a turkeyhead.

Cage had some freebies, compatible with Poser 11 and below.  His Python scripts were saved at archive.org, along with the rest of the Morphography site, where they were hosted.


odf ( ) posted Fri, 16 April 2010 at 11:31 PM

My mind is in the gutter. I apologize.

-- I'm not mad at you, just Westphalian.


Cage ( ) posted Fri, 16 April 2010 at 11:40 PM

Quote - My mind is in the gutter. I apologize.

Well, I mean, now you've made me wonder about my mind.  :lol:  That's all.

No need to apologize.   :thumbupboth:

===========================sigline======================================================

Cage can be an opinionated jerk who posts without thinking.  He apologizes for this.  He's honestly not trying to be a turkeyhead.

Cage had some freebies, compatible with Poser 11 and below.  His Python scripts were saved at archive.org, along with the rest of the Morphography site, where they were hosted.


Diogenes ( ) posted Sat, 17 April 2010 at 11:18 PM

Cage! How deliciously naughty.  I think that will be a big hit. :biggrin:   I wouldn't worry about the mods, you'd have to be downright dirty or rude for them to take an interest. IMHO So what are you going to make next? Building up quite a collection, i've been looking through your pages and spotted a number of things I would like to try. 

OT: Have you ever heard of a way to swap out UV's on a figure?


A HOMELAND FOR POSER FINALLY


Cage ( ) posted Sun, 18 April 2010 at 12:10 AM

Quote - Cage! How deliciously naughty.  I think that will be a big hit.    I wouldn't worry about the mods, you'd have to be downright dirty or rude for them to take an interest. IMHO So what are you going to make next? Building up quite a collection, i've been looking through your pages and spotted a number of things I would like to try. 

OT: Have you ever heard of a way to swap out UV's on a figure?

Thanks, phantom3D!  :laugh:

I dunno about the naughty bit.  I mean, it's all in how you apply the thing.  :unsure:  I have my moments, but my days of hanging with the 'Rotica crowd ended several years ago.  :lol:  Still, who knows what burbles within Cage's subconscious?  Hurm.

What next?  I couldn't guess.  One idea leads to another, until they stop.  :lol:  So far, each new script has involved a few new ideas which could be explored in further scripts.  That can't keep going forever, I would think.  :unsure:  And I really do have an Antonia backlog built up, from a few months back.  :lol:

RE: UV-transfer:

Long, babbling answer:
How do you want to swap out the UV's on a figure?  Swapping between two versions of the same figure, with identical vertex and polygon ordering?  Two different figures?  I recently tried to swap out UV's between two versions of Antonia, but was foiled by the fact that the polygon ordering was different, even though the vertex order was the same.  That left no easy way to cross-index the UV data, and I didn't bother to try to think about difficult ways to proceed.  If the figure vertex counts differ, you have to find a way of mapping the vertices to one another.  When something like UV transfer has been tried with the TDMT vertex mappings, no has yet been able to sort out how to handle the UV seams/texvert splitting and welding.  The rest of the UV's transfer fine, until you come to a split, where you get a mess which is hard to clean up by hand.

Shorter, more useful answer:
What are you trying to do?  😕

===========================sigline======================================================

Cage can be an opinionated jerk who posts without thinking.  He apologizes for this.  He's honestly not trying to be a turkeyhead.

Cage had some freebies, compatible with Poser 11 and below.  His Python scripts were saved at archive.org, along with the rest of the Morphography site, where they were hosted.


Diogenes ( ) posted Sun, 18 April 2010 at 12:25 AM

The same geometry with the same vertice count. I know that if you export a figure from Poser and weld it that you end up with extra points from the original that match exacly the number of vertices that were welded. So what if you exported and welded the figure from Poser and then use that as your base geometry in the geometries folder? Would that solve the problem?


A HOMELAND FOR POSER FINALLY


Cage ( ) posted Sun, 18 April 2010 at 12:33 AM

Exporting with welding will snafu the vertex ordering.  There's a utility - I think it's called Morpher? - which can help deal with vertex re-ordering when exporting a welded figure.

I think one might be able to loop through polygons on a per-actor basis, get the centers of the polygons, and match the polys through those.  That could theoretically give a common basis for use in cross-indexing the texvertices (UV's) between the geometries.

I'm not sure I follow you, with the export-welded suggestion, though.  😕

===========================sigline======================================================

Cage can be an opinionated jerk who posts without thinking.  He apologizes for this.  He's honestly not trying to be a turkeyhead.

Cage had some freebies, compatible with Poser 11 and below.  His Python scripts were saved at archive.org, along with the rest of the Morphography site, where they were hosted.


Cage ( ) posted Sun, 18 April 2010 at 12:36 AM

file_451472.txt

Here's an initial release of the "skinning" script, which I've called... Mr. Skinner.  :lol:

It's fairly simple.  Position the bounding box, set the offset from the surface and the vertical and horizontal resolution.  Set optional smoothing and "expand" morph.  Scale, rotate, or position the box as desired.

Then press "Run".  The script will move a plane up through the box, scanning the geometry to get cross-sections which will make up the new skin mesh.

The UV-mapping has been corrected, but there are still snarly bits showing up in the geometry.  More on that in the following post.

===========================sigline======================================================

Cage can be an opinionated jerk who posts without thinking.  He apologizes for this.  He's honestly not trying to be a turkeyhead.

Cage had some freebies, compatible with Poser 11 and below.  His Python scripts were saved at archive.org, along with the rest of the Morphography site, where they were hosted.


Cage ( ) posted Sun, 18 April 2010 at 12:40 AM

file_451473.jpg

Here's the problem with the snarled geometry.  Each horizontal ring (cross-section) ends up with the same number of vertices, which are evenly spaced.  Because of the even spacing, when a larger ring meets a smaller ring, the vertices don't line up in a desirable manner and the polygons end up twisted for that row.  See the attached image.

This can't be fixed, as far as I can tell, merely by changing the vertex order or the way the polygons are connected between rows.  The vertex count and/or spacing needs to change when small and large rings meet.  So I have some development left to do.  I also plan to try to add optional caps, to enclose either end of the skin geometry, which will currently always end up open.

But I thought I'd release this so people can play with it, if they want.

===========================sigline======================================================

Cage can be an opinionated jerk who posts without thinking.  He apologizes for this.  He's honestly not trying to be a turkeyhead.

Cage had some freebies, compatible with Poser 11 and below.  His Python scripts were saved at archive.org, along with the rest of the Morphography site, where they were hosted.


Diogenes ( ) posted Sun, 18 April 2010 at 12:48 AM · edited Sun, 18 April 2010 at 12:51 AM

Quote -

I'm not sure I follow you, with the export-welded suggestion, though.  😕

OK, when I have an obj that I start with from Zbrush or Max, and all the vertices are welded, the obj has a certain number of points. So if I turn that into a figure, all the seams of the body parts get split and now I have extra vertices. But if I export that figure and weld on export, if I look at the newly welded obj in Zbrush it tells me I now have all these extra points that I did not have in the original OBJ even though it is suposed to be welded on export from Poser, the extra points are still there. You actually have to use max or Zbrush to weld again to get rid of them. You see what I'm saying? Even though the obj is welded on export from Poser, somehow the extra points are still left in the OBJ

Sorry Cage I'm off topic I'll shut up  😄


A HOMELAND FOR POSER FINALLY


Cage ( ) posted Sun, 18 April 2010 at 1:06 AM · edited Sun, 18 April 2010 at 1:13 AM

Quote - OK, when I have an obj that I start with from Zbrush or Max, and all the vertices are welded, the obj has a certain number of points. So if I turn that into a figure, all the seams of the body parts get split and now I have extra vertices. But if I export that figure and weld on export, if I look at the newly welded obj in Zbrush it tells me I now have all these extra points that I did not have in the original OBJ even though it is suposed to be welded on export from Poser, the extra points are still there. You actually have to use max or Zbrush to weld again to get rid of them. You see what I'm saying? Even though the obj is welded on export from Poser, somehow the extra points are still left in the OBJ

Sorry Cage I'm off topic I'll shut up 

No need to shut up!  Nossir!  OT makes the world go 'round.  :laugh:

I see what you're saying.  Hmm.  Check the Morpher program, in Free Stuff.  That might be able to help you, and I think this sort of thing is the main thing the program does.  I think there may be a Python script around somewhere on the forums that might help, too, if I can find it.  

What are you doing within Poser, before you export with welds?  Anything that might move the actor edges away from one another?  Are you exporting posed, or morphed?  😕

===========================sigline======================================================

Cage can be an opinionated jerk who posts without thinking.  He apologizes for this.  He's honestly not trying to be a turkeyhead.

Cage had some freebies, compatible with Poser 11 and below.  His Python scripts were saved at archive.org, along with the rest of the Morphography site, where they were hosted.


Cage ( ) posted Sun, 18 April 2010 at 1:08 AM · edited Sun, 18 April 2010 at 1:14 AM

file_451475.txt

Here's the "plastic" material I used on the early skinner render, if anyone wants it.  If you actually know how to make good shaders, you can probably look at this and see right away that Cage doesn't know what he's doing, shader-wise.  :lol:  I'm sure it's all kinds of wrong, but it's an interesting effect.

The attached is .zip as .txt.

===========================sigline======================================================

Cage can be an opinionated jerk who posts without thinking.  He apologizes for this.  He's honestly not trying to be a turkeyhead.

Cage had some freebies, compatible with Poser 11 and below.  His Python scripts were saved at archive.org, along with the rest of the Morphography site, where they were hosted.


Diogenes ( ) posted Sun, 18 April 2010 at 1:20 AM

Thanks for this skinner. I think this could be useful for cobwebs-spiderwebs too. :)


A HOMELAND FOR POSER FINALLY


Diogenes ( ) posted Sun, 18 April 2010 at 2:10 AM · edited Sun, 18 April 2010 at 2:12 AM

"When something like UV transfer has been tried with the TDMT vertex mappings, no has yet been able to sort out how to handle the UV seams/texvert splitting and welding.  The rest of the UV's transfer fine, until you come to a split, where you get a mess which is hard to clean up by hand."

OK Cage, What I am trying to say is this:  If you use a welded obj from poser which still has the extra points in the obj, as your base obj in the geometry folder. Would that base obj now have the same number of points as the split figure in you scene? And if so, could this method be used to solve the problem you mention with the split? I dont know if that is logical or not, I'm pretty tired-foggy right now.:blink:

Or how about just using an unwelded obj as the base geometry?


A HOMELAND FOR POSER FINALLY


Spanki ( ) posted Sun, 18 April 2010 at 3:28 AM · edited Sun, 18 April 2010 at 3:34 AM

Hey Phantom,

Related to the TDMT scripts, I think the split-seams that he's speaking of are the UV-seams, not splits in the geometry/vertices.  Take a head mapping, for example... with a cylindrical style UV-mapping, there's a UV-seam on the back of the skull and the head mapping is flattened out, with the face in the center and an ear and half the skin behind there (up to the rear-center of the skull) on each side.

The entire head/face makes up an 'island' of UVs, with a seam on every edge (split down the back, split at the neck, one or more splits along the top of the head, potentially splits at the ears/lips/eyesockets, etc.).

The 'problem' that the code has currently, is determining 'which' island (and in the case of things like the head example, which 'side' of that island) each UV-polygon / vertex belongs to.

The code basically keeps track of mapping info the determines how one mesh (it's vertices) maps / correlates to another (the vertices of one mesh map to one or (more likely) several vertices of the other mesh, along with a weight value for each of those vertices).  This mapping was originally for use in transfering shapes/morphs between disimilar meshes... the same info can also be used to transfer the UVs from one mesh to another, but in it's current form is hit-or-miss at any UV-seams.

Each vertex can have many corresponding UV values, depending on where the seams are, so it's a 50/50 chance of getting it right if there are only 2 answers, but there are cases where it's a 1-in-4 shot as well (where a vertex happens to be at both a vertical and horizontal split, like maybe the back of the skull seam, where it also meets the neck split).

Cinema4D Plugins (Home of Riptide, Riptide Pro, Undertow, Morph Mill, KyamaSlide and I/Ogre plugins) Poser products Freelance Modelling, Poser Rigging, UV-mapping work for hire.


Diogenes ( ) posted Sun, 18 April 2010 at 8:52 AM

Thanks Spanki. That clears up my thinking. I was assuming it was the same problem as the morph export-import thing. I imagine then that your UV mapping app assigns the UV's and vertices in some manner to keep track. So you would really have to know how they were assigned to get it right 100% of the time.


A HOMELAND FOR POSER FINALLY


markschum ( ) posted Sun, 18 April 2010 at 9:42 AM

OK, didnt read this all, sorry, so just tell me to shut up with dumb ideas.
when rings of different sizes meet I think what you really want to do is NOT calculate a ring of polys, you want to calculate a ring of vertices, and then connect them to the previous ring. That will give you sloping surfaces. Store each ring of vertices in an array and use the last and current arrays. the patter of vertices assigned to each poly will be the same for each ring given the same number of segments in the ring.

its good anyway, can always touch it up in a modeller. Attack of the mutant spiders is now possible :)


Cage ( ) posted Sun, 18 April 2010 at 2:20 PM

Quote - OK, didnt read this all, sorry, so just tell me to shut up with dumb ideas.
when rings of different sizes meet I think what you really want to do is NOT calculate a ring of polys, you want to calculate a ring of vertices, and then connect them to the previous ring. That will give you sloping surfaces. Store each ring of vertices in an array and use the last and current arrays. the patter of vertices assigned to each poly will be the same for each ring given the same number of segments in the ring.

its good anyway, can always touch it up in a modeller. Attack of the mutant spiders is now possible :)

That's pretty much the best idea I can come up with, too.  The spacing of vertices, on a ring which borders a smaller ring, will need to change to accommodate the smaller ring.  That will mean changing the UV process, to avoid stretching in the unevenly-spaced areas.  Overall, it doesn't seem like it should be too difficult, but I often assume that, until I get to the implementation.  :lol:  The even spacing is just inherited from the loop-making script, where it makes more sense.

Do you know of a way of arranging the polys, on a "cap" for the "cylinder" of the skin, which will allow all quads, regardless of whether the ring count in the cylinder is even or odd?  I can't come up with one.  Spent a few hours working on diagrams and there were always tris somewhere.  Hmm.  Nothing against triangles, per se.  I 'm just really puzzled now, wondering if there's a configuration which will allow full quad-capping.

===========================sigline======================================================

Cage can be an opinionated jerk who posts without thinking.  He apologizes for this.  He's honestly not trying to be a turkeyhead.

Cage had some freebies, compatible with Poser 11 and below.  His Python scripts were saved at archive.org, along with the rest of the Morphography site, where they were hosted.


Cage ( ) posted Sun, 18 April 2010 at 2:30 PM

Quote - OK Cage, What I am trying to say is this:  If you use a welded obj from poser which still has the extra points in the obj, as your base obj in the geometry folder. Would that base obj now have the same number of points as the split figure in you scene? And if so, could this method be used to solve the problem you mention with the split? I dont know if that is logical or not, I'm pretty tired-foggy right now.

Or how about just using an unwelded obj as the base geometry?

Using an unwelded geometry as the base figure can be done, as long as all of the edge vertices are matched up, Poser will weld them once they're used as body parts.  This does make it harder to work with the base .obj in any kind of modeling context.

But that wouldn't help with the UV splits, no.  I believe that answer has been covered.  :thumbupboth:

If the vertex counts remain compatible and you want to globally transfer all UV's between two geometries (perhaps with different shapes/topologies), you can use the good shape .obj file as a morph on the good UV file.

If you want to transfer UV's between two actors with the same vertex positioning, but different polygon or UV ordering, you might be able to do that by matching up the polygons based on vertex locations or polygon centers.

If the vertex counts and orders remain the same, you might just be able to paste the "vt" and "f"/"g" lines from one .obj file into another.  I'm guessing.

===========================sigline======================================================

Cage can be an opinionated jerk who posts without thinking.  He apologizes for this.  He's honestly not trying to be a turkeyhead.

Cage had some freebies, compatible with Poser 11 and below.  His Python scripts were saved at archive.org, along with the rest of the Morphography site, where they were hosted.


markschum ( ) posted Sun, 18 April 2010 at 3:09 PM

file_451518.jpg

Here is a typical cylinder cap as quads.  You have to use a cylinder with an even number of divisions or you get one triangle.


markschum ( ) posted Sun, 18 April 2010 at 3:11 PM

file_451519.jpg

heres a modification to keep all quads while reducing poygon size Its needed for subdivision modelling which needs quads or tris.


Cage ( ) posted Sun, 18 April 2010 at 3:12 PM

Quote - Here is a typical cylinder cap as quads.  You have to use a cylinder with an even number of divisions or you get one triangle.

That's what I thought.  Always at least one triangle, with an odd number of divisions.  Oh well.  :lol:  

Thank you!  :thumbupboth:

===========================sigline======================================================

Cage can be an opinionated jerk who posts without thinking.  He apologizes for this.  He's honestly not trying to be a turkeyhead.

Cage had some freebies, compatible with Poser 11 and below.  His Python scripts were saved at archive.org, along with the rest of the Morphography site, where they were hosted.


Cage ( ) posted Sun, 18 April 2010 at 3:13 PM · edited Sun, 18 April 2010 at 3:22 PM

Quote - heres a modification to keep all quads while reducing poygon size
Its needed for subdivision modelling which needs quads or tris.

Oop.  Cross-posted.  Will this latter case accommodate an odd number of divisions?  I guess I need to open up Wings and tinker a bit.  😊

Oh!  I was meaning to ask you about how you implemented the chain posing using the parabola, which you'd mentioned earlier.  I have a chain-posing script together, which is just awaiting proper math to set up the curve.  Did your parabola implementation permit ends at uneven positions on Y?

===========================sigline======================================================

Cage can be an opinionated jerk who posts without thinking.  He apologizes for this.  He's honestly not trying to be a turkeyhead.

Cage had some freebies, compatible with Poser 11 and below.  His Python scripts were saved at archive.org, along with the rest of the Morphography site, where they were hosted.


markschum ( ) posted Sun, 18 April 2010 at 4:10 PM · edited Sun, 18 April 2010 at 4:22 PM

file_451522.jpg

 The script I had used 3 points to calculate the equation for the polygon , and then used the tangent at a point to get the angle for the link. It gets a bit complicated because you have to calculate the length along the parabola, and know the length of each link.

You can use mutliple rings of quads to cap a cylider, but with an odd number of divisions you get either one tri - or an n-gon in the last ring.
.


Cage ( ) posted Sun, 18 April 2010 at 4:30 PM · edited Sun, 18 April 2010 at 4:33 PM

Quote - The script I had used 3 points to calculate the equation for the polygon , and then used the tangent at a point to get the angle for the link. It gets a bit complicated because you have to calculate the length along the parabola, and know the length of each link.

Given a set of X,Y points which make up a curve, the script I have now can properly pose a chain of arbitrary length to match the curve.  The trouble is being able to define a curve.  I've been using the full catenary, but there's no evident way to get results from that curve which won't place both ends evenly on Y.  Trying to exit the curve early to fake the uneven Y placement creates other problems which ultimately make the posing inaccurate except in certain special cases.

So I just need a way to calculate a good curve, and chains can be posed.  I haven't been able to come up with one, unfortunately.  😊

Thanks for the tests of the different cap configurations!  :woot:  I didn't mean for you to go to such trouble.

I think if at least one tri is unavoidable in some cases, I might as well just use radial fanning from a central point to create a triangulated cap.  Alas.  :lol:

===========================sigline======================================================

Cage can be an opinionated jerk who posts without thinking.  He apologizes for this.  He's honestly not trying to be a turkeyhead.

Cage had some freebies, compatible with Poser 11 and below.  His Python scripts were saved at archive.org, along with the rest of the Morphography site, where they were hosted.


markschum ( ) posted Sun, 18 April 2010 at 6:39 PM

hardly any time at all to do the end caps. I need the practie anyway :(

There is some formula for parabolas earlier in this thread  y = ax^2 + bx + c  and I have the code to find a,b,c given 3 points on the curve. Two end points and any other point.  I think thats the way to go, and its not very much off a catenery curve.

Breaking the cap n-gon to tri is called a pole in lightwave. It does not render well in Poser though :(  if the tries are too thin unless you unweld the vertices.


Cage ( ) posted Sun, 18 April 2010 at 6:50 PM

Quote - hardly any time at all to do the end caps. I need the practie anyway :(

There is some formula for parabolas earlier in this thread  y = ax^2 + bx + c  and I have the code to find a,b,c given 3 points on the curve. Two end points and any other point.  I think thats the way to go, and its not very much off a catenery curve.

Breaking the cap n-gon to tri is called a pole in lightwave. It does not render well in Poser though :(  if the tries are too thin unless you unweld the vertices.

Can that approach for the parabola handle endpoints at different Y positions, then?  If both endpoints are used as inputs, it seems like it might be able to.  I'm happy enough with a parabola, myself.  It really isn't that different, and I doubt many users would even be aware of the difference between the two curves.

The pole cap doesn't handle well?  Hmm.  May have to go with the last configuration you posted, then.

===========================sigline======================================================

Cage can be an opinionated jerk who posts without thinking.  He apologizes for this.  He's honestly not trying to be a turkeyhead.

Cage had some freebies, compatible with Poser 11 and below.  His Python scripts were saved at archive.org, along with the rest of the Morphography site, where they were hosted.


bopperthijs ( ) posted Sun, 18 April 2010 at 6:56 PM

file_451532.jpg

*I think if at least one tri is unavoidable in some cases, I might as well just use radial fanning from a central point to create a triangulated cap.  Alas.*

A tri can always be divided into quads, but perhaps that's what you meant.
I love this thread, keeps my mind in shape.
Did you know that when you twist a chain, it becomes shorter? And when you twist it even further you get a nice spiral-shaped, knotty object? But I'm afraid that the maths that describe this, have to be invented, or when they are, they are so complicated that only a tenth Dan in math can understand them.

Don't be too humble about your achiefments, Cage. In my opinion you're one of the most creative and productive persons among the poser community I know.

best regards,

Bopperthijs.

-How can you improve things when you don't make mistakes?


Cage ( ) posted Sun, 18 April 2010 at 7:11 PM

Quote - A tri can always be divided into quads, but perhaps that's what you meant.
I love this thread, keeps my mind in shape.
Did you know that when you twist a chain, it becomes shorter? And when you twist it even further you get a nice spiral-shaped, knotty object? But I'm afraid that the maths that describe this, have to be invented, or when they are, they are so complicated that only a tenth Dan in math can understand them.

Don't be too humble about your achiefments, Cage. In my opinion you're one of the most creative and productive persons among the poser community I know.

Golly.  :blushing:  Thank you, bopperthijs.

That configuration for tri-to-quad never occurred to me!  That could be quite useful.  Thank you!   :thumbupboth:

So a mathematically-correct twisty chain is probably something to avoid even pondering, for Poser.  :lol:  The catenary business has been tricky enough, already.  :lol:

===========================sigline======================================================

Cage can be an opinionated jerk who posts without thinking.  He apologizes for this.  He's honestly not trying to be a turkeyhead.

Cage had some freebies, compatible with Poser 11 and below.  His Python scripts were saved at archive.org, along with the rest of the Morphography site, where they were hosted.


markschum ( ) posted Sun, 18 April 2010 at 8:34 PM

for a parabola the end point positions on Y dont matter.
the curve if from xa to xb using the solution for the equation ax^2 + bx + c
you need to solve three equations but I posted the code for that , or I can give you a python program that solves for 3 points. The hard part is getting the third point .

I never saw that way of splitting a tri to quads. That could be very useful.


Cage ( ) posted Sun, 18 April 2010 at 11:11 PM · edited Sun, 18 April 2010 at 11:16 PM

Quote - for a parabola the end point positions on Y dont matter.
the curve if from xa to xb using the solution for the equation ax^2 + bx + c
you need to solve three equations but I posted the code for that , or I can give you a python program that solves for 3 points. The hard part is getting the third point .

I think I've followed what you posted, but you've also said there are additional steps for finding the a,b, and c portions.  I'm not sure what those are meant to represent, so I'm not even sure how to begin thinking about finding them.  :lol:  I have a difficulty with new math, whereby I can't really grasp it until I can visualize it.  If I'm not able to think about it visually, or I do so using the wrong mental picture, I get rather confused.  Assuming I even get close enough to understanding to be confused.  :lol:  I suppose it isn't just math, for that matter, but any new idea.  Hmm.

I certainly won't say no, if you'd like to put up some code to get the chain posing script up and running, so we can all use it.  :laugh:  :thumbupboth:

===========================sigline======================================================

Cage can be an opinionated jerk who posts without thinking.  He apologizes for this.  He's honestly not trying to be a turkeyhead.

Cage had some freebies, compatible with Poser 11 and below.  His Python scripts were saved at archive.org, along with the rest of the Morphography site, where they were hosted.


markschum ( ) posted Mon, 19 April 2010 at 1:13 AM · edited Mon, 19 April 2010 at 1:15 AM

This was on page 5 of this thread - repeated for convenience.

I found some good explanations on the internet for solving the formula for a parabola if you have 3 points on it.  so if you have (-4,4)(0,1) (3,2) as points you can get the values for y = ax^2 + bx + c  (general formula for a parabola)  values a.b.c  and then calculate
for x = -4 to 3 step 0.5
  y = etc
next x   and create the curve.  (a bit more complex to calculate he exact positions and angles of each link but can be done ) 

to solve you get three equations (one for each point known)  which can be solved by an inverse matrix multiplication
which some kind mathematician did http://stackoverflow.com/questions/717762/how-to-calculate-the-vertex-of-a-parabola-given-three-points

here is the matrix thing expanded :

<pre class="prettyprint">
<span class="pln">denom </span><span class="pun">=</span><span class="pln"> </span><span class="pun">(</span><span class="pln">x1 </span><span class="pun">-</span><span class="pln"> x2</span><span class="pun">)(</span><span class="pln">x1 </span><span class="pun">-</span><span class="pln"> x3</span><span class="pun">)(</span><span class="pln">x2 </span><span class="pun">-</span><span class="pln"> x3</span><span class="pun">)</span><span class="pln"><br></br>A </span><span class="pun">=</span><span class="pln"> </span><span class="pun">(</span><span class="pln">x3 </span><span class="pun">*</span><span class="pln"> </span><span class="pun">(</span><span class="pln">y2 </span><span class="pun">-</span><span class="pln"> y1</span><span class="pun">)</span><span class="pln"> </span><span class="pun">+</span><span class="pln"> x2 </span><span class="pun">*</span><span class="pln"> </span><span class="pun">(</span><span class="pln">y1 </span><span class="pun">-</span><span class="pln"> y3</span><span class="pun">)</span><span class="pln"> </span><span class="pun">+</span><span class="pln"> x1 </span><span class="pun">*</span><span class="pln"> </span><span class="pun">(</span><span class="pln">y3 </span><span class="pun">-</span><span class="pln"> y2</span><span class="pun">))</span><span class="pln"> </span><span class="pun">/</span><span class="pln"> denom<br></br>B </span><span class="pun">=</span><span class="pln"> </span><span class="pun">(</span><span class="pln">x3</span><span class="pun">^</span><span class="lit">2</span><span class="pln"> </span><span class="pun">*</span><span class="pln"> </span><span class="pun">(</span><span class="pln">y1 </span><span class="pun">-</span><span class="pln"> y2</span><span class="pun">)</span><span class="pln"> </span><span class="pun">+</span><span class="pln"> x2</span><span class="pun">^</span><span class="lit">2</span><span class="pln"> </span><span class="pun">*</span><span class="pln"> </span><span class="pun">(</span><span class="pln">y3 </span><span class="pun">-</span><span class="pln"> y1</span><span class="pun">)</span><span class="pln"> </span><span class="pun">+</span><span class="pln"> x1</span><span class="pun">^</span><span class="lit">2</span><span class="pln"> </span><span class="pun">*</span><span class="pln"> </span><span class="pun">(</span><span class="pln">y2 </span><span class="pun">-</span><span class="pln"> y3</span><span class="pun">))</span><span class="pln"> </span><span class="pun">/</span><span class="pln"> denom<br></br>C </span><span class="pun">=</span><span class="pln"> </span><span class="pun">(</span><span class="pln">x2 </span><span class="pun">*</span><span class="pln"> x3 </span><span class="pun">*</span><span class="pln"> </span><span class="pun">(</span><span class="pln">x2 </span><span class="pun">-</span><span class="pln"> x3</span><span class="pun">)</span><span class="pln"> </span><span class="pun">*</span><span class="pln"> y1 </span><span class="pun">+</span><span class="pln"> x3 </span><span class="pun">*</span><span class="pln"> x1 </span><span class="pun">*</span><span class="pln"> </span><span class="pun">(</span><span class="pln">x3 </span><span class="pun">-</span><span class="pln"> x1</span><span class="pun">)</span><span class="pln"> </span><span class="pun">*</span><span class="pln"> y2 </span><span class="pun">+</span><span class="pln"> x1 </span><span class="pun">*</span><span class="pln"> x2 </span><span class="pun">*</span><span class="pln"> </span><span class="pun">(</span><span class="pln">x1 </span><span class="pun">-</span><span class="pln"> x2</span><span class="pun">)</span><span class="pln"> </span><span class="pun">*</span><span class="pln"> y3</span><span class="pun">)</span><span class="pln"> </span><span class="pun">/</span><span class="pln"> denom    once you have the three values you can calculate any point on the curve  for x from x1 to x3 (the start and end positions)    This has point of reference issues and works for the parabola in a plane x,y    in a 3d situation you would find the plane of the endpoints, and rotate it parrallel to an axis.   Then when you calculate the curve and pose the chain, you have a simple rotation back into position.     I hope you can follow that :(     <br></br></span>


markschum ( ) posted Mon, 19 April 2010 at 1:28 AM

sorry for the formatting , its not letting me edit it .

once you have the values for a,b and c  you now have the equation for the curve

y = a x^2 + bx +c   and using the range of x from x1 to x3 gives the curve (x1 starting point, x3 end point

when doing this in 3d space , you rotate the plane of the start and end points so
it is parrallel to the x axis,  do the calculations , and then rotate it back.

The rotation is the world space coordinates of the start and end points viewed from the top

s
| (angle)
|
| ---------------------------------------------- e
s = (x1,y1,z1)  e = (x3,y3,z3)
so the sides of the triangle are z3-z1 and x3-x1  and the angle
is opposite / adjacent = TAN(angle)

:woot:  :lol:

if anyone is reading this who really knos the math, dont be bashful, jimp in anytime :)


nruddock ( ) posted Mon, 19 April 2010 at 3:03 PM

Quote - I found some good explanations on the internet for solving the formula for a parabola if you have 3 points on it.

But you only have two points (the ends) not three.
The only other thing you know is the length, but using that will end tricky as you get a sinh() term from the arc length formula.
Essentially using a parabola only makes the job of finding the lowest point and curve parameters a little easier as you still have a completely unknown variable (the vertical shift of the FoR).
I'll post a diagram to illustrate the problem.


Cage ( ) posted Mon, 19 April 2010 at 3:08 PM · edited Mon, 19 April 2010 at 3:08 PM

Holy jumpin' yikes!  What happened to the page?  It's happening again!  All the machines are
ganging up on me!  :crying:  :lol:

Thanks for the in-depth explanation, markschum!  I've been using inverse matrix calculations a lot,
since starting the loop script, so they're not too off-putting.

I am still puzzled about where I 'm supposed to get the third point, in order to calculate a, b, and c. 
😕  The start and endpoints are easy.  But what does one use for this mid-point?  Use the
exact mid-point on (relative) X, perhaps, and the desired minimum on Y?  If so, what standard
should be applied to get this minimum?  Should it be determined based on chain length?

My apologies for being a bit dense about this.  😊  :lol: 

===========================sigline======================================================

Cage can be an opinionated jerk who posts without thinking.  He apologizes for this.  He's honestly not trying to be a turkeyhead.

Cage had some freebies, compatible with Poser 11 and below.  His Python scripts were saved at archive.org, along with the rest of the Morphography site, where they were hosted.


Cage ( ) posted Mon, 19 April 2010 at 3:10 PM

Quote - But you only have two points (the ends) not three.
The only other thing you know is the length, but using that will end tricky as you get a sinh() term from the arc length formula.
Essentially using a parabola only makes the job of finding the lowest point and curve parameters a little easier as you still have a completely unknown variable (the vertical shift of the FoR).
I'll post a diagram to illustrate the problem.

Cross-posted!

A diagram will help me, at least, immensely!  :thumbupboth:

===========================sigline======================================================

Cage can be an opinionated jerk who posts without thinking.  He apologizes for this.  He's honestly not trying to be a turkeyhead.

Cage had some freebies, compatible with Poser 11 and below.  His Python scripts were saved at archive.org, along with the rest of the Morphography site, where they were hosted.


jancory ( ) posted Mon, 19 April 2010 at 3:27 PM

wow this page is impressive--must be a mile wide.  yowza!

downloaded but haven't yet tried the wrapper script--looks like a lotta fun. 


lost in the wilderness

Poser 13, Poser11,  Win7Pro 64, now with 24GB ram

ooh! i guess i can add my new render(only) machine!  Win11, I7, RTX 3060 12GB

 My Freebies



Cage ( ) posted Mon, 19 April 2010 at 3:30 PM

Quote - wow this page is impressive--must be a mile wide.  yowza!

downloaded but haven't yet tried the wrapper script--looks like a lotta fun. 

Thanks, jancory.  I've been trying to come up with a way to get rid of the "snarly", twisted polygons, but haven't tried anything yet which didn't make things worse in some ways, even if they helped in other ways.  I hope I can fix that part.

===========================sigline======================================================

Cage can be an opinionated jerk who posts without thinking.  He apologizes for this.  He's honestly not trying to be a turkeyhead.

Cage had some freebies, compatible with Poser 11 and below.  His Python scripts were saved at archive.org, along with the rest of the Morphography site, where they were hosted.


markschum ( ) posted Mon, 19 April 2010 at 4:34 PM · edited Mon, 19 April 2010 at 4:35 PM

The third point can be any point on the curve. for a parabola you should be able to find a vertex
point by calculating the same angle from each endpoint . Find the intersection point and thats your
estimate of the vertex position.  That solution would also estimate the chain length available.

Perhaps its time to start a new thread for this ?

why isnt this wrapping the text ? bugger


nruddock ( ) posted Mon, 19 April 2010 at 4:46 PM · edited Mon, 19 April 2010 at 5:00 PM

Quote - The third point can be any point on the curve.

You have to be given that third point or else your back to an iterative process starting with some initial guess.
The length is known because you decide before hand how long a chain you want otherwise you're adding yet another unknown to the mix.

Quote - why isnt this wrapping the text ? bugger

Table cells are always as wide as the longest link 😉
(Actually text in [code] or

 tags doesn't wrap)


Privacy Notice

This site uses cookies to deliver the best experience. Our own cookies make user accounts and other features possible. Third-party cookies are used to display relevant ads and to analyze how Renderosity is used. By using our site, you acknowledge that you have read and understood our Terms of Service, including our Cookie Policy and our Privacy Policy.