Advertisement
Besrodio

Dragon's Dogma PC Texture Editing: Less Shit Version

Jan 19th, 2016
2,764
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 15.28 KB | None | 0 0
  1. Resources you will need=======================
  2. 1. editor for .DDS files
  3. a. Photoshop
  4. Get it from wherever the fuck you want, I use CS3. In order to edit/save .DDS files in Photoshop you will need the nVidia texture tools plugin here: https://developer.nvidia.com/nvidia-texture-tools-adobe-photoshop
  5. b. Gimp
  6. This has a plugin for .dds files, but I fucking hate Gimp and have Photoshop anyways, try this if you want to fiddle and get it to work. I've had positive reports of this working, but again, it's not something I use.
  7. c. Paint.net
  8. Get it from http://www.getpaint.net/ - this supports .dds right from the get go and is free, but its configuration for saving is pretty bunk, I haven't messed around with it enough to ever get it to work on its own yet. You can use this in conjunction with DDSOpt to do fine work though.
  9.  
  10. Optional/Helpful DDSOpt
  11. This is a utility that was made for Skyrim a few years back and is still the best option for converting files to .dds, while you can make do with just Photoshop, or just Gimp, this will probably produce higher quality .dds files with better compression and also just be more reliable in general, get it here: http://www.nexusmods.com/skyrim/mods/5755/?tab=2&navtag=http%3A%2F%2Fwww.nexusmods.com%2Fskyrim%2Fajax%2Fmodfiles%2F%3Fid%3D5755&pUp=1
  12.  
  13. See later for a more detailed description on how to use this.
  14.  
  15. 2. .arc file Unpacker/Repacker
  16. ARCtool.exe
  17. This is going to be the actual workhorse behind unpacking the game's resource files, and repacking them to be able to utilize. Grab it from FluffyQuack's post here: http://residentevilmodding.boards.net/thread/481/arc-unpacker-repacker-v0-26
  18. And a batch file to actually interface with ARCtool.exe
  19. Now that the game is out, FluffyQuack has released an update to the ARCTool along with a batch file for DD on PC, grab the PC batch files in the post and pull pc-dd out. If you're editing textures you want to add the -tex flag, my batch file looks as following:
  20. arctool -dd -texRE6 -alwayscomp -pc -txt -v 7 %1 %2 %3 %4 %5 %6 %7 %8 %9 -tex
  21.  
  22. There are some additional flags you can use, but I've had crashes with a few when I wasn't messing with their types (this may have been fixed in one of the subsequent version releases), so use them sparingly or if you're specifically looking to edit those files:
  23. -xfs : XFS <-> XML
  24. -lot : LOT <-> TXT
  25. -gmd : GMD <-> TXT
  26.  
  27. I have another batch file I use when I'm looking through large amount of files for something I want, to process a lot of arcs in a row without having to click and drag each one:
  28. FOR /R %%f IN (*.arc) DO arctool -dd -texRE6 -alwayscomp -pc -v 7 %1 %2 %3 %4 %5 %6 %7 %8 %9 -tex -xfs -lot -gmd "%%f"
  29. This will unpack all .arc files in the same folder as the .bat file. This does not work the other way around, and I suggest that once you find the .arc with the things you're looking for you unpack and repack with the .bat file above.
  30.  
  31. 3. A system for backups
  32. a. You could use some sort of software to track and notate your changes, like TortoiseSVN or something. This would also allow you to more easily make an online repository to work with others on larger scale projects if you felt so inclined.
  33. b. I just use a couple folders. I have a Backup folder where I keep the originals of .arc files I'm editing, as well as a direct unpack of the .arc file, so I can grab individual textures to put back in if I mess up the format somewhere.
  34. c. Another possibility is just utilizing a copy right where the original lived. Before editing an .arc file, just copy and paste it right there, then you'll have a big red flag right where you made a change as [original file] - Copy.arc. Most the files are the same length within their folders, so it really stands out that that's something you've edited.
  35.  
  36. The Actual Process=======================
  37.  
  38. 1. Unpacking/Repacking
  39. Make a folder in your game folder called ARCtool, or mods, or whatever/wherever the fuck you want, this is where you'll be editing. Put your ARCtool.exe and pc-dd.bat file in this folder. I renamed both to have an underscore in front so they'd always be at the top of the list.
  40.  
  41. Find your .arc file you want to edit and create a copy in the editing folder, then drag this copy on top of the pc-dd batch file. This will pop open a quick command line process, and then generate a folder of the same name as the .arc file. This is unpacking the .arc file. If you drag the folder onto the batch file, it will do the reverse and repack the folder's contents into a new .arc file, which will overwrite the .arc file in your editor folder, so once again, make sure this is not your original.
  42.  
  43. 2. Finding your .arc file
  44. The game's resource files are held in [game install folder]\nativePC\rom - there are a lot of sub folders here, and a few high level .arc files such as title.arc, which contains the skin textures that the player character uses.
  45.  
  46. dl1: DLC stuff - specifically items that you start with, such as The Lion's Spine, or Hair 61/62
  47. enemy: fairly obvious, this is enemy data
  48. eq: equipment, all armor/clothing (sans those in dl1), also includes hair and beards. Seems to also include generic sound effects for gear types in the se subfolder
  49. etc: contains editParts_FEMALE and MALE, which may correspond to the morphs applied in character creation - may be worth looking into to *really* autism and create your perfect looking pawn.
  50. event: these seem to correspond to in-game cutscene files, haven't messed with these any though
  51. gui: fairly obvious, the GUI files
  52. h_enemy: human enemies
  53. ingamemanual: I wonder what this is
  54. item_b: inventory icons for items
  55. map: presumably all the parts of the map, haven't looked through here
  56. message: contains message.pck - can't unpack pck files, so I'm assuming this is most likely subtitle data?
  57. mnpc: seems to only contain motion values and AI for NPCs, not really sure what this effects or does.
  58. npc: npc files such as models and textures
  59. npcfca: face data for npcs, stuff like lip synch
  60. npcfsm: seems to be AI data for NPCs sorted by stage, could be stuff like where an NPC runs to when combat breaks out
  61. om: in-game objects, stuff like trees and crates are in here I believe
  62. pwnmsg: pawn dialogue subtitles, also has sound folders but they're far too small to actually be all the pawn dialogue
  63. quest: quest data
  64. shell: I have no idea what these are, there's files like fireball and cockatrice - they COULD be morph data for stuff like the cockatrice neck blowing up
  65. sk: skill data, stuff like the models/texture for Ingle are in here, also have motion data, which are held in .lmt format, which for RE5 was animations, so you could presumably mess with/swap animations in this manner
  66. sound: the bulk of dialogue data is here, held in .pck files, this folder alone is over 1GB
  67. stage: all the data concerning the environment, so the map you're actually running around on's collision data, textures, stuff like that - FluffyQuack had some notes on which folder and arc file was which, see them here: http://www.tzarsectus.com/DD/txt/stages.txt
  68. voice: pretty sure these are the generic voices your player character uses for grunts and yelling
  69. wp: weapons
  70.  
  71. As a reference for equipment/weapons, see https://docs.google.com/spreadsheets/d/1YVYdahFlTlA5arybKzezbLZclKb4rSaMQEwL_Czzjo4/edit#gid=0
  72. A google document made by Vuze over on REModding Forums, may or may not be entirely accurate, but has been useful thus far for me.
  73.  
  74. 3. Editing your texture
  75. Using f_a_acc1300.arc in the eq\a_acc folder as an example (Ebon Neck Wrap), we'll look at where most textures are and what they actually are, as well as the formats and MIPs used. After unpacking f_a_acc1300.arc,we would want to go to editfolder\f_a_acc1300\model\pl\f\f_body_c\f_body_c103 and take a look around (generally you're looking for \model\pl for the textures to edit in most .arc files). In here are 3 .dds files, _CMM, _NM_HQ, and _NUKI
  76.  
  77. _NUKI//_BM will generally be your primary concern, NUKI is your actual texture, what you're going to see in game. It oftentimes has an alpha (transparency) and colors.
  78.  
  79. NM (or NM_HQ) is the Normal Map - from Wikipedia: "...normal mapping, or "Dot3 bump mapping", is a technique used for faking the lighting of bumps and dents – an implementation of bump mapping. It is used to add details without using more polygons. A common use of this technique is to greatly enhance the appearance and details of a low polygon model by generating a normal map from a high polygon model or height map.
  80. Normal maps are commonly stored as regular RGB images where the RGB components correspond to the X, Y, and Z coordinates, respectively, of the surface normal."
  81. And an additional note on how Dragon's Dogma weirdly uses its Normal Maps from reddit user Aiboukrau: "Typically, your standard (tangent-space) normal map will contain data in a format where one lighting direction is stored in the red channel, and the other lighting direction is stored in the green channel. However, Dragon's Dogma seems to (for the textures I've seen) store them in a format where one direction is stored in the red channel, and the other in the alpha channel. This is very important, because without altering both directions properly, your modified normal maps will look incorrect in-game."
  82.  
  83. _CMM I still don't really know anything about. On some items it seems to be an overlay of sorts, enhancing the look and coloration of a texture depending on light, so you could think of it as a 'shininess' overlay, but really, you should just play this by ear and test out on your item to see what it does.
  84.  
  85. There are a few other formats, for instance: the nude body textures have a DM_HQ texture that seems to be a normal map of the muscles the slider in character creation affects: so it'd basically just be determining the strength to which the DM_HQ normal map is applied.
  86.  
  87. When saving .DDS files when you're done, there are a few options that you need to make sure are correct. First being the format - Dragon's Dogma uses DXT1 and DXT5 formats, they are both ARGB (alpha plus RedGreenBlue). DXT1 is commonly on _CMM and _NUKI files, while DXT5 has been for every _NM I've edited thus far. Some environment textures have DXT5 for all parts. DXT1 is 1 bit alpha, aka, jagged edges, the texture is either completely transparent on that pixel or completely visible. DXT5 has interpolated alpha, aka degrees of transparency, so fading edges would be DXT5 textures. You NEED this format to match what the game originally has, or the repacker will fuck you sideways and interpret the file wrong, making a ridiculous mess of all the channels, or the game will just crash out upon attempting to load the texture.
  88.  
  89. The other option that needs to be correct is MIP Map Generation, set this to 'Use Existing MIP maps' with the dropdown set to match the original files Mips count, as seen in the .txt file generated for each .dds. This will retain the type of MIP maps the .arc file had to begin with. If you set this to 'All', for some reason the repacker will interpret the .dds as having an extra MIP map and the count will go up, and this can have unforeseen consequences (ie random crashes when you're entering new areas).
  90.  
  91. As a side note: a MIP map is the texture containing several increasingly smaller versions of the same texture to transition between depending on the camera's distance from the texture. - from the DDSOpt Guide: "Mip-maps are resampled, downscaled versions of the primary image that exist at each resolution level underneath the resolution of the parent image (e.g., if the texture resolution is 256x256, then it should have embedded mip-maps at 128x128, 64x64, 16x16, 4x4, 2x2, and 1x1 resolutions). This is important in situations where the image is being viewed from varying 'distances' or steep angles, as in a game like Skyrim. Mip-maps are embedded within the texture itself..."
  92.  
  93. You can check the settings for each texture via the 3rd generated file of the same name, there should be a .dds for you to edit, a .tex (the actual texture file the game will use), and a .txt file. The .txt file will look like so:
  94.  
  95. TEX
  96. Texversion=RE6
  97. Textype=20
  98. Width=512
  99. Height=512
  100. Mips=9
  101. Uint1=536871065
  102. Byte1=1
  103. Byte2=1
  104. Byte3=0
  105. DDSFormat=DXT1
  106.  
  107. The important lines being Texversion, DDSFormat, and Mips. Texversion is why we use the pc-dd batch file, DDSFormat is how we need to save the file, and Mips is the MIP Map count, which can and will change between files for an individual .arc, so be careful on that front.
  108.  
  109. DXT1 means a format in Photoshop of DXT1 ARGB 4 bpp | 1 bit alpha, DXT5 means DXT5 ARGB 8 bpp | interpolated alpha. There are one other format for each DXT1 and DXT5 you want to avoid due to interpreting colors differently (XY DXT5) or not having alpha (RGB DXT1).
  110.  
  111. DDSOpt Section:
  112. Here's a guide: http://wiki.step-project.com/Guide:DDSopt - but if you'd like the short version, the necessary steps to get what you want are as follows:
  113. Open up your version (32 or 64 bit), set the top blank line to the folder containing the files you want to convert - this should show a list of files in the bottom area - double click the file you want to convert, and it will take you to the preview tab, here you want to look down at the bottom, change the dropdown to DDS - Optimal DXT (with alpha), 1:4, then hit Save As and overwrite your DDS file.
  114.  
  115. Essentially, how I've been using this is editing my DDS file to be the size and with the changes I want (no MIPs shown, so cropping might be necessary in Photoshop), then saving it as a PNG (make sure that you actually have transparency on the RGB layer, CS3 is not very smart and saves as a 24bit png even if there's an alpha layer if there's no transparency made - Paint.net is smarter about this and lets you specify). Then I open up DDSOpt, set the dropdown to DDS - Optimal DXT (with alpha), 1:4 and save as a DDS file, overwriting my original. Repack the .arc file and you should be good to go.
  116.  
  117. Someone brought it to my attention that DDSOpt does NOT handle DXT1 well. If you put in a .PNG file with 1bit alpha it will just save it as DXT5, forcing you to take your resulting file right back into Photoshop and save it as DXT1 to get a proper result. If you just slip that into the game files they will turn into a weird 'grated' version of your texture due to it trying to repack a DXT5 as a DXT1 back into the .tex file. So, user beware, DDSOpt is not perfect.
  118.  
  119. 3. Testing
  120.  
  121. Once you have edited your texture (don't forget the alpha channel), saved it as the proper format, and made sure the file folder is in the same place, you can repack the .arc file as stated above, and slide your edited version into the game's files (again: keep the original backup safe).
  122.  
  123. In order to actually see changes, while you don't need to load the game, you need to get the game to unload and reload the texture in question. For equipment, if you change your equipment and make the texture go away, exit the menu, then go right back in, this seems to be enough to reload the new .arc file. For other stuff, you might need to transition areas, or in some cases save and quit to title, then reload. For more core files like bbsrpg_core, you may need to restart the game entirely.
  124.  
  125. If your texture is checkered boxes, your MIPs are probably wrong.
  126.  
  127. If your texture is rainbow vomit, your formats are probably wrong.
  128.  
  129. If the game crashes, any of the above, including using the wrong batch file.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement