Construction of object from vertices point

Construction of object from vertices point

Anonymous
Not applicable
3,748 Views
23 Replies
Message 1 of 24

Construction of object from vertices point

Anonymous
Not applicable

Hi all,

 

I am new to 3ds Max. Currently, I have to construct a 3D model of urban area (with buildings only). Now, I have all the vertices, (i.e. just the corner points of a solid) of the building stored in *.xyz format. Is it possible to construct a 3D object just from this data file?

 

Any help or advice is appreciated.

 

Many Thanks.

 

Dominic

0 Likes
Accepted solutions (3)
3,749 Views
23 Replies
Replies (23)
Message 2 of 24

irishman_team_kilber
Mentor
Mentor

more info needed really what do you mean construct a 3D object just from this data file you can import most models/animation into max if the extensions is listed, you mite able to find a plugin or script that lets you use it in max or do you mean automatically construct a 3D object?

 

 

0 Likes
Message 3 of 24

Anonymous
Not applicable

I'm going to try to answer. A screenshot of what you have and what you are tyring to do might help us.

 

I'm assuming you drew some 2D rectangles and squares and now you want to give them some height....is that correct? Or are you saying that you drew some lines (splines) and outlined the building on all 6 sides and want to turn it into an opague box?  ....or are you saying something else?

 

Screenshot please.  🙂

 

Dean

0 Likes
Message 4 of 24

Anonymous
Not applicable

Thanks for your reply.

 

What I meant is that:

 

Let say, for simplicity,  if I want to make a 3D cube, but I only have the coordinates of all the 8 vertices of the cube. Is it possible to tell 3ds Max to give you a cube by just knowing the coordinates?

 

In fact, I would need to construct not only the rectangular cylinder, but also cylinder with other cross-sectional shapes, like triangle, cross shape, hexgon,  etc. (but never circles).

 

Thanks very much!

0 Likes
Message 5 of 24

Anonymous
Not applicable

 

Thank you for your help!

 

I opened my *.xyz file in MeshLab. (shown on the following photo) Points indicate the location the vertices of the buildings.

 

But what I want exactly is to convert these point data to a solid buildings, just like in the second photo.

 

 

MeshLab.png

(The first photo)

 

Mytarget.png

(The second photo)

 

 

For your reference, I also attached my data file in *.txt format.(name: Data.txt ).

 

Thank you in advance for your kind assistance.

 

0 Likes
Message 6 of 24

irishman_team_kilber
Mentor
Mentor

Is there still keyboard entry in the newer version of max? as i am using max 9 i am doing old school on mine i have keyboard entry where you can enter the XYZ numbers LWH (length width and height) then under that i have button to create an object of the specifications i want to use then max will put in the viewport once you click create, 

 

https://knowledge.autodesk.com/support/3ds-max/learn-explore/caas/CloudHelp/cloudhelp/2015/ENU/3DSMa...

 

Maybe this is not what you want?!

Message 7 of 24

bob.bernstein
Collaborator
Collaborator
Message 8 of 24

leeminardi
Mentor
Mentor

The data file seems to be just a list of point coordinates with no indication of which should be used for what type of object.

 

Perhaps you can take an approach I suggested in response to a similar recent request by importing the data into Excel and create a Max Script.

 

https://forums.autodesk.com/t5/3ds-max-forum/how-to-generate-objects-based-on-a-csv-or-excel-file/m-...

 

~Lee

lee.minardi
Message 9 of 24

Anonymous
Not applicable

Yes, this is not what I really want.

Anyway, Thanks for your kindly help!:)

0 Likes
Message 10 of 24

Anonymous
Not applicable

It seems yes. But do you know how to create a RCP or RCS files? Or do you know what is the definition of RCP or RCS files?

 

Because this method doesn't support *.xyz file.

 

Thank you very much.

0 Likes
Message 11 of 24

Anonymous
Not applicable

This is great! But how about if I also need to construct buildings with other cross-sectional shapes?

 

The example in your link only work for cube-shaped buildings. I do need to create cylinders with other cross-sectional shapes like cross-shape, L-shape, etc.

 

Would you know how to do that?

 

Thanks in advanced !:)

0 Likes
Message 12 of 24

leeminardi
Mentor
Mentor

Check out Autodesk Recap for rcp files.

lee.minardi
0 Likes
Message 13 of 24

leeminardi
Mentor
Mentor

The file Data.txt contains 128,063 lines of data.  Each line appears to be x,y,z coordinates.  Many pairs of data contain the same coordinate.  There's no apparent data to indicate that some points should be used differently to define a box, vs. an L shaped object vs. a cylinder, etc.  Many point pairs define vertical lines. The data could be imported in 3ds Max as vertical line, points, and polylines at an elevation of 0.0.  You could then use the lines to manually build 3D shapes  Is this what you would want to do?

lee.minardi
0 Likes
Message 14 of 24

Anonymous
Not applicable

Thank you very much for your reply.

 

I go to the following website:

 

https://knowledge.autodesk.com/support/autocad/learn-explore/caas/CloudHelp/cloudhelp/2016/ENU/AutoC...

 

and read something about the *.RCS file. But my data file is not exactly point clouds data, just those points indicating the corner of a buildings.

 

 

Now I come up with an idea:

 

1. I create a file called "shape.xyz"

      This file contains only the x- and y- coordinates of the vertices of the projection of the buildings on the xy-plane.

      Each building has its own Class, and the building class contain the x- and y- coordinates of the vertices of the projection of that particular building 

 

2. Then I create another file called "height.txt"

      This file contains the height of the buildings.

      Each height data also belongs to  a class of that particular building.

 

3. Create buildings:

      Import the shape file to define a surface on the xy-plane

      Then, I extrude the surface according to the height.txt

 

 

My question is:

Is it possible to do that?? I create samples of "shape.xyz", "height.txt", in case my expression is not clear enough.

(i.e. The class name is the numbers start with "110")

 

Thanks in advanced. Any comments are appreciated.

0 Likes
Message 15 of 24

leeminardi
Mentor
Mentor
Accepted solution

I experimented a bit with the data file you posted that only had xyz coordinates.  I assumed that all "buildings" had a base elevation of zero. Some building had a top elevation of zero.

 

I imported the data into Excel.

 

First, since the 3ds Max data base is only good to 7 significant figures you do not want to place objects far from the origin 0,0,0.  I translated the x coordinates by -838000 and the y coordinates by -821000. This yields a more reasonable range of coordinates to work with.

 

Since every other line of data is a duplicate of the previous line except with a different z value I created a macro to delete every other line.

 

I then created an Excel/VBA program to write an AutoCAD script file. It scans down the elevation values and creates a polyline from the coordinates, closes the polyline and then extrudes the shape to a value specified by the elevation value.  It does this for every change in elevation.

 

When I run the resulting script file in AutoCAD it halts when it finds a self-intersecting profile.  There are many of these in the data I used.  For example, the profiles at z = 78.6, 85.6, 174.1, and 8.9 are self intersecting.  I deleted the data for these elevations and was able to produce a file with 33 objects before it stopped due to bad data.  My program creates a new layer for each new polyline so that separate objects are created when the .dwg file is imported to 3ds Max.

 

I've attached a copy of the Max file that was created using this process.  Let me know if this file is representative of what you would expect.

 

~Lee 

lee.minardi
Message 16 of 24

Anonymous
Not applicable

Yes!! That's really what I want!!

 

THANK YOU VERY MUCH!

 

As you know, I am new to 3ds. What do you mean by self-intersecting profile? 

 

Moreover, could you send me your program if you don't mind ? Or show me some useful references related to your work?

 

Thanks again! You really help me a lot! 

 

(My e-mail is : dominictai4444@gmail.com )

0 Likes
Message 17 of 24

leeminardi
Mentor
Mentor
Accepted solution

Here's an example of a self-intersecting polyline.  It is the shape from your data that should be extruded to a height of 78.6.

 

SelfIntr.JPG

 

The profile intersects itself.  This is a no-no for extrusions.

 

I've attached the Excel file with  your data and my VBA program.  YOu will need to enable the use of macros to use it.

ExcelBuildScript.JPG

The program takes the values from B2 and B3 to calculate the offset coordinates so that the geometry will be closer to the origin.  It then prompts you to enter a starting row number and an ending row number.  The program only looks at odd numbered rows since the even number row are a duplicate.  The odd numbered rows contain height info.

 

I added an option to give you the  choice of extruding polylines or not.  Try running the program with a few thousand rows.

 

The output from the program is an AutoCAD script file (.scr) which can be found in the same directory as the Excel file.  Run the script in AutoCAD.  YOu can easily import an AutoCAD drawing into 3ds Max.

 

Be sure to turn off object snaps before running the script in AutoCAD.

 

 

 

 

lee.minardi
Message 18 of 24

Anonymous
Not applicable

Thank you so much!! This is extremely useful!!

 

However, the program doesn't create *.scr file as expected in my computer. Would you know why?

0 Likes
Message 19 of 24

Anonymous
Not applicable

Okay, I think that's the problems of my computer. Your program works very well. Thanks again!

0 Likes
Message 20 of 24

leeminardi
Mentor
Mentor
Accepted solution

Here's a revised version of the program that outputs some summary information at the end. It is also much faster as it turns off screen updating.

 

I assume you have found the .scr file that the program creates.

 

I would not process more than a few thousand points at a time but you can experiment to see what works. I will be traveling for the next two weeks and will not be able to address any issues that may arise.

 

Good luck!

lee.minardi