群星
ParaWikis
最新百科
都市天际线2百科
英雄无敌3百科
维多利亚3百科
奇妙探险队2百科
罪恶帝国百科
英白拉多:罗马百科
热门百科
群星百科
欧陆风云4百科
十字军之王2百科
十字军之王3百科
钢铁雄心4百科
维多利亚2百科
ParaWikis
申请建站
ParaWikis
ParaCommons
最近更改
随机页面
加入QQ群
工具
链入页面
相关更改
特殊页面
页面信息
页面值
阅读
编辑
编辑源代码
查看历史
讨论
编辑“
Maya exporter
”
警告:
您没有登录。如果您做出任意编辑,您的IP地址将会公开可见。如果您
登录
或
创建
一个账户,您的编辑将归属于您的用户名,且将享受其他好处。
反垃圾检查。
不要
加入这个!
{{version|Timeless}} Exporter Instructions (written for [[Stellaris]]) Version xx.xx Officially supported for Maya 2015/2016. Errors in use with earlier versions might occur. Instructions on how to install and use paradox Maya exporter and Photoshop texture assembler. Feel free to comment on hard to understand or missing information in this document. Prerequisites: * Autodesk Maya. * Adobe Photoshop. == Installation == First download the Clausewitz Maya Exporter here: https://accounts.paradoxplaza.com/profile/downloads The installer will install two things: * The "Clausewitz Maya Exporter" which exports settings for Autodesk Maya to create .mesh files for the game. * 2 Photoshop plugins for texture development. ===Maya exporter=== To set up the Maya exporter, follow these steps: * Run the “PdxExporterInstall.exe” '''AS ADMINISTRATOR'''. * Go through the setup process. --In this guide, when spoken about "C:/Users/YOUR_USER/pdx_exporter/", it is referred to the directory you selected during this process. * Before clicking finish, make sure you've enabled the "Run Maya Exporter Deploy Wizard". * Click Finish. '''NOTE''': The Clausewitz "Maya Exporter Deploy Wizard" unfortunately exports files to your Windows drive, therefore C:/Users/YOUR_USER/Documents/ in this guide, will ''always'' refer to YOURWINDOWSDRIVE:/Users/YOUR_USER/Documents/. Even if you setup "My Documents" to be in a different directory or drive. It might be easier to remember that when this guide shows a directory with /Documents/ in it, it will be on your windows drive. When it doesn't, it's in the directory you installed it. *Run Maya and make the below commands into a shortcut, most easily done by following these instructions: * Go into your plugin manager (At the top menu in Maya navigate trough Windows > Settings/Preferences > Plug-in Manager) and enable the “pdx_exporter.mll” plugin. ** If it's not there you need to click Browse and search for it, in the directory where you installed PdxExporterInstall.exe to (default C:/Users/YOUR_USER/pdx_exporter/maya/maya_20xx_sdk_x64 (Don't ask me why it doesn't defaultly installed in /documents/ there)). Make sure you've selected the right exporter according to the version of Autodesk Maya you have installed. * Paste the following in the MEL input area at the bottom of your screen: '''rehash; source pdx_export_ui.mel; showPdxExport;''' ** ''// Error: Line 1.33: Cannot find file "pdx_export_ui.mel" for source statement.'' -> Just add the directory. (e.g. '''rehash; source "C:/Users/YOUR_USER/Documents/maya/scripts/pdx_export_ui.mel"; showPdxExport;''') * Select the entire command string that you've just entered in the MEL field, and while pressing the middle mouse button, you can drag the command string to your shelf (top bar, you will notice when there's a [+] sign at your pointer) in Maya. * Click on "MEL" when it says "Save script to shelf as type:". * Your game directory will have to be manually assigned before the exporter can be used. By default, the file where this has to be is “C:/Users/YOUR_USER/Documents/Paradox Interactive/PdxExporter/settings/clausewitz.txt”. ** Below to [Terra], edit "s 1" so it points to the root directory of the game folder (X:/Steam/steamapps/common/Stellaris) ** Edit "target_exe s 1" to be pointing at the exe file (X:/Steam/steamapps/common/Stellaris/stellaris.exe) ** (optional) You can change [Terra] to [Stellaris]. *** If you did not find this file in the given default directory, you can copy it from the "Clausewitz Maya Exporter" directory (default C:/Users/YOUR_USER/pdx_exporter/) into the right place (C:/Users/YOUR_USER/Documents/Paradox Interactive/PdxExporter/settings/) * Clicking the exporter on your shelf in Maya should now be possible, but before an object can be exported, we will have to set up the necessary materials using photoshop. ===Photoshop plugin=== Once you have run the installer, there will be two new plugins under File > Scripts * TextureExporter (save textures as .TGA, and assembles textures to .dds files to game folder) * GuiExporter (batch save tool) The first time you run the script, it will ask you to specify where you have located the games. Locate each games root folder (where the exe is). If you later wish to change the path. The paths are stored in: “Documents\Paradox Interactive\PdxExporter\settings\texture_exporter.txt” . It is advisable to specify not the root game directory, but the home directory of your mod. Errors: * "No document open!" -> You didn't open or create an empty file... (Personally I don't know if there is a recommendation on the dimensions it should have, if you create a new one) * "Could not read ~/Documents/Paradox Interactive/pdxExporter/settings/texture_exporter.txt" -> (I wish I knew...) == Photoshop texture creation == In Photoshop, you will have multiple layers for each type of texture you want to export. You will need to create at least three layers, named "diffuse", "normal" and "specular". Additionally, you can create a layer for metal, gloss, emissive, opacity and color if you so choose. These layers are commonly referred as "maps". The diffuse map is the usual texture you would expect to see. The normal map use the values of the colours (RGB) as component of vector in space. The specular map is a black/white map where black is "no reflection" and white is "100% reflection" Other maps are used for special effects. Follow these steps to create the basic maps: * The diffuse map is probably what you already have. * Duplicate the layer and apply the built-in Photoshop filter or better you can use the Nvidia plugin (Filter -> Nvidia filters -> create normal maps) . Name the new layer "normal" * Duplicate the diffuse layer and call it "specular". Create a specular map it's not an easy task, but you can start changing the channel to "blue" and reduce the saturation a little. Merge the filter with the specular layer when it's done. === Exporting textures === As stated above, in Photoshop, you must to have at least 3 layers ("diffuse", "normal" and "specular"). You can create and export additional ( metal, gloss, emissive, opacity and color) layers. * Under the files -> scripts menu you’ll find “texture exporter”. ** Clicking this allows you to export the textures to where you want them using your preferred settings, that is the layers you want to export. ** The output directory should be the “gfx\models” map of your Stellaris mod directory * Clicking OK will start the export. The channels of each layer are exported to the following channels in the generated files (Not all channels are exported! See Notes): {| class="wikitable" ! rowspan="2" | File ! colspan="4" | Channel ! rowspan="2" | Notes |- ! R ! G ! B ! A |- | [texturename]_diffuse.dds | DiffuseR | DiffuseG | DiffuseB | OpacityR | OpacityGB are ignored |- | [texturename]_normal.dds | NormalR | NormalR | EmissiveR | NormalG | NormalB is ignored. EmissiveGB are ignored |- | [texturename]_specular.dds | Mask (various) | SpecularB | MetalB | GlossB | ColorRGB are ignored SpecularRG are ignored. Gloss RG are ignored. |} Forums post by Iarre. [https://forum.paradoxplaza.com/forum/index.php?threads/minor-nation-3d-model-project.840832/page-3#post-19048645 link] Textures<br /> Diffuse 512x512, DXT1 RGB 4 bpp no alpha.<br /> Normalmap 512x512<br /> The normalmap is a little bit special, we have the normalmaps red channel copied to green channel as well, so red and green are the same. The green channel is placed in alpha(before copying).<br /> Blue channel is black.<br /> This is due to normalmaps needing more quality and I wish that "in the future" some normalmaps would be 16 bits.<br /> Texture is saved as DXT5 ARGB 8 bpp interpolated alpha<br /> Specmaps 256x256, DXT5 ARGB 8 bpp interpolated alpha<br /> Red channel is a masking layer for planet city lights or ship country color, or not used.<br /> Green channel is specular.<br /> Blue channel is metalness<br /> Alpha is glossiness<br /> We have quite clean values for these, not a lot of noise. We think it looks best that way with not much noise on the characters. ==Exporting in Maya== Only objects with a shader assigned to it, which has the "shader attribute", will be exported. (This is good, since then you can keep other things in your scene, which will not be exported) After having modeled your object in Maya and having made the materials for it in Photoshop, the following applies: * Apply a phong shader to your mesh (for instance by right clicking the object and accessing the materials menus). * Assign your generated diffuse texture to the color slot. Should be named "<asset_name>_diffuse.dds" * Assign your generated normal texture to the bump slot. Should be named "<asset_name>_normal.dds" * Assign your generated specular texture to specular color slot. Should be named "<asset_name>_specular.dds" * Click the exporter in your shelf. * Select the shader (hypershade tool is a good way to do it) and press “apply shader attr”. * For the first time you export, make sure the "Create .gfx and .asset" checkbox is ticked. This can be unticked after the first time. At this point you should be able to enter the game and spawn your created object. The name of your object will be visible through the .asset file created in your models folder and will be the name you’ve chosen for your object when exporting it but with “_entity" added to it. E.g. “name = "test_object_entity". ==Check object== To check that everything has worked as planned, launch the game and start a single player session as any nation. * Using the console (§), spawn your object with the command “spawnentity ” + “YOUR_ENTITY_NAME”, e.g. "test_object_entity". * The object will spawn at your cursor position. ==Tools & utilities== * [https://developer.nvidia.com/nvidia-texture-tools-adobe-photoshop NVIDIA Texture Tools for Adobe Photoshop] ==See also== *[[Modding]] *[https://en.wikipedia.org/wiki/Normal_mapping Normal mapping] Basic concepts of 3D mapping *[https://en.wikipedia.org/wiki/Bump_mapping Bump mapping] Bump and Specular mapping {{Template:ModdingNavbox}} [[Category:模组制作]]
摘要:
请注意您对群星百科的所有贡献都被认为是在知识共享署名-非商业性使用-相同方式共享下发布,请查看在
群星百科:版权
的细节。如果您不希望您的文字被任意修改和再散布,请不要提交。
您同时也要向我们保证您所提交的内容是您自己所作,或得自一个不受版权保护或相似自由的来源。
未经许可,请勿提交受版权保护的作品!
为防止机器编辑,请完成下方验证
取消
编辑帮助
(在新窗口中打开)
本页使用的模板:
Template:Clear
(
编辑
)
Template:ModdingNavbox
(
编辑
)
Template:Navbox
(
编辑
)
Template:Navboxgroup
(
编辑
)
Template:Version
(
编辑
)
×
登录
密码
记住登录
加入群星百科
忘记密码?
其他方式登录