Armory: Asset protection for textures and material in Krom

Created on 17 Nov 2018  路  8Comments  路  Source: armory3d/armory

I downloaded the latest Armory and updated the sdk. Tried the bowling examples and published it(using windows krom). When I looked at the files in the "data" folder, I noticed that all the game textures , menu textures and material textures are exposed in final published build.

Is it possible to convert the files into binary or something so that end user dont easily just ripped or copy the files ?

I'm actually more worried other game developers just copy the material that I have made or bought and use it in their projects. Or maybe someone just edit the materials and texture and claimed that it is their project and maybe even sold it.

feature request

Most helpful comment

Kha has it's own .k format and can handle stuff like astc/dxt5 but it's not yet implemented for Krom.
(kraffiti)

All 8 comments

I'm not for sure, but I haven't seen anything like that. I don't think there is built-in way to do that yet.

@zicklag for native Windows C++ you dont see the textures files in the data folder but for krom build the textures is available in the data folder.

Oh, now that you mention it, I think Kha might be able to embed the base64 encoded versions of some assets into the generated code; that is how it packs the shaders by default. You might be able to do that with images, too. I'm not sure.

Even if you could do it, though, in Krom, you would still be able to get the base64 encoded version of the asset without a whole lot of effort because it would be written into the krom.js file. You can use uglifier or something for the krom.js file, which would help, but you could probably still write a python script that would extract all of the assets from the file.

Armory should do it automatically by default.
No one wants to publish without protection.

It can be a good to convert png/jpg/tga to an optimized format like dds/pvr/etx.

Kha has it's own .k format and can handle stuff like astc/dxt5 but it's not yet implemented for Krom.
(kraffiti)

You can base64 encode images, fonts etc... assets in Kha for Html5 target this is what I did on monkey experiment, it's all in one class and not easy to follow as created for use in early version of KodeGarden, but it includes 100 textures. You can encode an asset via quick google online tools exist.
https://github.com/nanjizal/Monkey/blob/master/Sources/Monkey.hx
I currently do not fully know how to get textures working in pure iron which might be one way to implement this without needing to modify Armory, you could perhaps in a Trait swap a dummy material for a base64 encoded one, but currently the way Iron setup materials is with a file name not kha.Image which is awkward for dynamic creation, so other hoops as well.

if you follow the way I created Images with base64 then perhaps they can be swapped over like so.
https://github.com/armory3d/armory_examples/blob/master/material_params/Sources/arm/MyTrait.hx
Javascript is not really secure but I guess more so if assets are not obvious.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Sanva picture Sanva  路  3Comments

BrahRah picture BrahRah  路  3Comments

AttSee picture AttSee  路  4Comments

e1e5en-gd picture e1e5en-gd  路  3Comments

e1e5en-gd picture e1e5en-gd  路  3Comments