commit 21f5d57de6c86f3c9947613a15522aeccf7d1b94 Author: Fredrick Johansson Date: Thu May 8 17:19:07 2014 +0200 first commit diff --git a/README.md b/README.md new file mode 100644 index 0000000..453ad20 --- /dev/null +++ b/README.md @@ -0,0 +1,22 @@ +Texture Converter - Manual +========================= +Bakes together 2 images into the resulting image RGB=(A:rgb) + A=(B:avg(rgb)) +----------------- +**Usage** +In windows explorer, select 2 images and drag&drop them onto the executable. +When selecting, make sure to select the RGB source image first. + +**What it does** +Takes the RGB channels from image B. +Calculates the greyscale of them, ie averages them into one value. +The final image exported has the RGB-values from image A, and as its alpha value is the calculated greyscale value of image B. +In short: +RGB=(A:rgb) +A=(B:avg(rgb)) + +**Why?** +In the current version of the Oyster rendering engine there is no support for transparent objects, aside from particles. This makes the alpha-channel of the diffuse texture redundant. We made the design choice to use that free alpha channel to store our glow-factor. +The same goes for our normal map, we use the alpha value slot to store our specular factor. The specular light factor has been reduced to one value; as opposed to two values. + +MADE FOR the indie game NO EDGE, http://noedge.nerdcavestudio.com/ + diff --git a/README~ b/README~ new file mode 100644 index 0000000..6594c78 --- /dev/null +++ b/README~ @@ -0,0 +1,20 @@ +Texture Converter - Manual +========================= +Bakes together 2 images into the resulting image RGB=(A:rgb) + A=(B:avg(rgb)) +----------------- +**Usage** +In windows explorer, select 2 images and drag&drop them onto the executable. +When selecting, make sure to select the RGB source image first. +**What it does** +Takes the RGB channels from image B. +Calculates the greyscale of them, ie averages them into one value. +The final image exported has the RGB-values from image A, and as its alpha value is the calculated greyscale value of image B. +In short: +RGB=(A:rgb) +A=(B:avg(rgb)) +**Why?** +In the current version of the Oyster rendering engine there is no support for transparent objects, aside from particles. This makes the alpha-channel of the diffuse texture redundant. We made the design choice to use that free alpha channel to store our glow-factor. +The same goes for our normal map, we use the alpha value slot to store our specular factor. The specular light factor has been reduced to one value; as opposed to two values. + +MADE FOR the indie game NO EDGE, http://noedge.nerdcavestudio.com/ + diff --git a/code/2x2All.jpg b/code/2x2All.jpg new file mode 100644 index 0000000..c27d697 Binary files /dev/null and b/code/2x2All.jpg differ diff --git a/code/2x2All.png b/code/2x2All.png new file mode 100644 index 0000000..0db4865 Binary files /dev/null and b/code/2x2All.png differ diff --git a/code/2x2D.png b/code/2x2D.png new file mode 100644 index 0000000..0db4865 Binary files /dev/null and b/code/2x2D.png differ diff --git a/code/2x2G.png b/code/2x2G.png new file mode 100644 index 0000000..8f3d6aa Binary files /dev/null and b/code/2x2G.png differ diff --git a/code/4x4All.png b/code/4x4All.png new file mode 100644 index 0000000..67c7ef9 Binary files /dev/null and b/code/4x4All.png differ diff --git a/code/bin/Debug/DevIL.dll b/code/bin/Debug/DevIL.dll new file mode 100644 index 0000000..b7a4c09 Binary files /dev/null and b/code/bin/Debug/DevIL.dll differ diff --git a/code/bin/Debug/ILU.dll b/code/bin/Debug/ILU.dll new file mode 100644 index 0000000..b5f6561 Binary files /dev/null and b/code/bin/Debug/ILU.dll differ diff --git a/code/bin/Debug/ILUT.dll b/code/bin/Debug/ILUT.dll new file mode 100644 index 0000000..3317889 Binary files /dev/null and b/code/bin/Debug/ILUT.dll differ diff --git a/code/bin/Debug/jumppad_pointy_md.png b/code/bin/Debug/jumppad_pointy_md.png new file mode 100644 index 0000000..90c6d89 Binary files /dev/null and b/code/bin/Debug/jumppad_pointy_md.png differ diff --git a/code/bin/Debug/jumppad_pointy_mg.png b/code/bin/Debug/jumppad_pointy_mg.png new file mode 100644 index 0000000..fabc473 Binary files /dev/null and b/code/bin/Debug/jumppad_pointy_mg.png differ diff --git a/code/bin/Debug/texconv.exe b/code/bin/Debug/texconv.exe new file mode 100644 index 0000000..0492481 Binary files /dev/null and b/code/bin/Debug/texconv.exe differ diff --git a/code/bin/Release/DevIL.dll b/code/bin/Release/DevIL.dll new file mode 100644 index 0000000..b7a4c09 Binary files /dev/null and b/code/bin/Release/DevIL.dll differ diff --git a/code/bin/Release/ILU.dll b/code/bin/Release/ILU.dll new file mode 100644 index 0000000..b5f6561 Binary files /dev/null and b/code/bin/Release/ILU.dll differ diff --git a/code/bin/Release/ILUT.dll b/code/bin/Release/ILUT.dll new file mode 100644 index 0000000..3317889 Binary files /dev/null and b/code/bin/Release/ILUT.dll differ diff --git a/code/bin/Release/howto.txt b/code/bin/Release/howto.txt new file mode 100644 index 0000000..b8a728b --- /dev/null +++ b/code/bin/Release/howto.txt @@ -0,0 +1,8 @@ +pass 2 imagefiles of any popular imagefile type into the texconv executable. + +eg. texconv.exe diff.png glow.png +or +use windows explorer and select&drag 2 imagefiles onto the executable, (in order of Diffuse, Glow) + +Fredrick Johansson +bladdidoo@gmail.com \ No newline at end of file diff --git a/code/bin/Release/jumppad_pointy_md.png b/code/bin/Release/jumppad_pointy_md.png new file mode 100644 index 0000000..90c6d89 Binary files /dev/null and b/code/bin/Release/jumppad_pointy_md.png differ diff --git a/code/bin/Release/jumppad_pointy_mg.png b/code/bin/Release/jumppad_pointy_mg.png new file mode 100644 index 0000000..fabc473 Binary files /dev/null and b/code/bin/Release/jumppad_pointy_mg.png differ diff --git a/code/bin/Release/mdg.png b/code/bin/Release/mdg.png new file mode 100644 index 0000000..a8e9b64 Binary files /dev/null and b/code/bin/Release/mdg.png differ diff --git a/code/bin/Release/texconv.exe b/code/bin/Release/texconv.exe new file mode 100644 index 0000000..4643338 Binary files /dev/null and b/code/bin/Release/texconv.exe differ diff --git a/code/diffuse.png b/code/diffuse.png new file mode 100644 index 0000000..90c6d89 Binary files /dev/null and b/code/diffuse.png differ diff --git a/code/final.png b/code/final.png new file mode 100644 index 0000000..919e13c Binary files /dev/null and b/code/final.png differ diff --git a/code/jumppad_pointy_md.png b/code/jumppad_pointy_md.png new file mode 100644 index 0000000..90c6d89 Binary files /dev/null and b/code/jumppad_pointy_md.png differ diff --git a/code/jumppad_pointy_mg.png b/code/jumppad_pointy_mg.png new file mode 100644 index 0000000..fabc473 Binary files /dev/null and b/code/jumppad_pointy_mg.png differ diff --git a/code/main.cpp b/code/main.cpp new file mode 100644 index 0000000..9db4d53 --- /dev/null +++ b/code/main.cpp @@ -0,0 +1,255 @@ +#include +#include +#include +#include +#include +#include "main.h" +#include + +using namespace std; + +int main(int argc, char* argv[]) +{ + cout << "Initializing..." << endl; + + // init DevIL + initDevIL(); + +//////////////////// + + // Fetch file args + if (argc < 3) + { + cerr << "ERROR: must provide 2 filepaths." << std::endl; + system("PAUSE"); + return 1; + } + + char* diffuseFilePath = argv[1]; + char* glowFilePath = argv[2]; + + cout << "Diffuse map:\t" < + +/// Init DevIL library +void initDevIL(); + +/// Load image into memory +ILuint loadImage(const char* filename, int *status = 0); + +/// Extracts filename from path +char* getFilename(const char* path); + +/// Composes target filename from inputfilename +char* ComposeFilename(const char* filename); diff --git a/code/mdg.png b/code/mdg.png new file mode 100644 index 0000000..a8e9b64 Binary files /dev/null and b/code/mdg.png differ diff --git a/code/obj/Debug/main.o b/code/obj/Debug/main.o new file mode 100644 index 0000000..c7f8a3c Binary files /dev/null and b/code/obj/Debug/main.o differ diff --git a/code/obj/Release/main.o b/code/obj/Release/main.o new file mode 100644 index 0000000..bf0d0db Binary files /dev/null and b/code/obj/Release/main.o differ diff --git a/code/texconv.cbp b/code/texconv.cbp new file mode 100644 index 0000000..424cd3f --- /dev/null +++ b/code/texconv.cbp @@ -0,0 +1,50 @@ + + + + + + diff --git a/code/texconv.depend b/code/texconv.depend new file mode 100644 index 0000000..53eda21 --- /dev/null +++ b/code/texconv.depend @@ -0,0 +1,12 @@ +# depslib dependency file v1.0 +1391013238 source:c:\projekt\textureconverter\texconv\main.cpp + + + + + + "main.h" + +1390999932 c:\projekt\textureconverter\texconv\main.h + + diff --git a/code/texconv.layout b/code/texconv.layout new file mode 100644 index 0000000..7fcf2e1 --- /dev/null +++ b/code/texconv.layout @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/releases/texconv_r1.zip b/releases/texconv_r1.zip new file mode 100644 index 0000000..fd40e5d Binary files /dev/null and b/releases/texconv_r1.zip differ diff --git a/texconv_r1_src.7z b/texconv_r1_src.7z new file mode 100644 index 0000000..6daab31 Binary files /dev/null and b/texconv_r1_src.7z differ