Community
Arnold General Rendering Forum
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

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

7 REPLIES 7
SOLVED
Reply
Message 1 of 8
Jake41198
558 Views, 7 Replies

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.

Tags (2)
Labels (2)
7 REPLIES 7
Message 2 of 8
Stephen.Blair
in reply to: Jake41198

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



// Stephen Blair
// Arnold Renderer Support
Message 3 of 8
Jake41198
in reply to: Jake41198

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.

Message 4 of 8
Stephen.Blair
in reply to: Jake41198

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.



// Stephen Blair
// Arnold Renderer Support
Message 5 of 8
Jake41198
in reply to: Jake41198

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

Message 6 of 8
Stephen.Blair
in reply to: Jake41198

It's a modified version of the base85 encoding.

I would use the Arnold API



// Stephen Blair
// Arnold Renderer Support
Message 7 of 8
Jake41198
in reply to: Jake41198

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

Message 8 of 8
Jake41198
in reply to: Jake41198

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

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report