Home Technical Talk

Maya 2009: renderable spline?

1
polycounter lvl 18
Offline / Send Message
killingpeople polycounter lvl 18
Is there a way to render a spline like in max, in Maya 2009?

-kp

Replies

  • pior
    Options
    Offline / Send Message
    pior grand marshal polycounter
    lol












    (by the way, this not an "aimed at you" lol. This is a aimed at prehistoric programs LAWLZ)

    You'll have to use good old extrude along path. There has been attempts at reproducing the 'renderable splines' functionality but none I saw working properly.

    I even had a Maya tech guy telling me upfront "HAHAHA YOU DON'T NEED THAT ANYWAYS". Go figure ...
  • killingpeople
    Options
    Offline / Send Message
    killingpeople polycounter lvl 18
    I'd punch him in right in the god damn throat! ;)

    Just curious. I can live without.

    If I was to give such an excuse, as an artist, I wonder what kind of look I'd get ;p
    "You don't need this art." "That's too hard and will take too much time, so..." ;)
  • throttlekitty
    Options
    Offline / Send Message
    Y'know, I was playing with Blender a while back, and found out you can use the scale tool on a spline. Kind of blew my mind to see polygons pop out just like that.
  • MoP
    Options
    Offline / Send Message
    MoP polycounter lvl 18
    Yeah the lack of this feature kills me in Maya. I used "renderable spline" all the time in Max, it's so handy.

    Maybe I'll try a quick and easy script this weekend, it shouldn't be too hard, and if I aim for the Max functionality then people should like it :)
  • Lamont
    Options
    Offline / Send Message
    Lamont polycounter lvl 15
    You can render curves in Maya. Use paint effects and Maya software render. A lot of features once you do it. When I get up in the morn, if you didn't find the solution on how to use Paint Effects and the curves I'll do a quick tut.
  • MoP
    Options
    Offline / Send Message
    MoP polycounter lvl 18
    Lamont, this isn't just about rendering, this is actually for stuff like using splines as source for lowpoly / highpoly meshes for export or use as game geometry etc.

    It's super-fast for simple wires, pipes, anything cylindrical with bendy complexity basically. Much more user-friendly than having to Sweep / Extrude / Loft or whatever with making extra shapes and hooking them up - it's just a simple "radius" and "number of segments" setting on the spline itself.
  • Lamont
    Options
    Offline / Send Message
    Lamont polycounter lvl 15
    Oh, in that case then, there is a pull down to turn the curve into geometry. The divisions of the geometry are based off the complexity of the curve. Also there are settings for twist and divisions. Then when you have the curve the way you like it, convert to polys Modify>Convert>Paint Effects to Polygons.

    You want to customize the geometry, control+a and fiddle with the settings.

    So now that I am out of bed:

    Paint Effects>Curve Utilities> Attach Brush to Curves

    From there you can change settings (control+a) and customize the curve how you need. There are a few tabs: StrokeShape and BrushX. Under BrushX (X is number)You can leave Brush type alone, but global scale can be bumped above the default. Brush Profile is obvious as is Twist. Mesh allows you to muk with the profile by changing the number of segments.

    StrokeShape tab will give settings for density and I guess the 3DS Max term is sweep and there is also a setting for offset.

    Then when you are done, again: Modify>Convert>Paint Effects to Polygons. And the result will be nicely UV mapped for you.
  • MoP
    Options
    Offline / Send Message
    MoP polycounter lvl 18
    Thanks Lamont, this worked great. Shame it's hidden away in just about the last place you'd look, for a very useful command...
  • CheeseOnToast
    Options
    Offline / Send Message
    CheeseOnToast greentooth
    Ahh, nice one lamont. I found if you get any twists in the mesh, switch "use normal" to on, and it fixes it. Could have done with knowing about this years ago.
  • Lamont
    Options
    Offline / Send Message
    Lamont polycounter lvl 15
    Hahaha, yeah, well it's way too buried in Maya.
  • beartraps
    Options
    Offline / Send Message
    beartraps polycounter lvl 8
    MoP, a script for this would be amazing, i'm sure a lot of people would use it.

    The paint effects way is good, but to find the options for everything is a mission since there are literally hundreds of options to sift through.
  • airbrush
    Options
    Offline / Send Message
    airbrush polycounter lvl 13
    I second the script request...used this all the time in max
  • MoP
    Options
    Offline / Send Message
    MoP polycounter lvl 18
    I don't think it needs a script, I think you just need to set that Paint Effects menu item as a shelf or marking menu item somewhere handy so you don't have to keep switching to the Rendering menu every time you want to make a renderable curve.

    Once you've clicked that button, all the controls you need are easily accessible in the
    Channel Box or Attribute Editor.

    It even has a curve input for controlling the segment width at percentages along the curve... pretty handy.

    I just wish you could assign a proper material to it... mine always come out solid black :(

    Maybe I could look into a script just to build a mesh that you can assign a material to and still have it linked to the original curve.
  • airbrush
    Options
    Offline / Send Message
    airbrush polycounter lvl 13
    True you can easily do that, but I meant something scripted with a small GUI for twist, sides etc...
    MoP wrote: »
    I don't think it needs a script, I think you just need to set that Paint Effects menu item as a shelf or marking menu item somewhere handy so you don't have to keep switching to the Rendering menu every time you want to make a renderable curve.

    Once you've clicked that button, all the controls you need are easily accessible in the
    Channel Box or Attribute Editor.

    It even has a curve input for controlling the segment width at percentages along the curve... pretty handy.

    I just wish you could assign a proper material to it... mine always come out solid black :(

    Maybe I could look into a script just to build a mesh that you can assign a material to and still have it linked to the original curve.
  • MoP
    Options
    Offline / Send Message
    MoP polycounter lvl 18
    airbrush wrote: »
    True you can easily do that, but I meant something scripted with a small GUI for twist, sides etc...

    Nah, you're right, in order to assign a material you have to do Convert Paint Effects to Polys, although that leaves it linked which is good. I guess I could set up a simple GUI that does all those steps automatically.

    This is the thing I find so frustrating about Maya sometimes, it has all the features I want, they're just scattered all around the UI in different categories, and usually completely un-linked in any sort of meaningful workflow.

    Stuff that takes one or two clicks in other apps ends up taking about 6-10 in Maya just because you need to dig around in tons of completely unrelated menus... bah!
  • elvis75k
    Options
    Offline / Send Message
    elvis75k polycounter lvl 15
    use 3delight (it's free) and you'll be surprised about how curves are rendered :)
    http://www.3delight.com/en/

    ..and paintFx too
  • airbrush
    Options
    Offline / Send Message
    airbrush polycounter lvl 13
    MoP wrote: »

    This is the thing I find so frustrating about Maya sometimes, it has all the features I want, they're just scattered all around the UI in different categories, and usually completely un-linked in any sort of meaningful workflow.

    Stuff that takes one or two clicks in other apps ends up taking about 6-10 in Maya just because you need to dig around in tons of completely unrelated menus... bah!

    I couldn't agree more..:S
  • MoP
    Options
    Offline / Send Message
    MoP polycounter lvl 18
    OK, got a decent start on it tonight, hopefully I will have something worth showing tomorrow. With any luck I can make this just as easy as Max's renderable splines.
  • airbrush
    Options
    Offline / Send Message
    airbrush polycounter lvl 13
    Awesome MoP...i'm sure all maya/previous max users will greatly appreciate this.
  • claydough
    Options
    Offline / Send Message
    claydough polycounter lvl 10
    elvis75k wrote: »
    use 3delight (it's free) and you'll be surprised about how curves are rendered :)
    http://www.3delight.com/en/

    ..and paintFx too

    Exluna
    ( abandonware? )
    I think I remember it werking on XP and getting good results/renders as well.

    Edit: I jes remembered. My avatar was Exluna rendered and
    I had a version of curves rendered as whiskers as well.
    I was really happy with how that turned out. ( I'll try to dig it up )
  • beartraps
    Options
    Offline / Send Message
    beartraps polycounter lvl 8
    MoP, let me know if you need anyone to test the script, im running Maya 2009 on a mac.
  • airbrush
    Options
    Offline / Send Message
    airbrush polycounter lvl 13
    beartraps wrote: »
    MoP, let me know if you need anyone to test the script, im running Maya 2009 on a mac.

    I can test as well maya 2009 win 7
  • Mark Dygert
    Options
    Offline / Send Message
    I haven't given the method Lamont outlined a try yet but how do the UV's look? I really like creating curvy spines that would be a bitch to unwrap traditionally. Using the Generated Mapping Coords check box in Max is great for this.

    It's great if I can get usable geometry, its even better and saves a lot of time if its already unwrapped.

    Or is there another way to unwrap a spline that is just as easy?
  • Lamont
    Options
    Offline / Send Message
    Lamont polycounter lvl 15
    Vig wrote: »
    I haven't given the method Lamont outlined a try yet but how do the UV's look?
    UV's come out nice and clean, easy to read if you need to edit.
  • MoP
    Options
    Offline / Send Message
    MoP polycounter lvl 18
    Yep it unwraps the UVs great, you can even set them to animate for you at a given speed.
    I've been busy the last few days but I'll try to get a test version of the script uploaded tonight. I think it's pretty stable and useful now.
  • beartraps
    Options
    Offline / Send Message
    beartraps polycounter lvl 8
    looking forward to it!
  • MoP
    Options
    Offline / Send Message
    MoP polycounter lvl 18
    OK sorry about the slow release!

    I may still add features to this but I figured I'd get it out there just to get some feedback on.

    Download the script here!

    mopRenderableCurve.png

    To install and launch it:
    1. Put the .mel file into My Documents/maya/scripts/ folder
    2. Type rehash; into the MEL command line if you were running Maya before copying the script.
    3. Type mopRenderableCurve; into the MEL command line to open the window.

    You could make a shelf command or hotkey for mopRenderableCurve; to access it more easily.

    You will also notice that in addition to the UI window, whenever you make a curve renderable, it will add all the attributes to the Channel Box for that curve, too. So once it's been created, you can close the window and work naturally in Maya without any clutter!

    Most of the stuff should be pretty self-explanatory - play around with settings and see what works for you :)

    Pro tip: Use "Modify -> Convert Polygon Edges To Curves" then make the resulting curve renderable - if you don't delete history on your source mesh, then any modifications to the shape and topology of the source mesh should transfer across to the curve! This could be very handy for adding custom details to a complex mesh surface without losing dynamic interaction with the curve on the surface.
  • nullfed
    Options
    Offline / Send Message
    nullfed polycounter lvl 9
    Hey MoP, that's fantastic. Thanks very much for putting this out! i'm going to be getting some real use out of this.
  • MoP
    Options
    Offline / Send Message
    MoP polycounter lvl 18
    Cool, let me know if you run into any issues, or if you have any ideas for improvements.
    I hope to put together some example images of usage cases soon.
  • beartraps
    Options
    Offline / Send Message
    beartraps polycounter lvl 8
    This is great MoP! Can you include an option for forward twist on and off? I just used it and the curve is twisting in areas. Also there is no scrolling so I can't navigate down to extrude settings.

    1-2.jpg
  • MoP
    Options
    Offline / Send Message
    MoP polycounter lvl 18
    The twist is actually a result of the positioning of the NURBS curve control points. If you tweak them a little it will go away.

    The only other option is to have "align to normal" on (you can actually try this yourself, just select the Stroke node under the mesh parent and look in the Channel Box for "Use Normal", set it to "On"). However this means that the mesh will no longer deform correctly with the curve so I don't think it's a very good solution - I've found it's better to simply tweak the control points until the "twist" goes away.

    Strange that the window doesn't fit the controls - I tried it here on both "classic" and "aero" themes and the controls all fitted. I will double-check that, and probably just make the window sizeable anyway.
  • MoP
    Options
    Offline / Send Message
    MoP polycounter lvl 18
    OK simple fix is up, it just makes the window sizeable by the user.

    Just redownload and overwrite the old .mel file.
  • javi
    Options
    Offline / Send Message
    javi polycounter lvl 16
    it also doesn't fit for me on OSX. Great job so far! I'm loving the simplicity of the script.

    edit: nvm it works great now!
  • killingpeople
    Options
    Offline / Send Message
    killingpeople polycounter lvl 18
  • beartraps
    Options
    Offline / Send Message
    beartraps polycounter lvl 8
    yup, the twist went away. I can't thank you enough for this! nows all we need is a nice path deform script!
  • Lamont
    Options
    Offline / Send Message
    Lamont polycounter lvl 15
    beartraps wrote: »
    yup, the twist went away. I can't thank you enough for this! nows all we need is a nice path deform script!
    Maya does that too. I'll dig it up as soon as I get lunch done for the kids and clean up a few things.
  • gaganjain
    Options
    Offline / Send Message
    Thanks MOP for mel :)
    mopremderablemel.jpg
  • MoP
    Options
    Offline / Send Message
    MoP polycounter lvl 18
    Lamont wrote: »
    Maya does that too. I'll dig it up as soon as I get lunch done for the kids and clean up a few things.

    This was one of the things I was hoping to incorporate into a "super curve tools" pack.
    That and spacing arbitrary objects along a curve at specific distances or specific counts.

    Maya's default tools allow you to do this, but the workflow is so stupid, slow and disconnected that it feels painful to try and set something up that should be a simple click or two.

    Max does this workflow better, with spacing/deforming being handled by a single tool/modifier, while to do the same thing in Maya you have to dig around about 3 different menus, set up keyframes, make a snapshot... gah! So unnecessary!

    The nice thing about a potential "spacing" solution in Maya is that the meshes remain connected to the curve so if you modify it, your meshes will be tweaked too. In Max it's a one-off thing, and your meshes will not be linked to the curve you used to space them. In Maya you would be able to have the curve derived from a mesh, with objects constrained along it, in just one or two clicks - that's what I hope to achieve :)
  • airbrush
    Options
    Offline / Send Message
    airbrush polycounter lvl 13
    Lamont wrote: »
    Maya does that too. I'll dig it up as soon as I get lunch done for the kids and clean up a few things.

    There is a script on creative crash for pathdeform, but i found it not very user friendly.

    Thanks MoP for the script!
  • SHEPEIRO
    Options
    Offline / Send Message
    SHEPEIRO polycounter lvl 17
    woot, mayas my preffered modeler, but i always hated the lack of spline love
  • solar
    Options
    Offline / Send Message
    solar polycounter lvl 18
    Thanks Mop! Working good so far here, and will be an enormous help. Path deform would be great too!
  • Mark Dygert
    Options
    Offline / Send Message
    Ahh... much appreciated MoP! Works great!
  • beartraps
    Options
    Offline / Send Message
    beartraps polycounter lvl 8
    My buddy is writing a path deform script, I'll be sure to post details when he finishes it, i tested it out and its pretty nice.
  • Yodez
    Options
    Offline / Send Message
    beartraps wrote: »
    My buddy is writing a path deform script, I'll be sure to post details when he finishes it, i tested it out and its pretty nice.

    Hey everyone,

    beartraps just let me know this tool would be helpful to alot of Maya artists. So I just wrote this over the past two days or so. Let me know your thoughts. Wanted to get something up a functioning asap to see exactly what you guys are looking for. So have at it.

    I am open to any feedback and would like to make this as robust as I can. Hope it can be useful.

    install How To:
    http://docs.google.com/fileview?id=0B2s2zTm6_vQGNjE4NGJiMGMtNzg5My00MGFjLTk2NzgtODQzOWZhNjRjYWFl&hl=en

    wyPathDeformer_tool info:
    http://docs.google.com/fileview?id=0B2s2zTm6_vQGNGYyMzk1YjEtOGFkMS00MzEzLWI2ODItMWNkY2Q0MmRjYjAy&hl=en

    wyPathDeformer_tool.mel:
    http://docs.google.com/leaf?id=0B2s2zTm6_vQGNzczNDUwODctMjEzZi00MjA4LWEzYmQtMmZkOTI0MjNmMjRj&hl=en
  • srichards00
    Options
    Offline / Send Message
    srichards00 polycounter lvl 12
    Quick question and awesome script btw.(Max user forced to use maya) :poly118:

    How do you make the curve a polygon object once you get it to look how you want it?
  • MoP
    Options
    Offline / Send Message
    MoP polycounter lvl 18
    srichards00: It already is a polygon object. That's the "<curveName>Mesh" in the outliner. By default I set it as un-selectable in the viewport so that it doesn't get in the way when you're tweaking the curve itself... however if you click the "Skip Mesh Selection" checkbox in the UI (or in the channel box of the curve) then you will be able to select the mesh in the viewport.
    You can just do SHIFT+D (duplicate) on the mesh to create a "baked" version of it and leave the original intact if you want.

    BTW I just noticed a minor issue the other day where it tries to rebuild the UI even when you don't have a curve selected. I've done a quick fix and you can re-download the script to get rid of that annoying warning message (if you've been getting it).
  • sama.van
    Options
    Offline / Send Message
    sama.van polycounter lvl 14
    How do you make the curve a polygon object once you get it to look how you want it?

    You can give a look at this movie, it will explain how to extrude an object along a curve.

    This is very for use and you can extrude all shape you would like!

    About 4 clicks for the manipulation :)

    [ame]http://www.youtube.com/watch?v=LsVPuOUmuQw&amp;fmt=18[/ame]
  • nullfed
    Options
    Offline / Send Message
    nullfed polycounter lvl 9
    Hi, Yodez. Thats another cool one too. Thanks for releasing it! a nice automation of the normal process which I always find to be a bit of a hassle.

    After doing a couple of tests, there are a some things I noticed:

    1.When i'm choosing the front/up axis in the UI, it doesn't seem to register what I put in. If I apply the deformer and then change the axes, the object is reoriented as I expect (x=front, z=up, etc)

    2 The 'Move Along path' slider value doesn't register changes from manual input (say if I want to be quite precise with the placement, or just want to nudge the object along the path a little)

    This is on Maya 2010 btw.

    Still, totally usable and thanks again for releasing it. People like you and MoP make me want to get a different kind of brain so i can get into scripting myself (total failure so far!)
  • Yodez
    Options
    Offline / Send Message
    nullfed,


    Thanks for the kind words and testing it out. I will look into those issues and post an update for you.
  • Torch
    Options
    Offline / Send Message
    Torch interpolator
    This MoP guy is such a badass. I really wanted to get this feature in Maya as I saw a lot of mates using it in Max - thanks man, you rock!
1
Sign In or Register to comment.