Discussion:
Exporting a mesh with more than 10000 vertices
thomas pleyber
2008-03-05 17:36:01 UTC
Permalink
Hi there,

I successfully load a .3ds model with lib3ds, and now I would like
to write it back to a file. But I found a limitation :

in mesh.c, in the function point_array_write(), we can see this :

ASSERT(mesh->points<0x10000);

That means, I can't write a file when a mesh get more than 10000 vertices.
Someone could precise me if this problem is well-known and if there
exist workarounds that do not alter the model structure (unlike splitting
the mesh in less-than-10000-vertices meshes)

any precisions would be appreciated


Thomas PLEYBER
Hylke Donker
2008-03-05 18:20:08 UTC
Permalink
Remember that 0x10000 is hex, which equals 65536 in decimal, which is
exactly the size of two bytes(=16 bits).
So I guess it's related to the size of some variable.
Hylke
Post by thomas pleyber
Hi there,
I successfully load a .3ds model with lib3ds, and now I would like
ASSERT(mesh->points<0x10000);
That means, I can't write a file when a mesh get more than 10000 vertices.
Someone could precise me if this problem is well-known and if there
exist workarounds that do not alter the model structure (unlike splitting
the mesh in less-than-10000-vertices meshes)
any precisions would be appreciated
Thomas PLEYBER
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
lib3ds-devel mailing list
https://lists.sourceforge.net/lists/listinfo/lib3ds-devel
--
Blog: http://www.donkerdump.nl
Miles Bader
2008-03-05 23:34:20 UTC
Permalink
Post by Hylke Donker
Remember that 0x10000 is hex, which equals 65536 in decimal, which is
exactly the size of two bytes(=16 bits).
So I guess it's related to the size of some variable.
Doesn't the 3ds file-format use 16-bit vertex indices in meshes? That
would be a pretty fundamental limit that the library can't do much
about...

-Miles
--
Circus, n. A place where horses, ponies and elephants are permitted to see
men, women and children acting the fool.


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
thomas pleyber
2008-03-06 08:46:20 UTC
Permalink
So, it seems I reached a limit of lib3ds...
Thank you very much for these answers.
Post by Miles Bader
Post by Hylke Donker
Remember that 0x10000 is hex, which equals 65536 in decimal, which is
exactly the size of two bytes(=16 bits).
So I guess it's related to the size of some variable.
Doesn't the 3ds file-format use 16-bit vertex indices in meshes? That
would be a pretty fundamental limit that the library can't do much
about...
-Miles
--
Circus, n. A place where horses, ponies and elephants are permitted to see
men, women and children acting the fool.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
lib3ds-devel mailing list
https://lists.sourceforge.net/lists/listinfo/lib3ds-devel
Bo Schwarzstein
2008-03-06 12:20:48 UTC
Permalink
But, NVIDIA's GPU programming guide said that, we'd better use short type to store our vertex indices, it's fast on gpu.


Bo Schwarzstein£¬***@hotmail.com
2008-03-06
----- Original Message -----
From: thomas pleyber
To: Discussion about lib3ds
Sent: 2008-03-06, 16:46:20
Subject: Re: [Lib3ds-devel] Exporting a mesh with more than 10000 vertices


So, it seems I reached a limit of lib3ds...
Thank you very much for these answers.
Post by Hylke Donker
Remember that 0x10000 is hex, which equals 65536 in decimal, which is
exactly the size of two bytes(=16 bits).
So I guess it's related to the size of some variable.
Doesn't the 3ds file-format use 16-bit vertex indices in meshes? That
would be a pretty fundamental limit that the library can't do much
about...

-Miles
--
Circus, n. A place where horses, ponies and elephants are permitted to see
men, women and children acting the fool.



-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
lib3ds-devel mailing list
lib3ds-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lib3ds-devel
Miles Bader
2008-03-07 00:48:56 UTC
Permalink
Post by Bo Schwarzstein
But, NVIDIA's GPU programming guide said that, we'd better use short
type to store our vertex indices, it's fast on gpu.
Huh? Nobody said anything about Nvidia, or about GPUs.

-Miles
--
`To alcohol! The cause of, and solution to,
all of life's problems' --Homer J. Simpson


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
Bo Schwarzstein
2008-03-07 01:13:34 UTC
Permalink
http://developer.nvidia.com/object/gpu_programming_guide.html

Download the English version, on page chapter 8.6.6. "Use Vertex Buffer
Objects or Display Lists ", it shows that "Use unsigned short for indices."

I think maybe NVIDIA want to tell us, " The less you give me , the faster I
run "



-----ÓÊŒþÔ­Œþ-----
·¢ŒþÈË: lib3ds-devel-bounces-5NWGOfrQmneRv+***@public.gmane.org
[mailto:lib3ds-devel-bounces-5NWGOfrQmneRv+***@public.gmane.org] Žú±í Miles Bader
·¢ËÍʱŒä: 2008Äê3ÔÂ7ÈÕ 8:49
ÊÕŒþÈË: lib3ds-devel-5NWGOfrQmneRv+***@public.gmane.org
Ö÷Ìâ: Re: [Lib3ds-devel] Exporting a mesh with more than 10000 vertices
Post by Bo Schwarzstein
But, NVIDIA's GPU programming guide said that, we'd better use short
type to store our vertex indices, it's fast on gpu.
Huh? Nobody said anything about Nvidia, or about GPUs.



-Miles
--
`To alcohol! The cause of, and solution to,

all of life's problems' --Homer J. Simpson





-------------------------------------------------------------------------

This SF.net email is sponsored by: Microsoft

Defy all challenges. Microsoft(R) Visual Studio 2008.

http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

_______________________________________________

lib3ds-devel mailing list

lib3ds-devel-5NWGOfrQmneRv+***@public.gmane.org

https://lists.sourceforge.net/lists/listinfo/lib3ds-devel
Miles Bader
2008-03-07 01:26:21 UTC
Permalink
Post by Bo Schwarzstein
http://developer.nvidia.com/object/gpu_programming_guide.html
No, my point was: what nvidia says is not relevant. The 3ds file
format is used in many contexts other than display with a GPU.

-Miles
--
Infancy, n. The period of our lives when, according to Wordsworth, 'Heaven
lies about us.' The world begins lying about us pretty soon afterward.


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
Rafał Kamraj
2008-03-06 23:34:29 UTC
Permalink
Howdy
If I remember correctly, 3ds trimesh may contain at most 32766 faces or
vertices. That is because number is kept as 16bit signed int.

Sincerelly
Rafal

----------------------------------------------------
Nauka w służbie seksu!
Czy karty kredytowe podnoszą atrakcyjność
mężczyzn w oczach kobiet? Sprawdź sam :)
Kliknij: http://klik.wp.pl/?adr=http%3A%2F%2Fcorto.www.wp.pl%2Fas%2Fdwuplciowi.html&sid=255



-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
Continue reading on narkive:
Loading...