Starting in December, we will archive content from the community that is 10 years and older. This FAQ provides more information.
I want to write MAXScript file to create 3D models of houses after I enter number of floors, length, and width in a dialog box. How do I create a dialog box? Is there a different kind of extrude command? One end of the house is open instead of closed. Is there a different way of drawing the house shape before extruding it? Are there good written tutorials on MAXScript?
From Autodesk 3dsmax Learning Channel:
https://www.youtube.com/watch?v=kc1lZ7fyaqs&list=PLnKw1txyYzRmwWJ1K7tlBSjiy42YVZ86K
Here use of a free script called Building Maker 😉
Ok, In addition to the advice that I have stated above, I have created a script for you called "Quick Create House". See if you can be helpful and studies the creation code 🙂
Thank you very much for the CreateQuickHouse script. I made some changes to the script so that I got it working the way I want. How do I have the script create the house where I click in the 3D world?
How can I use mouse tools in my script? What about pickpoint()? How can I break Point3 into three separate parts and put the parts into the below line?
pl = Plane length:floorheight1 width:sp_width.value pos:[0,0,floorheight2] isSelected:on widthsegs:1 lengthsegs:1
Mmmhhh try this but it is to be fix... more than this I don't know :D
on bt_create pressed do ( tool create ( on mousePoint clickno do if clickno == 1 then createHouse() else #stop on mouseMove clickno do pl.pos = gridPoint ) startTool create )
I think I got the script working. In the MAXScript Help, there is a function that finds angle of a line between two points. I would like to make two clicks, find angle of a line between two points, and draw a house at an angle. Will this work?
Vector Dot Product
dot <point3> <point3>
Returns the vector dot product.
The geometric interpretation of the dot product is the length of the projection of the first vector onto the unit vector of the second vector. Obviously, when the two vectors are perpendicular, the dot product is 0.0.
The dot product is commutative, which means that dot X Y == dot Y X.
The dot product is associative, which means that dot (r*X) Y == r*(dot X Y).
The dot product is distributive, which means that dot X (Y+Z) == (dot X Y) + (dot X Z).
Because the dot product of two normal vectors is the cosine of the angle between them, the dot product can be used conveniently to calculate the angle between two vectors:
FOR EXAMPLE |
fn GetVectorsAngle v1 v2 = (theAngle = acos(dot (normalize v1) (normalize v2)) ) |
GetVectorsAngle [10,0,0] [10,20,0] 63.435 |
Here is the screenshot showing you how I want the script to rotate the house to match the angle of the gray rectangle.
Try and adjust it!! 😄
rollout test "Test" ( button cb "" fn GetVectorsAngle v1 v2 = (theAngle = acos(dot (normalize v1) (normalize v2)) ) on cb pressed do ( for c = 1 to 2 do ( ClickPos = pickPoint snap:#3D () Point name:((uniquename "PointClickPos") as string) pos:ClickPos ) gv = GetVectorsAngle $PointClickPos001.pos $PointClickPos002.pos rotate $ (angleaxis gv[0,0,1]) delete $PointClickPos001 delete $PointClickPos002 ) ) createdialog test
I found out that 3DS MAX 2016 has a new feature called "MAX Creation Graph". Is it possible to move the code to MCG?
Can't find what you're looking for? Ask the community or share your knowledge.