PDA

View Full Version : Accurate HyperNURB cylinder - how?


astrofish
10-08-2002, 12:58 PM
Hi All,
Anyone got any good suggestions for this one?

If I create, say, a 10x1x1 cube primitive (both in terms of size and subdivision), and then put it in a HyperNURBS then I get something similar to a cylinder with rounded ends - so far so good.

The problem is that it's not actually quite cylindrical - if you animate it rotating on it's axis you can see the distortion.

Now, I thought that I could solve this with weighted HyperNURBS. I selected all of the vertices and reduced their weighting until the profile was as close to circular as I could make it (compared with a reference circle spline).

The problem then was that the resulting cylinder had a regular undulation along its length where it should have been flat.

I then tried again, but this time I weighted the lengthways edges instead of the vertices, but this produced the same result.

Now, I know that there are much better ways of making a simple cylinder, but if I want a complex HyperNURBS object which includes a cylindrical element, what's the best approach?

The options so far seem to be:-
1. Have the cylinder as a seperate object, but how would I then get a clean blend between the two?

2. Don't use HyperNURBS for the object at all - use other tools which give more direct control over the exact surface. Ok, but a bit restrictive.

3. Add lots more vertices to the HyperNURBs object to make it more controllable. Need to be careful about tweaking the weights though, otherwise it seems likely that I'll get those lengthwise undulations again.


So, at the end of all of that, I've got two basic questions:

1. Why is edge weighting the HyperNURBS object consistently along its length causing this regular undulation?

2. How, in general to make parts of a HyperNURBs object conform to a desired shape? Is there a better approach than just adding lots of control points in that region, and setting the weights to the max there to force it to closely conform?

Any insights, suggestions, etc?

Cheers - Steve Baines (Astrofish)

AdamT
10-08-2002, 01:53 PM
This is a total guess, since I don't have R8 yet, but is it possible that your cylinder has an odd number of longitudinal edges? Maybe using weighting under these circumstances cause the object to become distorted? Probly not, but who knows.

astrofish
10-08-2002, 03:34 PM
No, it's not that - my control mesh is just a standard 10x1x1 rectangular mesh, so I've only got the four longitudinal edges.

I'm wondering whether maybe I need to weight both the vertices AND the edges in order to maintain a flat surface...

AdamT
10-08-2002, 03:37 PM
One way to find out....

astrofish
10-08-2002, 07:46 PM
Yes, indeed :-)

I couldn't try it then because I was at work. Now I'm at home, I've had a chance. The results seem quite odd...

The upshot seems to be that if you want to maintain a flat longitudinal surface, then both the edges AND the vertices for those edges must BOTH be weighted. Fair enough.

BUT, to get a flat surface, the following conditions must be met:-

If edge weighting is positive, vertex weighting must be zero.

If edge weighting is negative, vertex weighting must be equal to the edge weighting.

This seems kind of strange.

Anyway, it seems that the original (circular cross-section) problem can be more or less resolved through a combination of vertex and edge weighting.

Cheers - Steve Baines (Astrofish)

AdamT
10-08-2002, 10:20 PM
This seems like a situation that should be handled by face weighting. Kai wrote on Postforum that face weights worked like this in an earlier beta, but were changed along the way. Hopefully they'll come to their senses and set it back for the final release.

LucentDreams
10-09-2002, 12:02 AM
actually this is no problem, he's simply going the wrong way, you want to make it smoother not sharper so don't weight it positixe, that will never work, what you need is about -15 to -20 Best is -17.5 obviously. here is screenshot for you.

http://www.cgi.third-era.com/~kaiskai/r8tips/hncylinder.jpg

say-g
10-09-2002, 01:26 AM
what does weighted veritces and hypernurbs do ?

LucentDreams
10-09-2002, 01:31 AM
hmm maybe I should to a howto on this. Would people like that?

basically hypernurbs uses a smoothing algotithm to turn a low poly mesh into a higher resolution smoother mesh. Weighting that basically allows you to contol the amount of smoothing. so now if you want a hard edge in a hypernurbs object its really simple without affecting the resolution of the mesh. before if you wanted a hard edge you had to ad more geometry.

AdamT
10-09-2002, 04:00 AM
Kai: I don't think that answers the question--why is the cube bent when the same weight is applied to all edges? Nor does it answer the question--how can I bet get a cylinder with a flat top using SDS weights? At least that's what I thought the questions were.

LucentDreams
10-09-2002, 04:12 AM
he knows how to get the flat top the issue I thought was the object not being perfectly round like a cylinder. seeing as how ifits at 0 it won't be perfectly round but somewhat straightened so when you rotate like it was mentioned, then you'll notice the highligh flatten and sharpen and flatten

LucentDreams
10-09-2002, 04:16 AM
oh and he needs to know how to faltten them, then after he's done what I posted, he selects the top and bottom polygons, converts the selection to edges, and sets the weight to 100.

here is an image showing (opn the left) what HN on the objects looks like with 0 weighting, notice its not round, and (the two images center and right) the cylinder with the flattened edges. and just to make sure I have included a file.

the file (http://www.cgi.third-era.com/~kaiskai/r8tips/cylinder.c4d)
http://www.cgi.third-era.com/~kaiskai/r8tips/hncylinder2.jpg

say-g
10-09-2002, 05:03 AM
so wieghted hyper nurbs is r8 only ?

LucentDreams
10-09-2002, 05:36 AM
yes, but there is a cheap (super cheap) plugin called supernurbs which uses vertecmaps to do point weightin. it can't to edge weighting though.

flingster
10-09-2002, 07:45 PM
"Kaiskai
hmm maybe I should to a howto on this. Would people like that?"

Yup....please can you do something on this...would be much appreciated. As i always say....need more info.....thanks if you've got the time anyways.
Cheers

:thumbsup:

astrofish
10-09-2002, 07:59 PM
Thanks Kaiskai,
I can now persuade the HyperNURBS to give a very good accuracy cylinder. Weighting faces at -17.5% works perfectly.

I had been trying to do it by weighting vertices and/or edges, rather than faces because without any weighting applied, the 'cylinder' bulged out towards the edges - hence I though that the edges were what should have the weights reduced, not the faces.

Anyway, thanks a lot for the clarification.

BTW, these mini-howto's are VERY useful, thanks!

Cheers - Steve Baines (Astrofish)

LucentDreams
10-10-2002, 02:33 AM
just keep in mind that weigthing the faces at -17.5 is actually setting the edge and point weight to -17.5 I rearely use the Polygon weigthing, I generally do the edge weightin and then weight the points aftewards, mainly because as Adam mentioned they don't create a perfect mesh when weighting positively, the points seem to differ a little from the edges. Faces is often faster for rough weighting though, still haven't got a technique down myself. As for a howto onthis. I will do one, just tryig to see what I can get done, as you have noticed I'm a day behind on Howtos as I'm trying oget as much as possibel done in the next few days. Now with Canadian thanksgiving this weekend (I almost forgot) I have even less time ;)

astrofish
10-10-2002, 10:40 AM
Hmm, interesting.

I had assumed that vertex, edge, and faces all had independent weights which influenced the mesh in different ways.

You are saying that face weights don't really exist, they are just a way of adjusting vertex and edge weights at the same time. Ok, I've got a better understanding of what's going on now - thanks.

So, is the edge weight equivalent to having a weighted vertex at the edge midpoint?

If so, then it means that the whole weighted HyperNURBS thing can be thought about entirely in terms of weigting of vertices, where 'edge weights' actually represent an extra set of intermediate vertices. This sounds like quite a good approach.

One more question: Am I right in thinking that there's no way to query the current weight values, or to visualise them (other than in their effect on the mesh)?

Cheers - Steve Baines

LucentDreams
10-10-2002, 04:06 PM
an edges influence is greater than that of a point. but I guess close enough you couldthink of it that way it is helps you.

Hmm as for quering them, I've never even thought of this, I will see what I can find out about that. seems it could be handy to have either a visua representatino as well as seeing the exact percentages

AdamT
10-10-2002, 05:14 PM
The visual presentation is one advantage SuperNURBS has over R8's weighting. You'd think they'd have noticed that it's pretty darned handy. Otherwise the addition of edge-weighting makes R8's implementation much more useable.

LucentDreams
10-10-2002, 05:24 PM
you know though, its funny I don't know about other testers and such, but it never entere my mind. in Nendo/Mirai you simply ses a thicker line for an edge that been weighted nothin more, so I guess I'm used to it,of course I'm also a very visual and innaccurate modeleer, I go for what looks good to the eye and not whats technically right, id one corner is weighted 18%^ and one is weighted 14 % it probably wouldn't bother me too much if they look close great, I think things that aren't equal and perfect look more natural.

LucentDreams
10-10-2002, 06:32 PM
here is what I found out, at the moment it is true that yo cannot preview the weight if it has already been set, but if you are using the mouse and the "." shortcut, you can see what the settings are in the status bar, according to MIN/MAX/AVG (%)

I'll go into more detailin the HOWTO which should be done next week.

CGTalk Moderation
01-13-2006, 06:00 PM
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.