Mesh Surface

21 votes
Version: 
0.02a
Author Name: 
Vojtech Cada

Creates surface defined by four splines. The order of picking the splines matters - they should form a closed loop. If you get a weird looking mesh, try once again starting with another of the four splines:

Note that if any of the splines are animated, the resulting mesh is animated, too.

Additional Info: 

Installation:

Copy the .ms file to your scripts\startup folder or run as a script if you only want to try it out. The object primitive will be available under Examples in the Create panel.

There's also an additional .mcr file - after you've installed the .ms file, it's enough to run the .mcr file once. It creates a Make Surface From Selection item in the Shortcuts category under Customize UI, which you can then add to a quadmenu or assign a shortcut to it (that's what I'm showing in the preview gif). To use it, select the four individual splines in a circular manner (counter-clockwise is preffered but will work with either - you can always flip normals) and press the button/keyboard shortcut.

Version Requirement: 
3ds Max 9
AttachmentSize
meshSurface.ms6.38 KB
meshSurfaceFromSelection.mcr558 bytes

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Swordslayer's picture

 

Should be fixed now.

dreamerdreamers's picture

.mcr Error

Hi Swordslayer,

Thanks for this great script!
I got this error everytime i'm using the toolbar button/keyboard shortcut

-- MAXScript MacroScript Error Exception:
-- Type error: Call needs function or class, got: undefined
-- MAXScript callstack:
-- thread data: threadID:7316
-- ------------------------------------------------------
-- [stack level: 0]
-- In codeblock macroScript: Shortcuts_meshSurfaceFromSelection; filename: C:\Users\(USERNAME)\AppData\Local\Autodesk\3dsMax\2018 - 64bit\ENU\usermacros\Shortcuts-meshSurfaceFromSelection.mcr; position: 256; line: 8
-- Locals:
-- meshSurface: undefined
-- Externals:
-- ------------------------------------------------------
-- [stack level: 1]
-- called from top-level

i already put the .ms file in scripts/startup folder, at first the macro works, but it stopped working after i restart 3ds max, any idea what's wrong?

Swordslayer's picture

Different usecases for each

As you can see on the demo gif, the number of knots of each spline doesn't matter (note the knot in the middle of the top spline) which is not the case with Surface modifier - there, you're limited to single-segment pieces. All the splines have to be attached, too, and you cannot separately set different subdivisions in each direction - which comes in handy especially with thin strips where you want more subdivs along the long sides and less along the short ones. Last but not least, a source code is provided so if you want to adapt it to your specific needs, nothing prevents you from doing so (or paying someone to do that for you).

Oh, and you don't have to add a TurnToMesh to see the mesh representation, it's already a mesh.

lwan's picture

Now this may be just an

Now this may be just an exercice script but... Surface modifier in max does just that since over 15 years and is not limited to 4 splines but any 'mesh' of splines with 3 or 4 'sides'

EliderDeli's picture

Thank you very much I will do

Thank you very much I will do that :)

xiaozhao's picture

Not friends, this is not

Not friends, this is not enough. I have tested several times. I used the 2016 version. I also followed the installation method suggested by you. The result is that each time you start the software, you must pull these two files back into the software to start this. Plugin

Swordslayer's picture

No you don't have to do that

No you don't have to do that at all, did you read the Installation part?

xiaozhao's picture

Friends can now be reused,

Friends can now be reused, but there is a small problem. Every time you use it, you need to drag the plugin back into the interface. I want to be able to modify it. You don't have to manually install it every time you start it.

Swordslayer's picture

 

EliderDeli: Oh, that's just a floating point literal, it means the value is a double. As for the math, have a look at bilinear interpolation, and in general anything and everything at Paul Bourke's website.

EliderDeli's picture

Sorry for that I meant ->

Sorry for that I meant -> 1d0
Any reading advices for the math behind the script
Thank u in advance
Greetings EliDerDeli

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.