Jump to content

Archiving "UNG vs ZIP"


photo

Recommended Posts

Hi,

 

I am starting to package everything up.

What are the benefits of using ung files with the archiver instead of zip files?

The only documentation that I can find is that ung files are limited to 2 gigs.

Is there any performance benefits to using ung files over zip files?

 

Thanks,

Sam

Link to comment

I did some more hunting.

 

ZIP archives can be encrypted and Unigine can handle them transparently like UNG.

The problem I see is that you cannot encrypt the file names within a ZIP file like a UNG one.

The only way to encrypt ZIP file names is to ZIP a ZIP file. Unigine will not be able to read double zipped files.

Unigine also does not read double archived UNG files ether.

I still am unable to notice a performance difference between the two.

 

I will be sticking with UNG files just for the encryption of file names.

Link to comment

Hi guys,

 

We'll add the info on UNG\ZIP packages asap, sorry for that :)

 

In fact, there's no difference in using ZIP or UNG packages. There is no performance benefits, UNG packages were created for internal usage. So it doesn't matter what are you going to use - UNG or ZIP.

 

Since there is no information on UNG\ZIP packages in the documentation, here is a brief description:

 * the engine loads packages once during initialization and keep all this stuff in the memory, i.e. there is no data streaming if we talk about packages (both UNG and ZIP);

 * about UNG vs ZIP performance: the difference is really imperceptible;

 * heavy content should NOT be placed into packages. Packages are good for text-based files, nodes, world files, code, etc. and also textures. All other heavy content (like terrain) should not be in a package: Unigine will use data streaming for working with this content.

 

Thanks!

Link to comment
Sam, 

 

Terrain data is stored in special binary format (.ter) and it's not easy to parse it at one stroke. Of course, it's not an encryption but it provides some data security. Also, you can use special tools to compress textures with LZMA, terrain can extract compressed textures on the fly.

 

And what is the purpose of the terrain encryption?

If you want to verify authenticity of the terrain content, you can do it that way, for example: 

When you build the application, calculate the hash of all heights of terrain during the initialization and save this sum in a UNG archive. 

Then, when the user will launch the application, calculate the hash again and compare it with the saved one.

But if you want to make your terrain inaccessible for others... you should create your own package for engine data streaming.

Link to comment

Thanks for the Info that helps a lot!

 

Our main concern is for someone to take our terrain files and use the terrain in their own project. Are there certain files such as world/layer files or texture_array files that if included in the package make this impossible? I know .ter files are pretty common for terrains, but it sounds like the Unigine .ter files are different than the standard Terragen files? Or is it actually a relatively easy process to turn those terrain files into something workable?

Link to comment
×
×
  • Create New...