Multimedia Formats and Tools: Difference between revisions

From PS3 Developer wiki
Jump to navigation Jump to search
(→‎GIM: GimConv.exe)
Line 124: Line 124:
Used inside [[Resource_Container_(RCO)]] files
Used inside [[Resource_Container_(RCO)]] files


Can be converted back and forth to png/jpg/bmp... with gimconvert (included in [[rcomage]])
Can be converted back and forth to png/jpg/bmp... with gimconv (included in [[rcomage]])
 
===GimConv.exe===
There are several versions of this tool, included in the PSP theme tools released by sony, some of the versions seems to be have locked features that was available before and others are new features added
 
The version used as an standard unofficially is the one included in rcomage that uses a configuration file (named GimConv.cfg) initially edited by Zinga Burga to improve compatibility with rcomage, and later to add compatibility with ps3 rco's (there are some specific settings for ps3 that was added at some point, but now can be considered incorrect for ps3, or not generic enought)
 
The command line help of GimConv.exe gives a very limited explain of a few options (the ones at top are not real options, are more like groups of presets)
C:\Portables\rcomage-v1.1.1\GimConv>GimConv.exe
gimconv ver 1.20h --- generic picture converter
Copyright (C) 2006 Sony Computer Entertainment Inc.
  All Rights Reserved.
usage:
        gimconv <input files> [options]
options:
        -o <filename>  specify output file name
        -s <w,h>        resize image data
        -P              resize image data to a power of two
        -N              output in normal (not faster) pixel storage format
        -X              swap RGBA <-> ABGR
        -ps3            output ps3 style GIM
        -bpp<n>        color output bit depth; n is: 4, 8, 16, 16p, 16a or 32
                        4, 8 are indexed; 16, 16a, 16p, 32 are RGBA format
        -S              output text format
        -interact      input additional options
        -pictures      merge files as pictures
        -frames        merge files as frames
        -levels        merge files as levels
        -prompt        prompt always
        -warning        prompt on warning
        -error          prompt on error
 
The options that appears in the help of the command line what does is to load the real settings from GimConv.cfg, where all the options are listed and is posible to specify his default values, to change the groups of settings (for specific combinations of options like the option '''-ps3'''), is also the only place where is posible to see all the different settings availables of the tool
 
 
{{Boxcode|content=<syntaxhighlight lang="c">
//================================================================
//  gimconv configuration
//================================================================
 
// configuration modified by ZiNgA BuRgA for use with Rcomage
// modifying this script may cause Rcomage not to function properly
// when performing GIM conversions (though I expect you know this
// already if you're looking at this file)
 
usage {
puts "usage:"
puts "        gimconv <input files> [options]"
puts ""
puts "options:"
puts "        -o <filename>  specify output file name"
puts "        -s <w,h>        resize image data"
puts "        -P              resize image data to a power of two"
puts "        -N              output in normal (not faster) pixel storage format"
puts "        -X              swap RGBA <-> ABGR"
puts "        -ps3            output ps3 style GIM"
puts "        -bpp<n>        color output bit depth; n is: 4, 8, 16, 16p, 16a or 32"
puts "                        4, 8 are indexed; 16, 16a, 16p, 32 are RGBA format"
puts ""
puts "        -S              output text format"
puts "        -interact      input additional options"
puts "        -pictures      merge files as pictures"
puts "        -frames        merge files as frames"
puts "        -levels        merge files as levels"
puts "        -prompt        prompt always"
puts "        -warning        prompt on warning"
puts "        -error          prompt on error"
}
 
//----------------------------------------------------------------
//  default settings
//----------------------------------------------------------------
 
default {
load "lib/*"
 
//  main control
 
interact_mode = off // off on ctrl
merge_mode = off // off picture frame level plane
// image palette sequence
prompt_mode = off // off on warning error
output_object = on // off on
output_script = off // off on
output_directory = auto // current input auto
output_filename = ""
object_extension = .gim
script_extension = .gis
userdata_extension = .dat
glob_extension = .dds .tm2 .tga .bmp .avi
object_viewer = ""
 
//  process control
 
filter_script = "Filter"
image_size = default // default pow2 $w,$h
pixel_order = faster // default normal faster
pixel_alpha = default // default $alpha
pixel_channel = default // default rgba rgab ragb ... etc
image_format = default // default rgba8888 rgba4444 rgba5551 rgba5650
// index4 index8 index16 index32
// dxt1 dxt3 dxt5 dxt1ext dxt3ext dxt5ext
palette_format = default // default rgba8888 rgba4444 rgba5551 rgba5650
update_userdata = default // default off on
update_fileinfo = off // default off on
 
check_limit = on // off on
limit_image_width = 512 // off $count
limit_image_height = 512 // off $count
limit_level_count = 8 // off $count
limit_frame_count = off // off $count
 
//  output control
 
format_style = psp // std psp ps3
format_endian = little // little big
 
output_image = on // off on
output_palette = on // off on
output_sequence = off // off on
 
extend_edge = off
}
 
//--------------------------------------------------------
//  format specific
//--------------------------------------------------------
 
input *.avi {
pixel_alpha = 255
}
 
input *.bmp {
pixel_alpha = 255
}
 
input *.dds {
}
 
input *.tga {
}
 
input *.tm2 {
}
 
input *.gim {
}
 
input *.gis {
}
 
//--------------------------------------------------------
//  mode option
//--------------------------------------------------------
 
option -interact {
interact_mode = on
}
 
option -pictures {
merge_mode = picture
}
 
option -frames {
merge_mode = frame
}
 
option -levels {
merge_mode = level
}
 
option -planes {
merge_mode = plane
}
 
option -images {
merge_mode = image
}
 
option -palettes {
merge_mode = palette
}
 
option -sequences {
merge_mode = sequence
}
 
option -prompt {
prompt_mode = on
}
 
option -warning {
prompt_mode = warning
}
 
option -error {
prompt_mode = error
}
 
//--------------------------------------------------------
//  process option
//--------------------------------------------------------
 
option -o %filename {
output_filename = %filename
}
 
option -s %size {
image_size = %size
}
 
option -g %ext {
glob_extension = %ext
}
 
option -P {
image_size = pow2
}
 
option -N {
pixel_order = normal
}
 
option -ps3 {
format_style = ps3
format_endian = big
}
 
option -bpp4 {
image_format = index4
}
option -bpp8 {
image_format = index8
}
option -bpp16 {
image_format = rgba5551
}
option -bpp16a {
image_format = rgba4444
}
option -bpp16p {
image_format = rgba5650
}
option -bpp32 {
image_format = rgba8888
}
 
//--------------------------------------------------------
//  PS3 OSD specific options
//--------------------------------------------------------
 
option -X {
pixel_channel = abgr
}
 
option -E {
extend_edge = on
}
 
//--------------------------------------------------------
//  output option
//--------------------------------------------------------
 
option -S {
output_object = off
output_script = on
}
 
//--------------------------------------------------------
//  filter script
//--------------------------------------------------------
 
script Filter %target {
RescaleImage  %target $image_size
SetPixelFormat %target $image_format $palette_format
SetPixelAlpha  %target $pixel_alpha
SwapPixelChannel %target $pixel_channel
ConfigureImage %target order $pixel_order
UpdateUserData %target $update_userdata
UpdateFileInfo %target $update_fileinfo
ExtendEdge    %target $extend_edge
CheckPSP      %target $check_limit
}
</syntaxhighlight>}}
 
The option '''-ps3''' seems to be wrong, the images inside [[explore_plugin]]_full.rco from firmware 4.70 has been made by using this 3 options
 
{{Boxcode|content=<syntaxhighlight lang="c">
option -ps3 {
format_style = psp
format_endian = big
pixel_order = normal
}
</syntaxhighlight>}}
 
You can edit the GimConv.cfg file and use GimConv.exe to load the group of options by the option '''-ps3''' in command line (or let rcomagegui.exe decide, but im not sure what it does)
 
Another way is by specifying the options strictly from command line (using the names that appears inside the GimConv.cfg file)
 
This is the most accurate way to specify options for GIM conversion, it doesnt uses groups but the result is the same, in this example is a command for gimconv.exe directly
{{Keyboard|content='''gimconv.exe tex_psn.png --format_style psp --format_endian big --pixel_order normal'''}}
 
But there is other way, by "redirecting" GIM settings from rcomage.exe ---to---> gimconv.exe at compiling time (see the "compile" help in [[rcomage]] page). There are 2 options in rcomage specific for this task, named: '''--gimconv-cmd''' and '''--gimconv-flags'''
{{Keyboard|content=}}
<!-- rcomage.exe compile explore_plugin_full.xml explore_plugin_full.rco --pack-hdr zlib --zlib-method default --zlib-level 9 ...INCOMPLETE_IS_MISSING_GIM_SETTINGS-->
<!-- and i cant make this 2 options work, is driving me nuts, grrr -->
 
*Other stuffing
**GimConv 1.20h http://endlessparadigm.com/forum/showthread.php?tid=5054 (is not the one used inside rcomage, seems to support animated images)


==GMO==
==GMO==

Revision as of 19:12, 1 March 2015

This page is intended to move here all info about multimedia file formats that is commonly used in other wiki pages and the related PC tools

A lot more fileformats not added yet to the page are listed in: http://www.psdevwiki.com/ps3/XMB_database#Promoter

See also Game Modding

Image

TIFF 6.0 Specification:

BMP

http://en.wikipedia.org/wiki/BMP_file_format

DDS

Direct Draw Surface (DDS) are used for example on XMB Manuals

Header:

Offset Size Example Value (conversion) Notes
DDS header
0x00 0x04 44 44 53 20 "DDS " Magic
0x04 0x04 7C 00 00 00 124 Size of header stucture
0x08 0x04 07 10 08 00 compressed no mipmap Flags:
  • 0x01: DDSD_CAPS (Required in every .dds file)
  • 0x02: DDSD_HEIGHT (Required in every .dds file)
  • 0x04: DDSD_WIDTH (Required in every .dds file)
  • 0x08: DDSD_PITCH (Required when pitch is provided for an uncompressed texture)
  • 0x0010: DDSD_PIXELFORMAT (Required in every .dds file)
  • 0x000002: DDSD_MIPMAPCOUNT (Required in a mipmapped texture)
  • 0x000008: DDSD_LINEARSIZE (Required when pitch is provided for a compressed texture)
  • 0x000080: DDSD_DEPTH (Required in a depth texture)
0x0C 0x04 38 04 00 00 1080 Surface height (in pixels).
0x10 0x04 80 07 00 00 1920 Surface width (in pixels).
0x14 0x04 00 D2 0F 00 1012.5KB Size:
  • the pitch or number of bytes per scan line in an uncompressed texture
  • the total number of bytes in the top level texture for a compressed texture
... ... ... ... ...


DDS normal maps

Normal maps are a 3D effect, the word "normal" is a reference to the Y axis (of the 3D space defined by X,Y,Z axis), is also known as "elevation". Normal maps can make small areas of a surface to be displayed with a displacement up or down, they also reacts to the lights of the scene dinamycally

NVIDIA Normal Map filter plugin for photoshop

The NVIDIA Normal Map filter creates normal maps from grayscale height maps. The filter UI provides a powerful 3D preview and a variety of filtering options. For MIP-mapped normal maps, the NormalMap Filter should be used for preview only, and then the grayscale map exported via the DDS plugin with "Normal Map Settings..." enabled. This will create a normal map with maximal detail and fidelity for all texture levels, without undesirable filter aliasing.

An easy way to create normal maps in photoshop by using the Normal Map plugin:

In tab: Filter ---> Ndivia Tools
-height generation - 7x7 / minZ-0 scale-2.2
-3D view options - animate light
-height source - Average RGB (or "Alpha Channel" in case you created an alpha channel with this purpose)
-Alpha field - height

Normal Map Tutorial (using photoshop and crazybump) http://www.youtube.com/watch?v=tKqKJi6nh7A

DDS Cube Maps

DDS Tools

DXT

The DXT compressed textures always have the same size. This is because they have a fixed compression ratio.

Used on PS2 classic as manual, they are texture files (DXT1, no mipmap?) with a minimalistic header of 0x08 byte (width*height)

For viewing them on computer, you can rebuild/create/paste (from an .dds dxt1 no mipmap existing file) an header following .dds header specs:

  • On your dxt files, remove the first 0x08 bytes (which has the width and height hexadecimal information), insert on top of it the .dds header. Edit the .dds header, see the .dds section, to get the proper width, height, and texture size)

Sample: http://rghost.net/58928544 (.dxt files are original, .dxt.dds are edited for viewing)

e.g. (quick note, should be move to emulation/PS2 page once figure out)

001.dxt -->  256KB -->instruction screen: 544*960? (Surface height (in pixels).*Surface width (in pixels).)
002.dxt -->  256KB -->information screen: *544*960?
003.dxt --> 1441KB -->game manual: 1536*1920?
...
008.dxt --> 1441KB -->end of the game manual
009.dxt -->  256KB -->Notice screen: 544*960?

GIM

Graphics Image ?

Used inside Resource_Container_(RCO) files

Can be converted back and forth to png/jpg/bmp... with gimconv (included in rcomage)

GimConv.exe

There are several versions of this tool, included in the PSP theme tools released by sony, some of the versions seems to be have locked features that was available before and others are new features added

The version used as an standard unofficially is the one included in rcomage that uses a configuration file (named GimConv.cfg) initially edited by Zinga Burga to improve compatibility with rcomage, and later to add compatibility with ps3 rco's (there are some specific settings for ps3 that was added at some point, but now can be considered incorrect for ps3, or not generic enought)

The command line help of GimConv.exe gives a very limited explain of a few options (the ones at top are not real options, are more like groups of presets)

C:\Portables\rcomage-v1.1.1\GimConv>GimConv.exe
gimconv ver 1.20h --- generic picture converter
Copyright (C) 2006 Sony Computer Entertainment Inc.
 All Rights Reserved.

usage:
       gimconv <input files> [options]

options:
       -o <filename>   specify output file name
       -s <w,h>        resize image data
       -P              resize image data to a power of two
       -N              output in normal (not faster) pixel storage format
       -X              swap RGBA <-> ABGR
       -ps3            output ps3 style GIM
       -bpp<n>         color output bit depth; n is: 4, 8, 16, 16p, 16a or 32
                       4, 8 are indexed; 16, 16a, 16p, 32 are RGBA format

       -S              output text format
       -interact       input additional options
       -pictures       merge files as pictures
       -frames         merge files as frames
       -levels         merge files as levels
       -prompt         prompt always
       -warning        prompt on warning
       -error          prompt on error

The options that appears in the help of the command line what does is to load the real settings from GimConv.cfg, where all the options are listed and is posible to specify his default values, to change the groups of settings (for specific combinations of options like the option -ps3), is also the only place where is posible to see all the different settings availables of the tool


Code Sample

The option -ps3 seems to be wrong, the images inside explore_plugin_full.rco from firmware 4.70 has been made by using this 3 options

Code Sample

You can edit the GimConv.cfg file and use GimConv.exe to load the group of options by the option -ps3 in command line (or let rcomagegui.exe decide, but im not sure what it does)

Another way is by specifying the options strictly from command line (using the names that appears inside the GimConv.cfg file)

This is the most accurate way to specify options for GIM conversion, it doesnt uses groups but the result is the same, in this example is a command for gimconv.exe directly

Type This
'''gimconv.exe tex_psn.png --format_style psp --format_endian big --pixel_order normal'''

But there is other way, by "redirecting" GIM settings from rcomage.exe ---to---> gimconv.exe at compiling time (see the "compile" help in rcomage page). There are 2 options in rcomage specific for this task, named: --gimconv-cmd and --gimconv-flags

Type This

GMO

Graphics... ?

Used inside Resource_Container_(RCO) files

GTF

Graphics Texture Format (GTF) is a container for storing one or multiple textures ("pack GTF") data in a layout that can be used as is by RSX.

Header (for single texture):

Offset Size Example Value (conversion) Notes
GTF header
0x00 0x04 02 02 00 FF Version
0x04 0x04 Size of texture (not included header)
0x08 0x04 00 00 00 01 Number of textures embedded
0x0C 0x04 00 00 00 00 Not used?
GTF specification
0x10 0x04 00 00 00 80 Size Header
0x14 0x04
  • For V.02 02: Size file (without header & ending padding)
0x18
0x19
0x1A
0x1B
0x1C 0x04 Remaps:
DDS specification
0x20 0x02 00 40 64 in decimal Size image width
0x22 0x02 00 40 64 in decimal Size image height
0x24 0x02 00 00 0 in decimal Size image depth

JPG

http://en.wikipedia.org/wiki/JPEG

JPEG markers:

MPO

Is a 3D JPG embedded format by Fuji or Sony. Since fw 3.70 with specifics sixasis controls (on PlayMemories but also from XMB), PS3 as well as Nintendo 3DS or some Sony & Fuji camera can read MPO images as specific format.

On the Sony MPO format Multi Angle : the picture is 15 embedded Jpg Exif images with no padding (but can be modulate probably).

The MPO MA for 3DS is Fuji format?

MPO Splitter by Christian Steinruecken:

PNG

PS3 supports PNG images in 24 bits (for RGB channels), and 32 bits with transparency (24 bits for RGB channels + 8 bits for an alpha layer). "PNG Interlaced" and "APNG (Animated Portable Network Graphics)" formats are not supported by the PS3.

TGA

http://en.wikipedia.org/wiki/Truevision_TGA

Audio

AC3

Used for coldboot sounds

AT3

Adaptive Transform Acoustic Coding (ATRAC) is a family of proprietary audio compression algorithms developed by Sony.

Can be created by saving the file as a .WAV container using the ATRAC3 Codec @ 66Kbps.

Mono and stereo channels are supported

AT9

VAG

  • Format
Offset Size Example Value (conversion) Notes
VAG header
0x00 0x04 56 41 47 70 "VAGp" Magic
0x04 0x04 00 00 00 06 0.6? Version
0x08 0x04 00 00 00 00 - Reserved area
0x0C 0x04 00 00 04 50 1104 bytes Waveform data size (bytes)
0x10 0x04 00 00 BB 80 44 000 Hz Sampling Frequency (Hz)
0x14 0x0A 00 00 ... 00 00 - Reserved area
0x1E 0x01 00 1 ch Number of channels
  • 0-1 : 1 channel
  • 2 : 2 channels
0x1F 0x01 00 - Reserved area
0x20 0x10 53 45 30 34 5F 42 61 63 6B SE04_BACK Name
Waveform data starts


ADPCM data format (16 bytes block)
Decoding coefficient

(1 byte)

Loop information

(1 byte)

Sound Data

(14 bytes)

Decoding coefficient Loop information:
  • 1: last block of the file
  • 3: ending block of the loop
  • 6: starting block of the loop
  • 7: playback ending position

Because ADPCM uses sample blocks that are aligned one after the other, a wave compressed with ADPCM may have an unfinished, partial block at its end. The ADPCM decoder generates silence for the remainder of this partial block, which keeps the wave from looping seamlessly.

Sound data


Video

PAM

Pam files can contain audio or have the audio separwted in a .AT3 track, used in Content Information Files

Interactive

SWF

Shockwave Flash, used in Content Information Files and Widgets and some games (e.g.: Doki Doki unverse)

  • Irfanview supported format

3D/OpenGL

DAE

DAE (Digital Asset Exchange) is an XML file that contains COLLADA content. COLLADA is an open standard created by sony for interactive 3D applications. Is used to export and import files from 3-D authoring applications in .dae format, see: https://collada.org/

Collada usually is implemented as a plugin, some 3-D authoring applications supporting collada are: Blender, Google SketchUp, Maya, Rhino, 3D Max, SoftImage

FPO

VPO

MNU

Playlists

M3U8

Tools & Tips

  • Audio:
Audacity: The tool can be used to record live audio, record computer playback, 
edit WAV, AIFF, FLAC, MP2, MP3 or  Ogg Vorbis sound files, cut, copy, 
splice or mix sound together and also change the speed or pitch of a  
recording, plus a number of other useful features.
http://audacity.sourceforge.net/
Wavosaur: is a cool free sound editor, audio editor, wav editor software for editing, 
processing and recording sounds, wav and mp3 files. Wavosaur has all the features 
to edit audio (cut, copy, paste, etc.) produce music loops, analyze, record, batch convert.
Wavosaur supports VST plugins, ASIO driver, multichannel wav files, real time effect processing.
http://www.wavosaur.com/
  • Image:
Irfanview: View, convert, batch processing ...
http://www.irfanview.com/ (there is a plugin for .DDS)
Imagemagick: Create, edit, compose, or convert bitmap images
http://www.imagemagick.org (typically utilized from the command line)
  • 2D animation
animata: an open source real-time animation software, designed to create animations, 
interactive background projections for concerts, theatre and dance performances.
http://animata.kibu.hu/ 
  • 3D Modeling:
   Maya - http://www.autodesk.com/Maya
   3ds Max - http://usa.autodesk.com/3ds-max/
   Blender - http://www.blender.org/
   Wings3D - http://www.wings3d.com/
   Modo - http://www.luxology.com/modo/
  • Texturing:
   Photoshop - http://www.photoshop.com/
   Paint.NET - http://www.getpaint.net/
   GIMP - http://www.gimp.org/
  • Tutorials and Online Digital Communities:
   http://www.polycount.com/forum
   http://forums.cgsociety.org/
   http://www.3dbuzz.com
   http://3d-coat.com/forum/
   http://www.cgfeedback.com/cgfeedback/
   https://forums.station.sony.com/playerstudio