PDA

View Full Version : Multiple holes in a NURBS surface


Mayan-Seraph
05-16-2005, 09:18 PM
Hi all,

I've started using Maya about a month ago, and I've ran into a problem that I;ve been having for well, roughly 6 years :hmm: (ehhh?) with lofting surfaces across splines.

It appears to be fundamentally impossible to create any kind of object with more than one hole in it if you are only allowed to connect one curve to one other curve...

But since Maya is a $7k package, I expect this software to be full of neat and nifty tricks.

I wanted to post an image but I am now allowed to, so I'll just ask it like this: "Imagine 4 circular planes with holes in them: How do I attach them to eachother without deforming them in such a way that holes have to close?

vicky_1
05-17-2005, 05:29 AM
Try this...

Create 3 nurb circles. Scale 2 of them so that they are inside the third big one. Make sure the 2 small circles are placed slightly apart from each other. The 3 circles will now look like a smily without a mouth:) .

Select the outer circle first, shft select the other two. Now select surface>planar.

Bingo! multple holes!

Hope this helps.

Mayan-Seraph
05-17-2005, 02:18 PM
Thanks a lot... it looks like a smily ran over by a very large steamroller.

Now, since I need to make fighter bays in the side of a complexely shaped warship's flank, I'd like to know how to make holes in already crafted NURBS surfaces too.. is there a way?

vicky_1
05-19-2005, 05:13 AM
Hee, hee! I thought u are the official logo maker for the next olympics, thats why the smiley example!

Now in ur case, u can trim the nurbs surface. First intersect the nurbs surface with a cylinder so as to get circles (curve on surface) on the places u need holes. The its just a matter to trim the nurbs surface by following the instructions in help.


This should help.:wise:

jbo
05-19-2005, 05:40 AM
don't use trims. learn to patch model or don't use nurbs.

Sparkle
05-19-2005, 10:18 AM
I don't think there is anything wrong with trims as long as you keep in mind that you're just hiding certain parts of your surface and not actually changing it.
If I had a flat nurbs surface and just wanted to cut some simple holes in it i wouldn't see the point in patch modeling the whole thing out of several patches. BTW trims are even used on the gnomon nurbs modeling DVDs, so I guess they can't be completely wrong.
On the other hand, if you see any possibility of modeling that same geometry in polys or sub-Ds you should go for that, because in my oppinion nurbs are very unintuitive and require you to have a pretty exact idea of what you're doing in advance. Especially for large objects with lots of detail they can be a pain in the ass.
Hope that helps a little.

jbo
05-19-2005, 02:12 PM
double post

jbo
05-19-2005, 02:13 PM
I don't think there is anything wrong with trims as long as you keep in mind that you're just hiding certain parts of your surface and not actually changing it.
If I had a flat nurbs surface and just wanted to cut some simple holes in it i wouldn't see the point in patch modeling the whole thing out of several patches. BTW trims are even used on the gnomon nurbs modeling DVDs, so I guess they can't be completely wrong.

those dvds are pretty old, and where trims aren't used is in actual production. i could be wrong, but i think trims are rarely if ever used in the entertainment industry. if someone knows of a production that used trims please let me know.

i don't know what you were trying to model, but having a sharply cut hole in an object is rarely a good thing


On the other hand, if you see any possibility of modeling that same geometry in polys or sub-Ds you should go for that, because in my oppinion nurbs are very unintuitive and require you to have a pretty exact idea of what you're doing in advance. Especially for large objects with lots of detail they can be a pain in the ass.
Hope that helps a little.

agreed

Mayan-Seraph
05-19-2005, 04:13 PM
I've switched methods:

I first completely modeled the basic form of my spaceship until I was perfectly happy with it, then I coverted it to polygons. I shifted the polygon count and thhe spline's seems until I was happy with the exact build up of the polygon models.

In this way, NURBS are the way for me to get my own perfectly cusromized primitives.

Now, as for patch modeling. I only know patches are twisted pieces of surface stuck between 2 U and 2 V isoparms, can you introduce me to the art of using these patches? To me they are dead items since I only know how to make my splines and loft or revolve em.

Emil3d
05-20-2005, 08:13 PM
don't use trims. learn to patch model or don't use nurbs.For a hard shell static object making holes with patching or trim will make no difference in the appearance. The only difference is that you will spend about 1 min to trim it, instead of hours to patch it.

Mayan-Seraph
05-20-2005, 08:45 PM
At the trim, I need to find a way to make my surface NOT look like it has zero thickness at the trim, any ideas? I can't attach a small ring of surface to it in order to curl the surface inward at the trim, it resulted in NURBS drama.

jbo
05-20-2005, 08:47 PM
For a hard shell static object making holes with patching or trim will make no difference in the appearance. The only difference is that you will spend about 1 min to trim it, instead of hours to patch it.

it will sure make a difference in the render time though when you have to crank the tesselation up to hide the fact that your surfaces don't really line up. if you're just talking about a hole with no rounding or anything, just a sharply cut hole, then yes i suppose a trim would suffice, though a sharply cut hole isn't something that's acceptable on a model 99.9999% of the time.

jbo
05-20-2005, 10:42 PM
At the trim, I need to find a way to make my surface NOT look like it has zero thickness at the trim, any ideas? I can't attach a small ring of surface to it in order to curl the surface inward at the trim, it resulted in NURBS drama.

yes, this is exactly my point. you can use a fillet, but it is an extremely ineffecient way to do it as you will have to needlessly increase the tesselation to get the edge to look good in a render.

don't use trims. learn to patch model or use polys.

Emil3d
05-21-2005, 02:57 AM
Holes build with trim surfaces will always render faster than the same model build with patches. Trimmed holes use fewer surfaces and simply hide the surface at render time which always produces a faster rendering.

Tessellation needed for both, trim and multi patched surfaces is similar and you won’t save any time or effort choosing one over the other.

As for how acceptable sharply cut holes are, I don’t know where did you pull your 99% statistic, but they are perfectly acceptable for my clients. I made a quick sample object attached below for those interested to judge by themselves. The elements of this object can be found in one form or another in any surface with holes.
This object, without the soft edge at the left bottom, was created for less than 2 minutes by creating a NURBS cube primitive, a NURBS cylinder that was duplicated twice, and positioned at different orientations inside the cube. The boolean subtract tool was used to scoop away the cylinders out of the cube. The subtract tool required the total of 6 clicks and pressing the Enter key 6 times. All surfaces were selected and in the Attribute spreadsheet editor – Smooth edge column was turned on and 1 was entered for the Smooth edge value. In case a circular fillet was used, the Explicit tessellation column should be turned on as well. That’s it - this should be no more than a couple of minutes.

Now try to make that shape with patches. You will never make it for the same time. With patches you will also need to fix the tessellation in the Attribute spread sheet editor by turning on the Explicit tessellation and uncheck Use chord height ratio to avoid the gaps form stitching. This is basically the same amount of tessellation and efforts for both methods. In fact, if you don’t use circular fillets for smoothing trimmed edges less tessellation is needed than the stitched surfaces, otherwise it is the same but no more.



Now, to add a smooth edge with trims as one shown on one side of the cube, you need to select the 2 intersecting surfaces and apply a circular fillet followed by the trim tool for removing the excess of each surface. This is another couple of minutes or so for each edge. Building the smoothness with patches won’t be any faster at all. I use patches a lot and I know very well what it takes. Patches are great for what they do best, as the same is valid for trimmed surfaces. For static shapes like the one in the attached image trimming the holes is the best and the fastest solution and I don’t recommend wasting time with anything else. Basic shapes may not be the main hero in a scene but there’s a lot of them in each project and you will have no life you choose to make them any harder than this.

jbo
05-21-2005, 04:29 AM
Holes build with trim surfaces will always render faster than the same model build with patches. Trimmed holes use fewer surfaces and simply hide the surface at render time which always produces a faster rendering.

this is just not true... with a proper patch structure, i can set the tesselation as low as i want, and the surfaces will still have continuity, this is not the case with trims. yes you'll have more surfaces with patches, this is true, but how many surfaces you have is FAR less important than how many polygons those surfaces are made of.

you are correct about speed. trims are way faster to make, there's no arguing with you there, but in the pic you posted... if you look hard at that rounded edge, you can see that the surfaces don't line up. you can see the little triangular gaps. I'd rather spend hours on something decent, than minutes on something not really usable.

as for the 99%, yes that's just a number that i pulled out of my ass, but rarely are edges such as the ones in your pic that aren't smoothed acceptable for anything. nothing is that sharp in the real world. nothing.

don't get me wrong, i think patch modeling has its problems too, and i wouldn't use patches for something like that either (i much prefer polys), but at least it produces something usable in the end. yes there may be a rare instance where a trim is acceptable, and they certainly do have uses when it comes to quickly conveying ideas.

why aren't trims used in film? if what you say is true, you'd think places would kill for something that was faster to create, and faster to render.

vicky_1
05-21-2005, 04:53 AM
Wow! Some of that went over my head. I didn't realize there was so much info behind suggesting for or against trim!
Thanks Emil3d and Jbo.
I'm enlightened!:)

Mayan-Seraph
05-21-2005, 09:19 AM
After all of this, I still did not see how exactly I can make a surface with multiple holes by using patch modeling? I'm still a Maya novice... Can you show me how to make something like the image I attached? (MS paint edited)

Emil3d
05-21-2005, 11:20 AM
Alright, here’s the scene with the same object which I posted previously in the screenshot. I also built that object as a patch model and put it in a different layer. Those interested can open the scene and check for themselves the difference in rendering time and quality. It is a v.6 file. I made several tests and I didn’t find any significant differences in that respect. Again the biggest difference is in the time for modeling - it took me close to an hour to do what can be done with trims in 2 minutes. I’m very experienced with patch modeling and my interface is completely optimized with hotkeys and marking menus for that. For occasional patch users it may take much longer. I build the patch model with the smallest amount of geometry and tessellation I’m capable of, so that its rendering quality is equal to the model I built with trimmed surfaces. I will be very happy to learn if Jbo or anyone else can show me a way how to make it render faster than the trim surface without quality loss.

Mayan Seraph, you can use the attached file to study and create what you want by using the model in the layer with the name Patched. First, select it and delete the history to get rid of the stitching, and then delete all the surfaces except those that make the bottom side of the cube, so that you are just left with a squire with a hole in it. Then select all of it, duplicate the group 3 times, and laid the surfaces next to each other to form something like the image you showed in your message. Now you have a plane with 4 holes build with patches. To give it a thickness, duplicate all of it and move it up or down, then make lofts between the isoparms of the top and bottom patches that form the sides of the plane.

Finally you can choose to either stitch all surfaces or convert them to polygons or subdiv. For polygons conversion in the option box check - Attach multiple output meshes, Quads for Type, General for Method, and Per span # of Isoparms for the U and V type. Try what number for U and V will give you enough geometry for the roundness of the holes and that’s it for a start.

edit: Oh, I forgot to mention that if you intend to convert to polys you don’t need to work on the thickness of the plane in NURBS patches, This will be much faster with using the Extrude Face command after converting to polygons

tankut
05-21-2005, 01:11 PM
At the trim, I need to find a way to make my surface NOT look like it has zero thickness at the trim, any ideas? I can't attach a small ring of surface to it in order to curl the surface inward at the trim, it resulted in NURBS drama.

The quick and rough way to go about it could be extruding the trim edge inward, and rounding the edge. Trims aren't evil, they are fast to model. Hard to deform later though, and the tesselation can skyrocket. But that's what fast processors are for, eh?

JasonA
05-21-2005, 04:26 PM
it will sure make a difference in the render time though when you have to crank the tesselation up to hide the fact that your surfaces don't really line up. if you're just talking about a hole with no rounding or anything, just a sharply cut hole, then yes i suppose a trim would suffice, though a sharply cut hole isn't something that's acceptable on a model 99.9999% of the time. :hmm: You don't have to crank up the tesselation, you just have to optimize the settings for the given shot. Furthermore, If you set your tesselation parameters correctly, you can still get adjacent surfaces to tesselate correctly.

Patch modeling for industrial type surfaces is rarely worth it. It takes alot more time to create the same effect that could be done with a trim in minutes. It also makes texturing the model even more difficult.

Mayan-Seraph
05-21-2005, 06:51 PM
Alright, I still don't get the hang of patch modeling. However, I have tried some clipping in order to create an object that has the kind of shape that I need to apply to my spaceships quite often: interruptions in the outer armour plating

(see attachment)

I did this by making a cylinder, then clip using a closed surface curve streching all the way from the top to the bottom of the cylinder.
I duplicated and shrank the cilinder, then adjusted my curve on surface to form a more narrow hole.
Finally I lofted the curves on both surfaces of the cylinder.
To make the ring closed on the top and bottom, I also lofted the top and bottom inner and outer isoparm sections that were left over.

Now, I think I will be able to understand the advantage of patch modeling if somebody can tell me how I make this shape with patches so that that all the small and large surfaces meet perfectly.

JasonA
05-21-2005, 07:19 PM
If you want everything to be NURBS patches, just concentrate on making things out of 4-sided surfaces. usually this will require you to break up what you expected to be one surface into many smaller sub-surfaces. You can use trims to help you generate nurbs curves to help make this happen and you'll find yourself using birail and square alot more.

The hard part about making things without trims is that you have to essentially keep manually rebuilding all of your surfaces in an iterative fashion, sometimes repeatedly. Its not that you won't use trims at all, you just won't have them as the final surface. Use trims to help you generate new curves to re-create your surfaces using birail or square.

hope that makes sense.

Mayan-Seraph
05-21-2005, 09:06 PM
I've not yet gathered enough experience to make much sense of this... I really just need a toturial teaching me the basics of making and working with patches.

This is what I'm trying to make by the way

JasonA
05-21-2005, 09:42 PM
hmmm ok yes it sounds like you're probably not ready for this yet. for the time being, i would strongly recommend you learn how to work with Maya's tools in a basic sense. That would mean use trims where nessesary for now. :) Once you get the hang of the square tool and more conformtable with birailing, offseting curves from surfaces, etc I think this will become more clear to you.

Mayan-Seraph
05-21-2005, 09:51 PM
Ah, a specific problem now. In the MayaPLE help the all important illustration fails to load in the section about the square tool. For now it'd be nice if you could tell me what the square tool does so I can play with it.

JasonA
05-21-2005, 09:57 PM
the more irregular the hole, the more patches you might have to generate. Here, I drew on your pic for example.

The idea here would be to first create your surfaces the way you already have. Then you would offset a curve from the trim edge (the green line) and offset isoparms at different locations (red lines) so that you have a set of splines that you can then use the sqaure tool on (i showed one) to make up square patches one by one. You owuld then optimze each patch (by rebuilding surfaces) so your ispoarms line up between each patch. I chose those isoparm offset locations arbritrarily, they might not work out best for you so you'd perhaps try picking different ones.

the bottom line though is for you too be able to reconstruct the surface with only four sided patches.

Mayan-Seraph
05-21-2005, 10:03 PM
Okay, so I can use patch modeling on the sides of complex spaceship hulls made with a couple of hundred profile curves that were used to loft? For a second I thought I had to make my hulls with the birail tool (phew).

--- results appear here in time

*Well, I see now what 4 sided patches are, nothing dramatic. I see now patches aren't always the bent squares I knew.
*Hmm.. you mean offset with zero distance to get a handful of loose isoparms from my surface?

JasonA
05-21-2005, 10:13 PM
Well, I just wanted to briefly illustrate one way of going about this process. But I still think working with trims is fine... and alot less involved. Its up to you. :)

my current NURBS project is using trims, and I don't have to uber-tesselate to get it to look good. Here you be the judge. (although actually I used trims very minimally) <link> (http://www.cgtalk.com/showpost.php?p=2304131&postcount=41)

JasonA
05-21-2005, 10:15 PM
*Hmm.. you mean offset with zero distance to get a handful of loose isoparms from my surface?yes exactly

Mayan-Seraph
05-21-2005, 10:19 PM
Maya just wouldn;t hand over my offset curves to me. The square tool also works with just the isoparms that I selected... will that method give trouble in the future? You mentioned something about having to use those curves with the birail tool. I'll post my collection of patches here when I'm done baking them in 5 minutes.

I encountered a problem: UNless isoparms meet exactly at the border of my hole, I need to make patches with 5 sides... What way is there around this?

I just tried the square tool with 5 isoparms, I then get a small point tip just sticking out over the hole... Well, I'm going to get some rest and try again tomorrow. Learned useful things today though and got stuff to think about thanks a lot.

JasonA
05-21-2005, 11:11 PM
I encountered a problem: UNless isoparms meet exactly at the border of my hole, I need to make patches with 5 sides... What way is there around this?no. make your isoparms meet right at the edge of the hole.

Sorry I can't go all they way with you on this one, but I hope its got you pointed in the right direction. Best of luck! ;)

Mayan-Seraph
05-22-2005, 10:22 PM
YOu sure did point me in the right direction.

I found a nice patch modeling tutorial all you other people looking to make complex NURBS objects might like:

http://www.highend3d.com/maya/tutorials/patch2/

CGTalk Moderation
05-22-2005, 10:22 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.