POV-Ray : Newsgroups : povray.general : How do I use a .DXF file in POV? : Re: How do I use a .DXF file in POV? Server Time
12 Aug 2024 07:21:53 EDT (-0400)
  Re: How do I use a .DXF file in POV?  
From: John M  Dlugosz
Date: 7 Mar 1999 21:47:54
Message: <36e33a5a.0@news.povray.org>
I was wrong in my original posting:  The CrossRoads functionality matrix
said that *reading* POV was coming soon.  It had no trouble writing it.

However, it took over 21 minutes to 'Open' the DXF file, which is not very
practical.  It output plain triangles, not smooth triangles.  So I wonder if
the lack of smoothness has to do with the way the DXF file was made?  In
another iteration, Mick Hazelgrove [mha### [at] mindaswinternetcouk] had sent
me .INC files from Poser data, and they were all made with smooth triangles.
This time he sent me a (much smaller!) DXF file, and I've been trying to
convert it without much success.


Ken wrote in message <36E30FBE.7B04DBCA@pacbell.net>...
>I have had no problems with the output from CrossRoads3d in any
>version of Pov I have used. While it was released sometime ago the
>syntax has not changed in so long it is not a relevant issue.
>WCVT2POV has the limitation that it declares unions of triangles,
>smooth or otherwise, but CrossRoads3d being it's successor declares
>them as meshes of triangles, smooth or otherwise, and is compatible
>with all current versions of Pov. Keith Rule just hasn't updated his
>page to reflect the fact that it is compatile with pov v3.1x.


Yes, the Crossroads output, which looks like this:

object {
  // _X1_X2_G0
  mesh {
    triangle {
      <-0.010068, -0.100347, -0.127565>,
      <-0.010400, -0.100338, -0.127578>,
      < -0.009900, -0.094189, -0.128220>
    }
  // ...

was read by POV 3.1 "Superpatch" with no problem, once I stripped out the
rest of the stuff CrossRoads wrote that I didn't ask for.  It made a POV
file complete with textures, not a INC file containing just the mesh and a
#declare for me to use it with.  Any suggestions on how to operate it?
There is no help file or instructions of any kind, just an EXE and copies of
POV's standard INC files (why?).

It also took more than 21 minutes of CPU time to open the file!!!  So I
don't think it's going to work for me <sigh>.


>  3Dwin will produce smooth triangles for you. It uses a more
>sophisticated method than many other programs in that it evaluates
>the vertice junction and faces then decides if it meets the criteria
>for smoothing as established by the smoothing angle you choose in the
>options section. If you choose a border line amount of smoothing then
>it may only produce 20% of the triangles as smooth triangles and the
>rest will be as normal triangles. If you set the angle higher it will
>start to add more smooth triangles accordingly. There will still be a
>mix but there is no reason that you can't have both present inside the
>same mesh statement.
>
>  The other programs I have used have only two options. They either use
>all triangles or they use all smooth triangles. 3Dwin on the other hand
>only uses smooth triangles as needed to give the smoothing angle that you
>the user decides is necessary for your model. This has the advantage
>of not stressing areas that don't need smoothing and it also aids in
>file size reduction since regular triangles require considerably less
>data in the scene file to represent the model.

Interesting.  So it's a matter of choosing suitable options on the export
(or on the import?).  I thought that vertex normals would be part of the DXF
format.  So Is DXF flat facets only?


>
>  Using .DXF files off the net in pov is problematic. They generally
>contain only face data or vertices data, sometimes both, and conversion
>programs are notorious for taking only certain parts of the data for
>the conversion. Additionally .DXF files do not contain the original
>texturing data that the original modelling package used to produce the
>file so usually you get very little control over how many parts of
>the file are segmented for texturing individual sections.
>
>  The .3DS file format as well as several others overcame this by using
>a completely different method of describing the models characteristics.
>3DWin is excellent for maintaining a close approximation of the colors
>used in the original, and it will not group everything into one single
>mesh that will take but one texture. DXF files are notorious for this.
>Several other file formats offer far more versatility than the .DXF
>format and for that reason when shopping for models this limitation in
>the DXF file format should be kept in mind.


I'm finding this very interesting.  So what's the best way to go from Poser
3 to POV?
I don't know how Mick created this DXF file, but once I know better, 3-D
meshes I create myself can be set up better.  To this end, any advise is
much appreciated.

>
> I hope you have found this informative as well as answering your question.


Is there documentation on the .3DS format?  If .3DS is "3-D Studio" then
Poser has that listed on its export options.  If that's the best format to
use, it might be handy to write a Perl script to do the conversion if
nothing out there is (1) simple, and (2) uses all the relevant data.

--John


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.