google / draco

Draco is a library for compressing and decompressing 3D geometric meshes and point clouds. It is intended to improve the storage and transmission of 3D graphics.
https://google.github.io/draco/
Apache License 2.0
6.54k stars 968 forks source link

Vertex count varies #326

Closed ameliemaia closed 6 years ago

ameliemaia commented 6 years ago

Hello,

I'm using the draco encoder to convert 5 .obj models to .drc. All 5 obj models have the same vertex count. When I load the models via the threejs draco loader I've noticed the vertex count changes between the models. Since i'm blending between objects I need persistant vertex count.

Is there any encoder setting that allows this?

mhsaar commented 6 years ago

Hi, try sequential encoding, best Michael

On Fri, Jan 5, 2018 at 6:46 AM, Amelie Rosser notifications@github.com wrote:

Hello,

I'm using the draco encoder to convert 5 .obj models to .drc. All 5 obj models have the same vertex count. When I load the models via the threejs draco loader I've noticed the vertex count changes between the models. Since i'm blending between objects I need persistant vertex count.

Is there any encoder setting that allows this?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/google/draco/issues/326, or mute the thread https://github.com/notifications/unsubscribe-auth/AIZlcjDKjgCibyZDScQ9UrEhcAqm2f8Iks5tHjXZgaJpZM4RUh04 .

--

Phone: (415) 301 8915 Email: hemmer@google.com LinkedIn: www.linkedin.com/in/mhsaar

FarhadG commented 6 years ago

How do do sequential encoding, @mhsaar?

mhsaar commented 6 years ago

Either chose lowest compression level, or sequential encoding when using the expert_encoder.

On Mon, Mar 19, 2018 at 5:42 AM, Farhad Ghayour notifications@github.com wrote:

How do do sequential encoding, @mhsaar https://github.com/mhsaar?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/google/draco/issues/326#issuecomment-374198391, or mute the thread https://github.com/notifications/unsubscribe-auth/AIZlcuTtuyMWFmkz6gjaDQUal96wKz9Aks5tf6efgaJpZM4RUh04 .

--

Phone: (415) 301 8915 Email: hemmer@google.com LinkedIn: www.linkedin.com/in/mhsaar

FarhadG commented 6 years ago

Thanks for the quick response, @mhsaar. I assume by compression, you're referring to quantization. When I set the qp to 0 to disable quantization, the model generated, but could not render it in THREE.js. You can see the error outlined here: https://github.com/google/draco/issues/353

How do I se the expert_encoder? Sorry, but I couldn't find anything about this in the documentation.

Thank you!

mhsaar commented 6 years ago

Hi, no the qp is the quantization bits used for the coordinates, you want to set that to a level that is tolerable for your application. I have referring to the compression level its a separate option. You may want to look at the documentation of the expert encoder.

or simply at draco_encoder --help

On Mon, Mar 19, 2018 at 8:36 AM, Farhad Ghayour notifications@github.com wrote:

Thanks for the quick response, @mhsaar https://github.com/mhsaar. I assume by compression, you're referring to quantization. When I set the qp to 0 to disable quantization, the model generated, but could not render it in THREE.js. You can see the error outlined here: #353 https://github.com/google/draco/issues/353

How do I se the expert_encoder? Sorry, but I couldn't find anything about this in the documentation.

Thank you!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/google/draco/issues/326#issuecomment-374256012, or mute the thread https://github.com/notifications/unsubscribe-auth/AIZlchgb6AeMDAZCXATHBAa4XVR2-caGks5tf9BogaJpZM4RUh04 .

--

Phone: (415) 301 8915 Email: hemmer@google.com LinkedIn: www.linkedin.com/in/mhsaar

FarhadG commented 6 years ago

I must be missing something then, @mhsaar. Because that was the very thing I did and I don't see anything outlined here about the expert_encoder:

Main options:
  -h | -?               show help.
  -i <input>            input file name.
  -o <output>           output file name.
  -point_cloud          forces the input to be encoded as a point cloud.
  -qp <value>           quantization bits for the position attribute, default=14.
  -qt <value>           quantization bits for the texture coordinate attribute, default=12.
  -qn <value>           quantization bits for the normal vector attribute, default=10.
  -qg <value>           quantization bits for any generic attribute, default=8.
  -cl <value>           compression level [0-10], most=10, least=0, default=7.
  --skip ATTRIBUTE_NAME skip a given attribute (NORMAL, TEX_COORD, GENERIC)
  --metadata            use metadata to encode extra information in mesh files.
ondys commented 6 years ago

to set compression level to 0, use -cl 0 argument