Skip to content

Commit

Permalink
I3s converter patch (#116)
Browse files Browse the repository at this point in the history
* Updated converter and converter readme

* Added cloud example and eslpk examples. Fixed converter multithreading, validation for i3srest, i18n fix, aws profile support.

* Changed to correct version of converter, and added other options into the readme

Co-authored-by: Richard Vargas <ric10786@esri.com>
  • Loading branch information
rvargasESRI and Richard Vargas authored Apr 5, 2021
1 parent e70c11c commit 03e352a
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 19 deletions.
Binary file modified i3s_converter/i3s_converter.exe
Binary file not shown.
23 changes: 6 additions & 17 deletions i3s_converter/i3s_converter_ReadMe.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,31 +99,20 @@ is the equivalent to<br>
| -s \[key] | --secret-key \[key] | AWS S3/Alibaba OSS secret key or Azure account key |
| -t \[num threads] | --thread-count \[num threads] | [Number of threads](#threadsDesc) to use when converting, default is 1 |
| -x | --drop-dxt | Don't write DXT textures |
| | --endpoint-url | Endpoint url for S3 compatible services |
| | --aws-profile | AWS Profile in ```%USERPROFILE%\.aws\credentials``` |

## Examples <a name="Examples"></a>
Examples can be found [here](i3s_converter_examples.md), which show various uses of the i3s_converter.

## Conversion and Extraction
#### Filesystem
To convert an slpk to filesystem (*.eslpk)
- ```i3s_converter.exe --convert <path-to-slpk> -d <output-directory> -t <num-threads>```

To extract an slpk to filesystem (*.eslpk)
- ```i3s_converter.exe --extract <path-to-slpk> -d <output-directory>```

#### Cloud
To convert an slpk to cloud (*.i3srest)
- ``` i3s_converter.exe --convert <path-to-slpk> -d <scheme>://<bucket-or-container> -a <access-key> -s <secret-key> -r <s3-or-alibaba-region> -t <num-threads>```

Usage for converting an slpk to cloud
- ```i3s_converter.exe --extract <path-to-slpk> -d <scheme>://<bucket-or-container> -a <access> -s <secret-key> -r <s3-or-alibaba-region>```

Supported schemes:
### Supported cloud schemes:
- AWS S3: s3
- Azure Blob: az
- Alibaba OSS: oss


## Examples <a name="Examples"></a>
Examples can be found [here](i3s_converter_examples.md), which show various uses of the i3s_converter.

## Notes <a name="Notes"></a>

- Only the first 10 warnings/errors are output to the command line.
Expand Down
27 changes: 25 additions & 2 deletions i3s_converter/i3s_converter_examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,12 @@ In all the of following examples, we will assume a working directory of ```C:\Us
[Create ETC2 textures](#createETC2)<br>
[Drop DXT textures](#dropDXT)<br>
[Drop normals](#dropNormals)<br>
[Convert slpk to filesystem (eslpk)](#convertFilesystem)<br>
[Extract slpk to filesystem (eslpk)](#extractFilesystem)<br>
[Convert to cloud format (i3srest)](#convertCloud)<br>
[Extract to cloud (i3srest)](#extractCloud)<br>
[Convert and extract to cloud](#convertAndExtract)
[Convert and extract to cloud](#convertAndExtract)<br>
[Validate using AWS profile](#validateWithAws)

-------------------------------------

Expand Down Expand Up @@ -61,14 +64,34 @@ present.
```i3s_converter.exe -u myFile.slpk -n```<br>
This command performs a conversion and drops all normals. Client will recreate these normals.

### Convert to filesystem (eslpk)<a name = "convertFilesystem"></a>
```i3s_converter.exe -u myFile.slpk -d C:\Users\johndoe\Desktop\MyFolder -t 2```<br>
This command performs a conversion to the filesystem format (eslpk) for ready to serve files.
In this example, the destination folder is changed, and number of threads is set to 2.

### Extract to filesystem (eslpk)<a name = "extractFilesystem"></a>
```i3s_converter.exe -e myFile.slpk -d C:\Users\johndoe\Desktop\MyFolder```<br>
This command extracts an slpk to the filesystem format (eslpk) for ready to serve files.
In this example, the destination folder is changed.

### Convert to cloud format (i3srest)<a name = "convertCloud"></a>
```i3s_converter.exe -u myFile.slpk -d s3://mySlpkBucket -a AKIAIOSFODNN7EXAMPLE -s wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY -r us-east-1a```<br>
This command performs a conversion to the i3srest format for cloud storage. This example uses AWS S3.

### Extract to cloud (i3srest)<a name = "extractCloud"></a>
```i3s_converter.exe -e myFile.slpk -d oss://mySlpkBucket -a AKIAIOSFODNN7EXAMPLE -s wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY -r us-west-1```<br>
```i3s_converter.exe -e myFile.slpk -d oss://mySlpkBucket -a AKIAIOSFODNN7EXAMPLE -s wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY -r oss-us-west-1```<br>
This command will extract the slpk to the cloud. This example uses Alibaba OSS.

### Convert and extract<a name = "convertAndExtract"></a>
```i3s_converter.exe --convert-and-extract myFile.slpk -d az://mySlpkContainer -a AKIAIOSFODNN7EXAMPLE -s wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY ```<br>
This command will convert and extract the slpk to the cloud. This example uses Azure.

### Validate slpk on cloud service<a name = "validateOnCloud"></a>
```i3s_converter.exe --validate az://mySlpkContainer/mySlpk.i3srest -a AKIAIOSFODNN7EXAMPLE -s wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY```<br>
This command will validate that an SLPK on a cloud store (i3srest) can be used and is compatible as 1.7 consumption. This example uses Azure.

### Validate with AWS profile<a name = "validateWithAws"></a>
```i3s_converter.exe --validate oss://mySlpkBucket/mySlpk.i3srest --aws-profile alibaba -r oss-us-west-1 ```<br>
This command will validate using AWS profiles, rather than entering credentials into the program. This example uses Alibaba OSS.
Note that this command will only work with AWS and OSS.

0 comments on commit 03e352a

Please sign in to comment.