Problem exporting OSM file from DXF file.

willjm

02-07-2007 19:43:33

I have an AutoCAD Drawing (*.DWG,*.DXF) that I'm importing into 3ds max and am trying to export as an oFusion Scene. The problem I'm having is that the meshes are not exporting. What's confusing is the meshes seem to be viewable via the oFusion Viewport perspective. I have been able to apply different color materials to the various meshes. I can also see that the normals are facing the direction they should be. I will outline the steps I have taken to import, modify the model then export it.

File -> Import...
Select the .dxf file and click Open
choose my file and click open

(the only changes I made to the dialog that pops up was in the include section; included were Lights and Views and Cameras)
Clicked the OK button

At this point I have the model loaded in 3ds Max. There are 5 layers in this model. I hide 4 of them and work with one layer at a time.

I click on the Modify tab
I select Edit Mesh from the Modifier List
I select the Face icon in the Selection
I then clicked in the Top view and press Ctrl + A to select all faces. There are 54 faces selected.
I then add a material to the mesh.
I repeat these steps for all layers.
I then right click on the perspective view and click Views -> Extended -> oFusion Viewport and view my model in the viewport.
I then click oFusion -> Export Scene
I name the file
I click Save and Click Export from the oFusion Exporter.
When I try to open my model in the application, I see nothing.

Also, there are no mesh files being generated after exporting the model. I do get a material file though.

Can anyone shed some light as to what's going on? Thanks!

willjm

02-07-2007 19:56:38

As a simple test I added a cube to the scene and exported it via the oFusion Exporter. This did generate a mesh file.

Paulov

02-07-2007 20:59:13

I work with Autocad files and have no problems

Give a look to this.

http://www.ogre3d.org/phpBB2addons/view ... ht=autocad

bye.

willjm

03-07-2007 18:38:36

Just as another test to see what gets exported to oFusion from 3ds max, I have imported my .dxf file and created two objects using 3ds max. As usual, the .dxf portion (object in white in the picture below) did not export and seems to throw an exception if I look at the log. The box (object in yellow) did export properly and the .mesh file was created. The line (object in green) does not seem to export properly or generate a .mesh file either. No exceptions were thrown when exporting the line.



This is the contents of my oExporter.log file after exporting the scene to oFusion.


  1. 12:40:18: == Exporting Objects ==


    12:40:18: Exporting Shape: Block:RUNWAY


    12:40:18:

    Unhandled Exception while processing Block:RUNWAY


    12:40:18: Exporting Object: Box02


    12:40:18: Object has 1 texture sets


    12:40:18: Compiling material Box02_mesh_material


    12:40:18: Mesh: Box02_mesh.... done


    12:40:18: Exporting Shape: Line01


    12:40:18:

    == Exporting Materials ==


    12:40:18: Box02_mesh_material


    12:40:18: 1 material(s) exported to syracuse_export.material
    [/list:u]

    Is there/Will there be a way to export lines or possibly convert them into an object that can be exported?

Paulov

03-07-2007 20:17:10

Hey!!

oke, so you finally managed to do those tunways with Autocad.

Look, what you´re importing from Autocad, are lines.

You need meshes.

You must do the following.

Estruthe those lines with "face extrude" modifier, so that you generate a geometry.

To be able to extrude those closed lines, some requisites must be fullfilled.

The rectangels must be formed by a closed line. Probably you´ve drawn them with single line, when this is done, In Autocad, you can select each line independently. You need to do the following:

write "contour"* comand in the comand line, then clind inside each rectangle. You´ll see that a new polyline has been created, this polyline is a closed, single, sucesion of lines.

With this, go to max and aply Face extrude modifier.

Note that, if in Autocad you have drawn the runway in meters, in example
150 units equals 150meters of the reality in max you´ve to set ups the programs to meters.

Customize--> unist system---> metric--> meters.

When importing the Autocad File, check the "rescale"box and se teh "incoming units" to ---> meters.

Also ther should be an option to generate a single objet for each Autocad, objet or similar.


Good luck

in spanish is "Contorno" hope that inenglish is contour.

willjm

03-07-2007 22:21:37

OK, after tooling around some more with importing the .dxf model and applying different modifications to the
imported polygons, I've come up with a way to successfully export my model to an oFusion file and get the
.mesh files as well. Here are the steps I took to successfully export my model.


  1. I import the .dxf file.

    In the dialog box prior to importing I selected "Entity" in the "Derive AutoCAD Primitives by" section of the import dialog.

    I then click the OK button and import my model.

    For each layer I have to rename the object in the layer from Block:SOMETHING to SOMETHING and add a
    "Turn to Mesh" modifier

    Atfter doing this with all the objects in the layers I export the model and get the .mesh files as well as the .osm file as desired.
    [/list:u]

    From performing these steps, I have come up with the following questions...

    Applying the "Turn to Mesh" modifier makes sense, but would anyone have any idea why a name change is necessary?

    Are there any conventions that must be followed when naming an object?

    Is there any way, in 3ds max, to perform these simple modifications in one fell swoop in the event of having 1000s of objects?

Paulov

04-07-2007 11:27:15

You can extrude all the objets in a layer at the same time by selecting them by layer. Get the layer manager somewhere from the menu, cant remember where it was.

Having to rename everything is a ***t. I hate that Ogre generates a single .mesh for each element, it has no sense...

anyway

download the

renaming army knife script that will help you to rename everything automatically. Its a very usefull script

Evak

04-07-2007 15:11:41

There is a rename tool in 3dsmax with a whole bunch of options regarding numeration, pre and post fix etc which can be really handy and makes things less tedious.