POV-Ray : Newsgroups : povray.general : spatch or hamapatch file format Server Time
7 Aug 2024 03:18:40 EDT (-0400)
  spatch or hamapatch file format (Message 1 to 3 of 3)  
From: Richard D
Subject: spatch or hamapatch file format
Date: 8 Dec 2001 17:54:36
Message: <3c129a2c$1@news.povray.org>
Hi,

Does anyone know what the spatch or hamapatch file format is?

Basically, I want to convert a mesh2 from Povray into spatch or hamapatch.
I looked at the some of the spt and hmp files, but I can't quite figure it
out.

Thanks!
Richard.


Post a reply to this message

From: Warp
Subject: Re: spatch or hamapatch file format
Date: 9 Dec 2001 07:51:28
Message: <3c135e50@news.povray.org>
Richard D <a20### [at] rogerscom> wrote:
: Basically, I want to convert a mesh2 from Povray into spatch or hamapatch.
: I looked at the some of the spt and hmp files, but I can't quite figure it
: out.

  I think that would be quite difficult, as those programs use some type of
bicubic patches, not meshes. Converting a mesh to a bicubic patch can be
a close to impossible problem.

-- 
#macro N(D,I)#if(I<6)cylinder{M()#local D[I]=div(D[I],104);M().5,2pigment{
rgb M()}}N(D,(D[I]>99?I:I+1))#end#end#macro M()<mod(D[I],13)-6,mod(div(D[I
],13),8)-3,10>#end blob{N(array[6]{11117333955,
7382340,3358,3900569407,970,4254934330},0)}//                     - Warp -


Post a reply to this message

From: Richard D
Subject: Re: spatch or hamapatch file format
Date: 9 Dec 2001 16:17:10
Message: <3c13d4d6$1@news.povray.org>
>   I think that would be quite difficult, as those programs use some type
of
> bicubic patches, not meshes. Converting a mesh to a bicubic patch can be
> a close to impossible problem.

Yes, you are correct.  But I managed to partially do it (enough for my
needs).  I figured out the spatch format (by trying various samples) and by
making all curves not smooth (equivalent to using the peak tool on all
vertices), I was able to do a partial conversion.  The program I wrote to do
the conversion, will make all curves only touch two points (so they are all
straight lines).  So I managed to convert it, but without normal and uv
mapping information.  I might attempt to write another convertion program to
convert it back to meshes.


Post a reply to this message

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