RGB + alpha 32 bit png help on importing map
by Deception Games · in Torque Game Engine Advanced · 04/16/2007 (2:12 pm) · 3 replies
1. Trying to understand the process of the RGB + alpha in a png. From what I have read and understand is that a png with a RGB + alpha creates a 32bit file.
2. Working with FreeWorld3D to create my maps for the TGEA engine. When exporting out of FreeWorld3D according to the tutorial need to combine the .raw files in Photoshop. Take the 3 .raw files that where created and open them in Photoshop and create a new file that is same size as the .raw files, that file is a 256 x 256 RGB 16bit file.
3. From what read here in GG is the alpha is the highest and Green is the lowest. Meaning that place my "snow.raw" file that I will select it and copy it and paste it into the alpha channel. And continue this until reach the Red channel which supposes to leave white if you have a base layer. When I save this file make sure the layers is check and save it as a opacity.png file.
4. When working in Torque my command that use is this to load the opacity.png
atlasGenerateOpacityTOC( "YOUR_MOD_FOLDER/data/terrains/opacity.png",
true, "YOUR_MOD_FOLDER/data/terrains/deleteme.opacity.atlas" );
5. Also installed the atlasGenerateOpacityTOC in the engine for this step.
6. The problem is when run the command in paragraph 4 the script comes back saying the is "atlasGenerateOpacityTOC - excepting a 32bit PNG!" The only way around this issue is to run these through Fireworks and save it. This seems to fix the problem. But there must be a solution to being able to save the png in Photoshop, already tried the "Save for web option" making sure checking off the transparently before saving. Tried various ways this past weekend only to not see correct results. Also tried the SuperPNG plugin and the results are the same. Search the web for answers and tried everything that could find on the issue and examples out the Photoshop CS book on layers.
One other part that bugs me after many tests this weekend was the following command
atlasGenerateBlenderTerrain( "YOUR_MOD_FOLDER/data/terrains/terrain.atlas", "YOUR_MOD_FOLDER/data/terrains/deleteme.geometry.atlas", "YOUR_MOD_FOLDER/data/terrains/deleteme.opacity.atlas", "YOUR_MOD_FOLDER/data/terrains/deleteme.lightmap.atlas",
VIRTUAL_MAP_SIZE,
"YOUR_MOD_FOLDER/data/terrains/LAYER_TILE1", "YOUR_MOD_FOLDER/data/terrains/LAYER_TILE2", "YOUR_MOD_FOLDER/data/terrains/LAYER_TILE3", "YOUR_MOD_FOLDER/data/terrains/LAYER_TILE4" );
Replace all items that in Caps with my data information, just copied the script information over as a example.
Is the code where insert your LAYER_TITLE of your file name of you image. Does this follow the same rules as RGB meaning that Layer Title 4 is the alpha or the Green Channel? Assuming that the Layer Title 1 is for the base layer in the Red Channel? Or this order here is the reverse order of the RGB + alpha ?
2. Working with FreeWorld3D to create my maps for the TGEA engine. When exporting out of FreeWorld3D according to the tutorial need to combine the .raw files in Photoshop. Take the 3 .raw files that where created and open them in Photoshop and create a new file that is same size as the .raw files, that file is a 256 x 256 RGB 16bit file.
3. From what read here in GG is the alpha is the highest and Green is the lowest. Meaning that place my "snow.raw" file that I will select it and copy it and paste it into the alpha channel. And continue this until reach the Red channel which supposes to leave white if you have a base layer. When I save this file make sure the layers is check and save it as a opacity.png file.
4. When working in Torque my command that use is this to load the opacity.png
atlasGenerateOpacityTOC( "YOUR_MOD_FOLDER/data/terrains/opacity.png",
true, "YOUR_MOD_FOLDER/data/terrains/deleteme.opacity.atlas" );
5. Also installed the atlasGenerateOpacityTOC in the engine for this step.
6. The problem is when run the command in paragraph 4 the script comes back saying the is "atlasGenerateOpacityTOC - excepting a 32bit PNG!" The only way around this issue is to run these through Fireworks and save it. This seems to fix the problem. But there must be a solution to being able to save the png in Photoshop, already tried the "Save for web option" making sure checking off the transparently before saving. Tried various ways this past weekend only to not see correct results. Also tried the SuperPNG plugin and the results are the same. Search the web for answers and tried everything that could find on the issue and examples out the Photoshop CS book on layers.
One other part that bugs me after many tests this weekend was the following command
atlasGenerateBlenderTerrain( "YOUR_MOD_FOLDER/data/terrains/terrain.atlas", "YOUR_MOD_FOLDER/data/terrains/deleteme.geometry.atlas", "YOUR_MOD_FOLDER/data/terrains/deleteme.opacity.atlas", "YOUR_MOD_FOLDER/data/terrains/deleteme.lightmap.atlas",
VIRTUAL_MAP_SIZE,
"YOUR_MOD_FOLDER/data/terrains/LAYER_TILE1", "YOUR_MOD_FOLDER/data/terrains/LAYER_TILE2", "YOUR_MOD_FOLDER/data/terrains/LAYER_TILE3", "YOUR_MOD_FOLDER/data/terrains/LAYER_TILE4" );
Replace all items that in Caps with my data information, just copied the script information over as a example.
Is the code where insert your LAYER_TITLE of your file name of you image. Does this follow the same rules as RGB meaning that Layer Title 4 is the alpha or the Green Channel? Assuming that the Layer Title 1 is for the base layer in the Red Channel? Or this order here is the reverse order of the RGB + alpha ?
#2
04/16/2007 (8:24 pm)
Tried the SuperPng and still have the same issue. Delete the old png and even reinstalled photoshop cs, including even the photo in program files just incase.
#3
Still need to know rest about the RBG + alpha order and order for atlasGeneraterOpacityTOC.
Thanks for replying to my Thread J.C.
One Mystery Solve and million to go!
04/16/2007 (8:42 pm)
Solve part my problem , reload my Photoshop 6.0 and used the SuperPng and saved it and that worked. From what I read Photoshop CS was suppose to have fixed the png. Still need to know rest about the RBG + alpha order and order for atlasGeneraterOpacityTOC.
Thanks for replying to my Thread J.C.
One Mystery Solve and million to go!
Torque 3D Owner J.C. Smith