 |
 |
|
 |
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Just a simple demonstration of the Mezz Deformer I'm working on.
Comments appreciated!
Rune
--
\ Include files, tutorials, 3D images, raytracing jokes,
/ The POV Desktop Theme, and The POV-Ray Logo Contest can
\ all be found at http://rsj.mobilixnet.dk (updated January 6)
/ Also visit http://www.povrayusers.org
Post a reply to this message
Attachments:
Download 'torustwist.mpg' (126 KB)
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Cool, but it gets a bit blocky.
What's the main advantage of your method?
Remco
Rune wrote:
>
> Just a simple demonstration of the Mezz Deformer I'm working on.
>
> Comments appreciated!
>
> Rune
> --
> \ Include files, tutorials, 3D images, raytracing jokes,
> / The POV Desktop Theme, and The POV-Ray Logo Contest can
> \ all be found at http://rsj.mobilixnet.dk (updated January 6)
> / Also visit http://www.povrayusers.org
>
> Name: torustwist.mpg
> torustwist.mpg Type: MPLAYER2 File (video/mpg)
> Encoding: x-uuencode
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Not quite sure what I would use this for, but it looks cool, nonetheless....
Hey! Why don't you twist that cadillac model that's so popular? Or better:
make it "walk" along in the way a snake would move... :)
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Rune wrote in message <3a65e06a@news.povray.org>...
> Just a simple demonstration of the Mezz Deformer I'm working on.
fine. looking at your example I have a question
is there any difference beetween this result and results of my deform patch
presented in p.b.i during last month ?
as long as you work on mesh this is faceted
but my patch work fine with *any* object
I'll make animated example for you
perhaps there should be speed comparison
mesh->mezz->rendering will win
but perhaps deform->teselation->rendering could be more accurate
ABX
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"Wlodzimierz ABX Skiba" wrote:
> fine. looking at your example I have a question
> is there any difference beetween this result and
> results of my deform patch presented in p.b.i
> during last month ?
Last I heard, your deform patch could do reversible deformations only.
With my method any deformation can be done.
> as long as you work on mesh this is faceted but my
> patch work fine with *any* object
Doesn't this slow down the rendering?
My method does not slow down the rendering at all. The parsing is a bit slow
though.
> I'll make animated example for you perhaps there
> should be speed comparison mesh->mezz->rendering will
> win but perhaps deform->teselation->rendering could be
> more accurate
My method produces results as accurate as the input mesh is.
Rune
--
\ Include files, tutorials, 3D images, raytracing jokes,
/ The POV Desktop Theme, and The POV-Ray Logo Contest can
\ all be found at http://rsj.mobilixnet.dk (updated January 6)
/ Also visit http://www.povrayusers.org
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"Tony[B]" wrote:
> Not quite sure what I would use this for, but it looks
> cool, nonetheless....
Thanks!
> Hey! Why don't you twist that cadillac model that's so
> popular? Or better: make it "walk" along in the way a
> snake would move... :)
Good idea!
I'm not used to working with imported meshes though.
Does anybody have that cadillac model in PCM format?
How big is it when zipped?
Rune
--
\ Include files, tutorials, 3D images, raytracing jokes,
/ The POV Desktop Theme, and The POV-Ray Logo Contest can
\ all be found at http://rsj.mobilixnet.dk (updated January 6)
/ Also visit http://www.povrayusers.org
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"Remco de Korte" wrote:
> Cool, but it gets a bit blocky.
Thanks!
It's blocky because the mesh is of a very low quality.
The torus and sphere PCM files included with Chris Colefax's Compressed Mesh
Macros are the only PCM files I've got so far!
> What's the main advantage of your method?
Advantage over what?
Rune
--
\ Include files, tutorials, 3D images, raytracing jokes,
/ The POV Desktop Theme, and The POV-Ray Logo Contest can
\ all be found at http://rsj.mobilixnet.dk (updated January 6)
/ Also visit http://www.povrayusers.org
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Rune wrote:
>
> "Remco de Korte" wrote:
> > Cool, but it gets a bit blocky.
>
> Thanks!
>
> It's blocky because the mesh is of a very low quality.
> The torus and sphere PCM files included with Chris Colefax's Compressed Mesh
> Macros are the only PCM files I've got so far!
>
> > What's the main advantage of your method?
>
> Advantage over what?
>
> Rune
> --
> \ Include files, tutorials, 3D images, raytracing jokes,
> / The POV Desktop Theme, and The POV-Ray Logo Contest can
> \ all be found at http://rsj.mobilixnet.dk (updated January 6)
> / Also visit http://www.povrayusers.org
Advantage over other methods (but I can't think of any right now).
Anyway, I noticed you're doing something with meshes (mezz) but I'm not sure
what you're trying to accomplish. I'm interested though, I like meshes and it's
nice to have ways to deform them.
Remco
http://www.xs4all.nl/~remcodek/
Oh, and I forgot to ask you if I could use your Torus Torture in my Torus
Interrogation Chamber?
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"Remco de Korte" wrote:
> Advantage over other methods (but I can't think of any right now).
Chris Colefax's Compressed Mesh Macros can also deform meshes. The advantage
of the Mezz Deformer is that the normals are handled correctly, and that the
texture sticks to the objects when deformed. It uses more memory and parsing
time though.
> Anyway, I noticed you're doing something with meshes (mezz) but
> I'm not sure what you're trying to accomplish.
To be able to deform meshes with correct normals and texture mapping... :)
> Oh, and I forgot to ask you if I could use your Torus Torture
> in my Torus Interrogation Chamber?
Sure, as long as you give me proper credit! ;)
Rune
--
\ Include files, tutorials, 3D images, raytracing jokes,
/ The POV Desktop Theme, and The POV-Ray Logo Contest can
\ all be found at http://rsj.mobilixnet.dk (updated January 6)
/ Also visit http://www.povrayusers.org
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Rune wrote in message <3a6868e7$1@news.povray.org>...
> > Anyway, I noticed you're doing something with meshes (mezz) but
> > I'm not sure what you're trying to accomplish.
>
> To be able to deform meshes with correct normals and texture mapping... :)
how normals are calculated ?
did you considered my method sended for you to p.a-u ?
ABX
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"Wlodzimierz ABX Skiba" wrote:
> how normals are calculated ?
> did you considered my method sended for you to p.a-u ?
I didn't understand your symbolic code.
I think it is close to my own solution anyway. I posted that too. Did you
look at it?
I find points on the plane perpendicular to the input normal, then deform
those points, and then find the deformed normal which is the vector
perpendicular to the deformed points on the plane.
I believe you used n points in your method. I find 4 to be sufficient.
Rune
--
\ Include files, tutorials, 3D images, raytracing jokes,
/ The POV Desktop Theme, and The POV-Ray Logo Contest can
\ all be found at http://rsj.mobilixnet.dk (updated January 6)
/ Also visit http://www.povrayusers.org
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Rune wrote in message <3a68a79a@news.povray.org>...
>"Wlodzimierz ABX Skiba" wrote:
> > how normals are calculated ?
> > did you considered my method sended for you to p.a-u ?
>
> I didn't understand your symbolic code.
ough, advenced english is my biggest problem
I can try describe something more if you wish
just go back to this thread and show me where you want explanations
> I find points on the plane perpendicular to the input normal, then deform
> those points, and then find the deformed normal which is the vector
> perpendicular to the deformed points on the plane.
> I believe you used n points in your method. I find 4 to be sufficient.
The main difference beetween my method and your is that you (as I understand)
simply average normals after deformation. You forgot that deformation is not
linear and strength of deformation on one side of normal vector can be different
on the other side. In my method I use weighted averaging dependant of area of
triangles described by deformed perpendicular vectors. As I show some day in
p.b.i this weighted method is more accurate.
ABX
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"Wlodzimierz ABX Skiba" wrote:
> The main difference beetween my method and your is that you
> (as I understand) simply average normals after deformation.
I don't average any normals.
> You forgot that deformation is not linear and strength of
> deformation on one side of normal vector can be different
> on the other side.
No I don't...
> In my method I use weighted averaging dependant of area of
> triangles described by deformed perpendicular vectors.
There are no triangles involved at all in my normal calculations.
Rune
--
\ Include files, tutorials, 3D images, raytracing jokes,
/ The POV Desktop Theme, and The POV-Ray Logo Contest can
\ all be found at http://rsj.mobilixnet.dk (updated January 6)
/ Also visit http://www.povrayusers.org
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Rune wrote in message <3a6d9332@news.povray.org>...
> "Wlodzimierz ABX Skiba" wrote:
> > The main difference beetween my method and your is that you
> > (as I understand) simply average normals after deformation.
>
> I don't average any normals.
sorry for the mistake but ...
you wrote "I find points on the plane perpendicular to the input normal, then
deform those points, and then find the deformed normal which is the vector
perpendicular to the deformed points on the plane."
I just don't understand this meaning sentence.
How you find normal perpendicular to 4 (you wrote that you best number is 4)
deformed points ? and what plane ? 4 points not describe plane.
> > In my method I use weighted averaging dependant of area of
> > triangles described by deformed perpendicular vectors.
>
> There are no triangles involved at all in my normal calculations.
every two vectors joined to one point describe triangle
I just "virtualize" situation :-)
ABX
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"Wlodzimierz ABX Skiba" wrote:
> sorry for the mistake but ...
> you wrote "I find points on the plane perpendicular to
> the input normal, then deform those points, and then find
> the deformed normal which is the vector perpendicular to
> the deformed points on the plane."
> I just don't understand this meaning sentence.
> How you find normal perpendicular to 4 (you wrote that
> you best number is 4) deformed points ? and what plane ?
> 4 points not describe plane.
I have the input normal vector iN. Then I find 4 vectors perpendicular to
it. Those are tangents. Let's call them iT1, iT2, iT3 and iT4. These all lie
in the plane perpendicular to the input normal vector. Then I apply the
deformation to the 4 tangents, and I get the deformed tangents dT1, dT2,
dT3, dT4. These "describe" the deformed plane. To get the deformed normal I
find the vector that is perpendicular to the 4 deformed tangent vectors. And
yes, I average the tangent vectors 2 and 2 first. But they are tangents, not
normals, so I don't average any normals. And the tangent vectors are simply
added together, so it is automatically a weighted average (because a longer
tangent vector will have greater influence).
> every two vectors joined to one point describe triangle
> I just "virtualize" situation :-)
That may make sense for your method, but not for mine. I don't pair tangent
vectors next to each other, I pair opposite-lying tangent vectors...
Rune
--
\ Include files, tutorials, 3D images, raytracing jokes,
/ The POV Desktop Theme, and The POV-Ray Logo Contest can
\ all be found at http://rsj.mobilixnet.dk (updated January 6)
/ Also visit http://www.povrayusers.org
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Rune wrote in message <3a6dde1c$1@news.povray.org>...
> I have the input normal vector iN. Then I find 4 vectors perpendicular to
> it. Those are tangents. Let's call them iT1, iT2, iT3 and iT4. These all lie
> in the plane perpendicular to the input normal vector. Then I apply the
> deformation to the 4 tangents, and I get the deformed tangents dT1, dT2,
> dT3, dT4.
what about deformations where deformation not exist along four directions but
beetween them ?
I think that number of vectors/tangents should be customizable.
> These "describe" the deformed plane.
are you sure ?
if I understand in your method accuracy of this plane depends of length of your
vectors/tangents and I think this length should be also customizable
> To get the deformed normal I
> find the vector that is perpendicular to the 4 deformed tangent vectors. And
> yes, I average the tangent vectors 2 and 2 first. But they are tangents, not
> normals, so I don't average any normals.
My old method (currently I use exact method served me by Jerome Berger in p.u.p)
was something like finding smoth normals for vertices of not smoothed mesh. I
think it has the same accuracy level like your method but was more customizable.
ABX
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"Wlodzimierz ABX Skiba" wrote:
> what about deformations where deformation not exist along
> four directions but beetween them ?
What do you mean, "between them"? The tangent vectors are very very small,
so they're always deformed almost exactly the same.
> I think that number of vectors/tangents should be customizable.
I think 4 is plenty.
> if I understand in your method accuracy of this plane
> depends of length of your vectors/tangents
Yes, the smaller the vectors, the more precise. Therefore I always use very
small lengths.
> and I think this length should be also customizable
No, I simply always use a very small length. There's no need to make it
customisable.
> My old method (currently I use exact method served me by
> Jerome Berger in p.u.p) was something like finding smoth
> normals for vertices of not smoothed mesh. I think it has
> the same accuracy level like your method but was more
> customizable.
No, not at all. To find normals for non-smoothed mesh, the only input is the
triangle faces. To get good results with this, a weighted average of the
triangle-normals have to be found. But to deform normals is something
completely different. The input is a normal, not some triangles.
I use the code below to deform a normal. oP is input point. oN is input
normal. deform_mezz is the macro that deforms a point in space. dP is
deformed point. dN is deformed normal. Can you say what exactly is wrong
with this? If you have a more accurate method (in POV-script) I'd be happy
to test it and see if the results are better.
#local oP = SmoothTrianglePoint[Counter];
#local dP = deform_mezz(oP);
#local oN = SmoothTriangleNormal[Counter];
#local SomeVector = <0.4,0.5,0.6>;
#local Small = 0.000001;
#local Na = Perpendiculize(SomeVector,oN);
#local Nb = vcross(Na,oN);
#local nNa = deform_mezz(+Na*Small+oP);
#local nNb = deform_mezz(+Nb*Small+oP);
#local nNc = deform_mezz(-Na*Small+oP);
#local nNd = deform_mezz(-Nb*Small+oP);
#local dN = vnormalize(vcross(nNa-nNc,nNb-nNd));
Oh, and you need this macro:
#macro Perpendiculize (V1,V2)
vnormalize(vcross(vcross(V2,V1),V2))
#end
Rune
--
\ Include files, tutorials, 3D images, raytracing jokes,
/ The POV Desktop Theme, and The POV-Ray Logo Contest can
\ all be found at http://rsj.mobilixnet.dk (updated January 6)
/ Also visit http://www.povrayusers.org
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Rune wrote in message <3a6f30de@news.povray.org>...
> "Wlodzimierz ABX Skiba" wrote:
> > what about deformations where deformation not exist along
> > four directions but beetween them ?
>
> What do you mean, "between them"? The tangent vectors are very very small,
> so they're always deformed almost exactly the same.
Four tangents describe four directions. What about deformation which operate on
space between this directions and leave space along this directions ? For
example imagine that your tangents are on axis x,z,-x,-z and normal point
somewhere up. Than imagine such deformation:
deform(P)=<P.x*(2^P.z),P.y,P.z*(2^P.x)>
along axes x and z this not change values therefore
deform(<x,y,0>)=<x,y,0>
deform(<0,y,z>)=<0,y,z>
> > if I understand in your method accuracy of this plane
> > depends of length of your vectors/tangents
>
> Yes, the smaller the vectors, the more precise. Therefore I always use very
> small lengths.
>
> > and I think this length should be also customizable
>
> No, I simply always use a very small length. There's no need to make it
> customisable.
there is need - accuracy of floating point operations !!!
> If you have a more accurate method (in POV-script) I'd be happy
> to test it and see if the results are better.
I don't want say that this method is wrong at all, I want say that this method
could be wrong for some situations if you not allow customizable accuracy
(number of points, value of Small). And I want to say that you can use
personalized deform_of_normal to achive exact (!) method value of deformed
normal instead of aproximated (3a34cd8f@news.povray.org)
ABX
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"Wlodzimierz ABX Skiba" wrote:
> Four tangents describe four directions.
Yes.
> What about deformation which operate on space between this
> directions and leave space along this directions ?
What do you mean by that? Show me such a deformation!
> For example imagine that your tangents are on axis x,z,-x,-z
> and normal point somewhere up. Than imagine such deformation:
> deform(P)=<P.x*(2^P.z),P.y,P.z*(2^P.x)>
That is not a valid deformation. It generates negative fractional powers.
( For example, when P.z is -0.5 (2^P.z) will generate an error. )
You was also a bit unclear with the details. For input I need a point vector
and a normal vector. If you give me that, and a valid deformation, I can
show you that it doesn't matter which 4 tangents are used.
> there is need - accuracy of floating point operations !!!
That would not likely be a problem, but it would be very simple for me to
make the lengths user-defined, if that makes you happy...
> I don't want say that this method is wrong at all, I want
> say that this method could be wrong for some situations
Maybe, but I can't know before you show me one.
> And I want to say that you can use personalized deform_of_normal
> to achive exact (!) method value of deformed normal instead of
> aproximated ( news:3a34cd8f@news.povray.org )
I don't know what you're talking about, and I didn't find the answer in the
messege you linked to. What do you mean by "personalized deform_of_normal"?
Rune
--
\ Include files, tutorials, 3D images, raytracing jokes,
/ The POV Desktop Theme, and The POV-Ray Logo Contest can
\ all be found at http://rsj.mobilixnet.dk (updated January 28)
/ Also visit http://www.povrayusers.org
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|
 |