Reply
Reply
 
Thread Tools Display Modes
Quickwits92's Avatar
Old (#1)
Hello,

I'm using MaxScript for a uni module and my idea to create a scene generator. I'm keeping it simple for now and sticking with just a hilly scene.

What I would like to know is how to create a road using maxscript. Ideally, I would like to be able to select a spline, then create a box at the start and have it extrude along the spline.

Thanks
Offline , null, 10 Posts, Join Date May 2012, Location Portsmouth, England  
   Reply With Quote

respawnrt's Avatar
Old (#2)
Select a path or shape. Create panel (Geometry) Compound Objects Object Type rollout Loft Select a path or shape. Create menu Compound Objects Loft

Or search in max reference compound loft.
Offline , triangle, 492 Posts, Join Date Dec 2011, Location Romania, Bucharest  
   Reply With Quote

Quickwits92's Avatar
Old (#3)
Thanks but I'm looking to do this in maxscript so I need the code to automatically do this process
Offline , null, 10 Posts, Join Date May 2012, Location Portsmouth, England  
   Reply With Quote

respawnrt's Avatar
Old (#4)
Don't you have to create the scene generator ? As in you ? :p
Offline , triangle, 492 Posts, Join Date Dec 2011, Location Romania, Bucharest  
   Reply With Quote

Quickwits92's Avatar
Old (#5)
Yes, I'm writing code that automatically creates hills, trees, rocks, etc for the user. What I want is for the user to create a line on the plane that has been created and for them to press a button which will create a road along that line.
Offline , null, 10 Posts, Join Date May 2012, Location Portsmouth, England  
   Reply With Quote

respawnrt's Avatar
Old (#6)
Does this help ? http://www.scriptspot.com/3ds-max/scripts/arrangement i haven't tried it or anything .
Offline , triangle, 492 Posts, Join Date Dec 2011, Location Romania, Bucharest  
   Reply With Quote

Quickwits92's Avatar
Old (#7)
Thanks but I've managed to do that before but it struggles to work going round corners because it makes multiple boxes, it doesn't look smooth.
Offline , null, 10 Posts, Join Date May 2012, Location Portsmouth, England  
   Reply With Quote

cptSwing's Avatar
Old (#8)
Back when I messed around with the Loft modifier, i ran into a brick wall because it's not exposed to scripting.. :-/
Offline , polycounter, 1,286 Posts, Join Date Aug 2011, Location Berlin  
   Reply With Quote

Quickwits92's Avatar
Old (#9)
Yeah, you don't loft in MaxScript. That's why I want it to extrude along the spline. That I know you can do, I'm just not sure how.
Offline , null, 10 Posts, Join Date May 2012, Location Portsmouth, England  
   Reply With Quote

respawnrt's Avatar
Old (#10)
So dude i recorded with the max listener and this is what i get.
$.EditablePoly.SetSelection #Face #{2}
macros.run "Editable Polygon Object" "EPoly_Extrude_Along_Spline"
$.extrudeAlongSplineNode = $Line001
$.EditablePoly.ExtrudeAlongSpline ()
Can you make it to get the face that forms the road section and the line that user wants and make the script ?
And yes you are right it uses the extrude along spline.
Offline , triangle, 492 Posts, Join Date Dec 2011, Location Romania, Bucharest  
   Reply With Quote

Quickwits92's Avatar
Old (#11)
Ah, thanks a lot I can use that, I just need a way to place the box on the end of the line to start off with...
Offline , null, 10 Posts, Join Date May 2012, Location Portsmouth, England  
   Reply With Quote

respawnrt's Avatar
Old (#12)
getKnotPoint <shape> <spline_index_integer> <knot_index_integer> use this to get
the coord of the first vertex(knot) in the line and move your box to that point ?

Offline , triangle, 492 Posts, Join Date Dec 2011, Location Romania, Bucharest  
   Reply With Quote

Quickwits92's Avatar
Old (#13)
Thank you!

Last thing to do now is to make my road mold to the plane...

Last edited by Quickwits92; 05-06-2012 at 07:15 AM..
Offline , null, 10 Posts, Join Date May 2012, Location Portsmouth, England  
   Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Copyright 1998-2012 A. Risch