POV-Ray : Newsgroups : povray.advanced-users : Mesh Question : Re: Mesh Question Server Time
28 Jul 2024 16:15:10 EDT (-0400)
  Re: Mesh Question  
From: Randy
Date: 1 Nov 2004 17:25:00
Message: <web.4186b6ec35e28514944674e10@news.povray.org>
ingo <ing### [at] tagpovrayorg> wrote:
> To be honest, I do not understand what you mean with this. Do you mean
> that compressed mesh files generated with param.inc don't work with
> Colefax' macro's. Do you mean that you can't convert the compressed mesh
> files with excel, or with the same excel script that you use to convert
> the .arr files? Or something else?
>
> What is it you're trying to acheive with converting pov-mesh' to .obj or
> other files?
>
> Ingo

 I am using version 2.1 of the mesh compressor, but I am not having any
problem using parim.inc in it.
 Here is what I am trying to do: I have made an interesting looking tree
trunk model using isosurface functions., but have had no luck attaching
branches to it that I like. So what I wanted to do was export the mesh to
another program and hand make the branches. So I used the approximation
macro, isosurf_KL_JF.inc, which generated an include file that contained
the mesh. So now all I needed to do was export this mesh in a format that
3DWin could convert, to say a LIghtwave object. Being a creature of habit I
decided to use Microsoft Exel to convert the file. As an expeiment I
converted a arbitrary array file generated from perim.inc. I did this
becuase of the fact that this macro could write object files internally and
I wanted to see if I could reproduce the results. When I imported this file
in 3DWin it converted it to an object for lightwave perfectly, except the
faces were all in the wrong direction. No problem just flip them in
lightwave. The incluce file generated by the approximation macro was a
smooth triangle mesh. I converted the file, in excel, with only vertex and
normal vectors. 3DWin did not convert it to a lightwave object. I thought
this to be do to no face indices. So I then used mesh compressor V2.1 to
convert the smooth mesh to a mesh2 format. I converted this file, in Exel,
but 3DWin could not convert this file either.
 What am I missing. Maybe a macro or program already exists that will
convert isosurface functons to an object (.obj) file much the same way that
isosurf_KL_JF.inc wites a smooth mesh file. Just in case I am being math
stupid here is the function I am trying to export:

#declare Tree = function{ f_polytubes(x,y/2,z, 4, -1, -1/100, 1, .1,
-0.25)*1.2 + f_helix2(x,y,z, 0, 3, 1, 0.4, 0, 0.5, 0)*.6}

isosurface {
    function {Tree(x,y,z)}
    threshold 2
    contained_by {box{<-2,-10,-2><2,10,2>}}
    max_gradient 28.622
    pigment {rgb 1}
    scale <.52,.44,.52>
    translate<0,1,0>
}

 I am sorry for my delay in responce, My server went down yesterday

Randy


Post a reply to this message

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