POV-Ray : Newsgroups : povray.general : mesh2 to mesh Server Time
4 Nov 2024 21:23:12 EST (-0500)
  mesh2 to mesh (Message 1 to 10 of 14)  
Goto Latest 10 Messages Next 4 Messages >>>
From: nospam
Subject: mesh2 to mesh
Date: 22 Sep 2003 11:54:12
Message: <3f6b171e.2001613@localhost>
Greetings all

	I used Wings3d to make some objects for pov-ray.  I
imported the objects without mishap.  The objects had
extra information that I did not want, such as:

 1) a normal vector for each vertex
 2) a texture index for each triangle  (this is kind of
    annoying because I can't then apply a texture to 
    occurances of the mesh later on)

	What I would like to do is strip off the normal &
texture information and also convert the mesh2 object to a
regular mesh object.  Does anyone know of a program or a
.pov script that will do this?
	Thanks (in advance).

Pete


Post a reply to this message

From: Slime
Subject: Re: mesh2 to mesh
Date: 22 Sep 2003 23:58:29
Message: <3f6fc4e5$1@news.povray.org>
No direct answers here, but some suggestions...

>  1) a normal vector for each vertex

Perhaps you can just delete the entire normal_vectors and normal_indices
blocks? If there are certain edges that you wanted to remain "hard", that
can be set in wings itself. I'm not sure exactly what you don't like about
having all of the normal vectors.

>  2) a texture index for each triangle  (this is kind of
>     annoying because I can't then apply a texture to
>     occurances of the mesh later on)

I've also found this feature annoying. To fix it, I select the face_indices
block, and do a search-and-replace, replacing ">,0," with ">,". This removes
all of the texture indices, except maybe the very last one.

> What I would like to do is strip off the normal &
> texture information and also convert the mesh2 object to a
> regular mesh object.

Why do you prefer mesh over mesh2? They both contain the same data, but mesh
is (*much*) slower to parse.

 - Slime
 [ http://www.slimeland.com/ ]


Post a reply to this message

From: Warp
Subject: Re: mesh2 to mesh
Date: 23 Sep 2003 10:55:18
Message: <3f705ed6@news.povray.org>
Slime <fak### [at] emailaddress> wrote:
> Why do you prefer mesh over mesh2? They both contain the same data, but mesh
> is (*much*) slower to parse.

  Have you actually measured the parsing speed difference?
  I haven't and I would be interested in knowing some percentages...

-- 
#macro M(A,N,D,L)plane{-z,-9pigment{mandel L*9translate N color_map{[0rgb x]
[1rgb 9]}scale<D,D*3D>*1e3}rotate y*A*8}#end M(-3<1.206434.28623>70,7)M(
-1<.7438.1795>1,20)M(1<.77595.13699>30,20)M(3<.75923.07145>80,99)// - Warp -


Post a reply to this message

From: ingo
Subject: Re: mesh2 to mesh
Date: 23 Sep 2003 11:30:46
Message: <Xns93FFB226167D6seed7@netplex.aussie.org>
in news:3f705ed6@news.povray.org Warp wrote:

>   I haven't and I would be interested in knowing some percentages...
> 

I have, but don't remeber the exact difference, but mesh2 is indeed 
faster. But, there is one tricky thing, I also compared a completely non-
optimised mesh2 with a maximal optimised mesh2. With optimised I mean have 
aan as small as possible amount of vertices. The more optimised the slower 
the parsing and the more it approached the speed of mesh.

Ingo


Post a reply to this message

From: Slime
Subject: Re: mesh2 to mesh
Date: 23 Sep 2003 13:40:24
Message: <3f708588$1@news.povray.org>
>   Have you actually measured the parsing speed difference?
>   I haven't and I would be interested in knowing some percentages...

Not with the same mesh. However, I commonly use mesh2's, and face parsing
speeds of maybe about 5-10 seconds (long enough to make me a tiny bit
annoyed just as the parsing finished). Recently, I had to use the original
mesh format for a model with a similar amount of detail (similar number of
triangles). I could go to the bathroom and return well before the parsing
had finished. I ended up making a low-res version of it for testing
purposes, which would take a reasonable length of time (5-10 seconds), using
the other version for only overnight renders.

In any case, the difference is large enough that it's worth caring about.
Sorry I can't give any solid numbers.

 - Slime
 [ http://www.slimeland.com/ ]


Post a reply to this message

From: Mike Williams
Subject: Re: mesh2 to mesh
Date: 23 Sep 2003 17:00:10
Message: <wtLQlAAiMLc$EwQu@econym.demon.co.uk>
Wasn't it Warp who wrote:
>Slime <fak### [at] emailaddress> wrote:
>> Why do you prefer mesh over mesh2? They both contain the same data, but mesh
>> is (*much*) slower to parse.
>
>  Have you actually measured the parsing speed difference?
>  I haven't and I would be interested in knowing some percentages...

Here's the results of a quick test that I ran. I took an OBJ file and ran it through a
convertor that can output both mesh and mesh2 formats.

The OBJ file is 16.7Mb, and has 99213 vertices and 170376 faces.

The Mesh2 parsed in 45% of the time and used 72% of the memory. The Mesh1 is shown as
having 86 frame level objects because there's a separate mesh1 object for each part
that
has a different texture.


Scene contains 86 frame level objects; 0 infinite.

Statistics for C:\My Documents\Poser\MyStuff\Spacegirl\AlienM1.pov, Resolution 640 x
480
----------------------------------------------------------------------------
Pixels:          307840   Samples:          363544   Smpls/Pxl: 1.18
Rays:            363544   Saved:                 0   Max Level: 1/5
----------------------------------------------------------------------------
Ray->Shape Intersection          Tests       Succeeded  Percentage
----------------------------------------------------------------------------
Mesh                            387596          105567     27.24
Bounding Box                  11443310         3850760     33.65
Light Buffer                   1512203          649452     42.95
Vista Buffer                   1346432          769933     57.18
----------------------------------------------------------------------------
Calls to Noise:                  0   Calls to DNoise:             10
----------------------------------------------------------------------------
Shadow Ray Tests:           132628   Succeeded:                30319
----------------------------------------------------------------------------
Smallest Alloc:                 25 bytes   Largest:          1179672
Peak memory used:         46350651 bytes
----------------------------------------------------------------------------
Time For Parse:    0 hours  0 minutes  49.0 seconds (49 seconds)
Time For Trace:    0 hours  0 minutes   6.0 seconds (6 seconds)
    Total Time:    0 hours  0 minutes  55.0 seconds (55 seconds)
POV-Ray finished



Scene contains 1 frame level objects; 0 infinite.

Statistics for C:\My Documents\Poser\MyStuff\Spacegirl\AlienM1.pov, Resolution 640 x
480
----------------------------------------------------------------------------
Pixels:          307840   Samples:          363912   Smpls/Pxl: 1.18
Rays:            363912   Saved:                 0   Max Level: 1/5
----------------------------------------------------------------------------
Ray->Shape Intersection          Tests       Succeeded  Percentage
----------------------------------------------------------------------------
Mesh                            445143           85352     19.17
Bounding Box                  14542692         4389902     30.19
----------------------------------------------------------------------------
Calls to Noise:                  0   Calls to DNoise:             10
----------------------------------------------------------------------------
Shadow Ray Tests:            81231   Succeeded:                31723
----------------------------------------------------------------------------
Smallest Alloc:                 25 bytes   Largest:         12267096
Peak memory used:         33609623 bytes
----------------------------------------------------------------------------
Time For Parse:    0 hours  0 minutes  22.0 seconds (22 seconds)
Time For Trace:    0 hours  0 minutes   6.0 seconds (6 seconds)
    Total Time:    0 hours  0 minutes  28.0 seconds (28 seconds)
POV-Ray finished



-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

From: Christopher James Huff
Subject: Re: mesh2 to mesh
Date: 24 Sep 2003 15:42:05
Message: <cjameshuff-142DD2.15401424092003@netplex.aussie.org>
In article <Xns### [at] netplexaussieorg>,
 ingo <ing### [at] tagpovrayorg> wrote:

> I have, but don't remeber the exact difference, but mesh2 is indeed 
> faster.

The exact difference will depend on the mesh. The more vertices shared 
among multiple triangles, the better.


> But, there is one tricky thing, I also compared a completely non-
> optimised mesh2 with a maximal optimised mesh2. With optimised I mean have 
> aan as small as possible amount of vertices. The more optimised the slower 
> the parsing and the more it approached the speed of mesh.

I can't think of anything that would cause this. With the same number of 
triangles, fewer vertices should be better...duplicates waste space and 
need more computations to remove.

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tagpovrayorg
http://tag.povray.org/


Post a reply to this message

From: ingo
Subject: Re: mesh2 to mesh
Date: 24 Sep 2003 16:10:15
Message: <Xns9400E188D7A46seed7@netplex.aussie.org>
in news:cja### [at] netplexaussieorg Christopher 
James Huff wrote:

> I can't think of anything that would cause this.

What if POV-Ray internally expands the mesh2? If it does, that would take 
some parsing time.

Ingo


Post a reply to this message

From: Warp
Subject: Re: mesh2 to mesh
Date: 24 Sep 2003 19:22:54
Message: <3f72274e@news.povray.org>
ingo <ing### [at] tagpovrayorg> wrote:
> What if POV-Ray internally expands the mesh2? If it does, that would take 
> some parsing time.

  Expands to what?

-- 
#macro M(A,N,D,L)plane{-z,-9pigment{mandel L*9translate N color_map{[0rgb x]
[1rgb 9]}scale<D,D*3D>*1e3}rotate y*A*8}#end M(-3<1.206434.28623>70,7)M(
-1<.7438.1795>1,20)M(1<.77595.13699>30,20)M(3<.75923.07145>80,99)// - Warp -


Post a reply to this message

From: nospam
Subject: Re: mesh2 to mesh
Date: 24 Sep 2003 19:57:59
Message: <3f7224e9.30888918@localhost>
On Mon, 22 Sep 2003 23:58:21 -0400, "Slime" <fak### [at] emailaddress>
wrote:

>No direct answers here, but some suggestions...
>
>>  1) a normal vector for each vertex
>
>Perhaps you can just delete the entire normal_vectors and normal_indices
>blocks? If there are certain edges that you wanted to remain "hard", that
>can be set in wings itself. I'm not sure exactly what you don't like about
>having all of the normal vectors.
>

I make "greebly"[1] angular linear shapes.  The normals make
everything kind of, umm, plush and rounded ... sort of
melted.  It looks really bad.

>>  2) a texture index for each triangle  (this is kind of
>>     annoying because I can't then apply a texture to
>>     occurances of the mesh later on)
>
>I've also found this feature annoying. To fix it, I select the face_indices
>block, and do a search-and-replace, replacing ">,0," with ">,". This removes
>all of the texture indices, except maybe the very last one.
>

This is a very good idea.  Thank you!

>> What I would like to do is strip off the normal &
>> texture information and also convert the mesh2 object to a
>> regular mesh object.
>
>Why do you prefer mesh over mesh2? They both contain the same data, but mesh
>is (*much*) slower to parse.
>

The mesh object is much better for hand text editing.
It's hard for me to keep track of points while
editing a mesh2 object.

> - Slime
> [ http://www.slimeland.com/ ]
>
>

-- 
[1] Example of "greebles": hull plating of the
    Millenium Falcon


Post a reply to this message

Goto Latest 10 Messages Next 4 Messages >>>

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