Search Unity

Can you import polylines into Unity?

Discussion in 'Editor & General Support' started by sunny88, Jun 1, 2011.

  1. sunny88

    sunny88

    Joined:
    Jun 1, 2011
    Posts:
    6
    Hi folks,


    I'd like to import .dxf file consisting of polylines.

    But when importing the .dxf file, which consists of polylines by CAD, I can't find anything in Unity scene.

    When .dxf file consisting of polygon by CAD, it works.

    Unity manual says "Unity can read .FBX, .dae (Collada), .3DS, .dxf and .obj files, so if your program can export to this format you're home free."

    Does not Unity support just polylines?

    Pleas help me how to import polyline(.dxf file).


    Thank you very much for reading.

    Any assistance would be appreciated!!
     
    Last edited: Jun 2, 2011
  2. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    no there are no polylines. Unity imports and supports triangle based models so ensure that you export them to such a form.
     
  3. sunny88

    sunny88

    Joined:
    Jun 1, 2011
    Posts:
    6
    Thank you very much for your quick reply ^^

    I need to import polylines into Unity.

    Isn't there any way to do?

    If I ask Unity company to upgrade the Unity for polylines, is it possible?
     
  4. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    Pretty surely not, unity has no support for lines in any form, so its not just a matter for supporting it in the format (which it doesn't) but absense in the engine as such

    It supports meshes as such, if you need something that differs from it you either have to build it from meshes or export the points and use Vectrosity to replicate a similar thing (or naturally something you created yourself)
     
  5. holyjewsus

    holyjewsus

    Joined:
    Mar 7, 2011
    Posts:
    624
    Why don't you pipe the lines in rhino, or sweep a small rectangle along them, they'll come in appearing as lines then.
     
  6. sunny88

    sunny88

    Joined:
    Jun 1, 2011
    Posts:
    6
    Does Vectrosity support .dxf file?

    I have .dxf file, which was completed by CAD and comsists of polylines, and want to import it into Unity.

    So, is it possible that Vectrosity imports .dxf file, exports Vetrosity file and the file is imported into Unity?

    I can't try to use Vectrosity without buying. Isn't there Vectrosity trial version?



    to redmacmanz,

    That's polygon. I did, but It was too heavy.
    Thank you anyway.
     
    Last edited: Jun 2, 2011
  7. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    Vectrosity doesn't have .dxf file support, sorry.

    --Eric
     
  8. sunny88

    sunny88

    Joined:
    Jun 1, 2011
    Posts:
    6
    Thank you for your anwer.

    There is no way?

    Help me.................!
     
  9. sunny88

    sunny88

    Joined:
    Jun 1, 2011
    Posts:
    6
    What kind of files does Vectrosity support?

    Are there other 3D Tools' files that Vectrosity supports among the files Unity can read? (.FBX, .dae, .3DS, .dxf and .obj)
     
  10. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    none
    You create the lines from code.

    There is no way to get polylines in without you writing an importer that understands them and then convert it to something that exists at all (either something using the mesh class or converts it to a dataset usable by code using vectrosity)

    Might sound unfavorable, but CAD software does not tend to create "realtime meaningfull data" and polylines as well as a plentitude of other things unhappily fall into that category.
    Optimally you seek to triangulate etc all before export where possible as the rest will just "be gone" in the model itself

    Whats normally done is that you write a script for the cad / 3d software itself which extracts the information and exports it to a text file in some format you then later parse in unity /whatever engine and interpret accordingly
     
  11. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    Only its own really simple format, which is just a series of Vector3s (each pair of Vector3s describes one line segment), output as a binary file. Theoretically I guess it's possible to write some kind of importer, which takes the file and converts it to a series of line segments.

    --Eric
     
  12. sunny88

    sunny88

    Joined:
    Jun 1, 2011
    Posts:
    6
    none! Your answer was helpful to me.

    Thank you all,

    Good to know this community. Nice community!

    I'm going to use this a lot. ^_____^
     
  13. SirFency

    SirFency

    Joined:
    Apr 2, 2010
    Posts:
    91
    You should be able to import the file into blender, its free. Then export it from there into unity. Also you can import these types of files in 3ds max and Maya. You could download the student 30 trial version for free and be able to get the mesh out of those programs into unity. The mesh will be extremely dense and no good for a game engine however. There will need to be some major optimization of the mesh to lower the poly count to something usable. Most likely. Good Luck.
     
  14. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Vectrosity lets you use any unity mesh to generate wireframes from using its editor script, its a little utility built into unity when you get vectrosity... at the price the author is selling it for, how can you do wrong?