question

Faith Altmer avatar image
Faith Altmer asked ·

Is it possible to get the source of arnold's binary encoding?

Hi! Forgive my limited english, I'll try to write as politely as possible.

I decided to make an .fbx to .ass converter to speed up my workflow.

Normally I split my mesh in multiple files to avoid crashes on maya. I work with really heavy models, and when I have to import and convert a whole asset, the procedure is time consuming.

I've managed to create a simple converter so far, but unluckily it doesn't use binary encoding, so files tends to be 70% bigger in most cases.

I tried to implement the base85 btoa, but I've been unlucky all the time, despite my numerous attempts. I couldn't even understand the algorith version of this encoder (if it uses ZeroMQ or the original).

The converter will just output the polymesh{} struct, and I'd like to keep this tool as slim as possible. It would be really great if you could post the encoder, it would give the possibility to change the state of the stand-ins on the fly, like displacement properties, shaders etc.

arnoldass
10 |600 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

Stephen Blair avatar image
Stephen Blair answered ·

Use the Arnold API to create your ASS file, then you get the encoding.

Share
10 |600 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

Faith Altmer avatar image
Faith Altmer answered ·

After many tests I think it's time to declare it done, it has been a great project for learning purposes

https://kevinscgn.blogspot.com/2018/09/my-first-useful-cgi-tool.html

I think I'll have to accept Stephen's Blair answer

Share
10 |600 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

Faith Altmer avatar image
Faith Altmer answered ·

Then why did they call it b85 if it's a modified version? Isn't it pointless to specify the b85 prefix before the data types in the struct? Couldn't they simply call it "custom encoder"? I'll work with the sdk, but really, the source could have made things much easier and lighter

Share
10 |600 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

Stephen Blair avatar image
Stephen Blair answered ·

It's a modified version of the base85 encoding.

I would use the Arnold API

Share
10 |600 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

Faith Altmer avatar image
Faith Altmer answered ·

The main members of the polymesh struct like name, nsides, vlist, and other geometry arrays stayed unchanged for more than 6 years, and in case of drastic changes to the data structures I would be forced to update the skd as well. The base85 encoding is a public resource, unless there is an additional compression or some kind of space partitioning data structure embedded in it, it shouldn't be a problem for the developers to release it. There are plenty of informations on the subject in the official site https://support.solidangle.com/display/A5AFMUG/Arnold+Scene+Source, but there is nothing about the b85 algorithm used

Share
10 |600 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

Stephen Blair avatar image
Stephen Blair answered ·

Yes, you are asking for proprietary code.

You should use the Arnold SDK, because otherwise you're making assumptions about a file format that can change anytime.

Share
10 |600 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

Faith Altmer avatar image
Faith Altmer answered ·

But I'm trying to keep the program as lightweight as possible! With the API I need to convert geometry data into a node and setup other scene related things, only then I can call AiAssWrite(). Currently the program works without shared libraries, with pure c++ I/O and I'd like to keep like that.

So why should I use the Arnold SDK just for this simple operation?

It's just a normal btoa encoding, I just didn't find any up-to-date infos about base85, nor any infos about the version of the algorithm Arnold uses.

I'm not asking for any proprietary code here, so I think it should be fine to make it public.

Share
10 |600 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

Welcome to the Arnold Answers community.

This is the place for Arnold renderer users everywhere to ask and answer rendering questions, and share knowledge about using Arnold, Arnold plugins, workflows and developing tools with Arnold.

If you are a new user to Arnold Answers, please first check out our FAQ and User Guide for more information.

When posting questions, please be sure to select the appropriate Space for your Arnold plugin and include the plugin version you are using.

Please include images, scene and log files whenever possible as this helps the community answer your questions.

Instructions for generating full verbosity log files are available for MtoA, MaxtoA, C4DtoA, HtoA, KtoA, and Kick.

If you are looking for Arnold Documentation and Support please visit the Arnold Support site.

To try Arnold please visit the Arnold Trial page.

Bottom No panel present for this section.