MIXAZZZ Posted December 12, 2015 Share Posted December 12, 2015 (edited) Hi guys. Today I'll tell you how to use a home-made shader written Chipsman, to mix 6 layers of texture to 2 masks. ----------------------------------------------------------- First you need to: take the file preload.list from the archive and put it in the directory <Grand Theft Auto IV>\common\shaders, replace confirm (and make backup before) Then, in each of its subfolders put the file rdr2like_terrain.fxc. At this stage, all the components of the shader set in GTA IV. -------------- Next we need to get into the directory with installed OpenIV Sample: C:\Users\%USERNAME%\AppData\Local\New Technology Studio\Apps\OpenIV\Games\IV\openFormats Open into notepad ShaderManager.xml, and paste to end, before </ShaderManager> next text. </shader> <shader key="rdr2like_terrain.sps"> <index>86</index> <name>rdr2like_terrain</name> <vertexFormat>0x4059</vertexFormat> <drawBucket>0</drawBucket> <effectSize>440</effectSize> <skinned>False</skinned> <params> <item type="spVector4" name="luminanceconstants" custom="False">0.21250000;0.71540000;0.07210000;0.00000000</item> <item type="spVector4" name="materialdiffuse" custom="False">1.00000000;1.00000000;1.00000000;1.00000000</item> <item type="spTexture" name="TerrainDiffuseSampler1" custom="True"/> <item type="spTexture" name="TerrainDiffuseSampler2" custom="True"/> <item type="spTexture" name="TerrainDiffuseSampler3" custom="True"/> <item type="spTexture" name="TerrainDiffuseSampler4" custom="True"/> <item type="spTexture" name="TerrainDiffuseSampler5" custom="True"/> <item type="spTexture" name="TerrainDiffuseSampler6" custom="True"/> <item type="spTexture" name="TerrainBlendMap1" custom="True"/> <item type="spTexture" name="TerrainBlendMap2" custom="True"/> <item type="spTexture" name="TerrainNormalSampler1" custom="True"/> <item type="spTexture" name="TerrainNormalSampler2" custom="True"/> <item type="spTexture" name="TerrainNormalSampler3" custom="True"/> <item type="spTexture" name="TerrainNormalSampler4" custom="True"/> <item type="spTexture" name="TerrainNormalSampler5" custom="True"/> <item type="spTexture" name="TerrainNormalSampler6" custom="True"/> <item type="spVector4" name="MegaTileRepetitions" custom="True"/> <item type="spVector4" name="MegaTileOffset" custom="True"/> <item type="spVector4" name="BlendMapScale1" custom="True"/> <item type="spVector4" name="BlendMapOffset1" custom="True"/> <item type="spVector4" name="BlendMapScale2" custom="True"/> <item type="spVector4" name="BlendMapOffset2" custom="True"/> <item type="spVector4" name="Bumpiness_Terrain123" custom="True"/> <item type="spVector4" name="Bumpiness_Terrain456" custom="True"/> </params> </shader>These data can also be copied from the file ShaderManager.xml , which is in the archive. But I strongly not advise you to copy the file because it is an older version. Shader params: TerrainDiffuseSampler1 - diffuse texture of layer 1 TerrainDiffuseSampler2 - diffuse texture of layer 2 TerrainDiffuseSampler3 - diffuse texture of layer 3 TerrainDiffuseSampler4 - diffuse texture of layer 4 TerrainDiffuseSampler5 - diffuse texture of layer 5 TerrainDiffuseSampler6 - diffuse texture of layer 6 TerrainBlendMap1 - mask for layer 1-3 TerrainBlendMap2 - mask for layer 4-6 TerrainNormalSampler1 - normal map texture of layer 1 TerrainNormalSampler2 - normal map texture of layer 2 TerrainNormalSampler3 - normal map texture of layer 3 TerrainNormalSampler4 - normal map texture of layer 4 TerrainNormalSampler5 - normal map texture of layer 5 TerrainNormalSampler6 - normal map texture of layer 6 MegaTileRepetitions - UV Tile MegaTileOffset - UV Tile Offset BlendMapScale1 - The thickness of the transition between the layers blend, for layer 1-3 BlendMapOffset1 - ? BlendMapScale2 - The thickness of the transition between the layers blend, for layer 5-6 BlendMapOffset2 - ? Bumpiness_Terrain123 - bump power for layer 1-3 Bumpiness_Terrain456 - bump power for layer 4-6 Since no GIMS no OFIO does not support this shader to export from 3dsmax, then use for export models the shader gta_default. Then, change the text in Notepad gta_default on new shader. Sample data for my test model: Shaders 1 { rdr2like_terrain.sps LOW_l1_dno LOW_l2_skala1 LOW_l3_skala2 LOW_l4_grass LOW_l5_gravel LOW_l6_grass2 custom_mask1 custom_mask2 LOW_l1_dno_n LOW_l2_skala1_n LOW_l3_skala2_n LOW_l4_grass_n LOW_l5_gravel_n LOW_l6_grass2_n 80.0;80.0;0.0;0.0 0.0;0.0;0.0;0.0 1.0;1.0;0.0;0.0 0.0;0.0;0.0;0.0 1.0;1.0;0.0;0.0 0.0;0.0;0.0;0.0 0.5;0.5;0.5;0.0 0.5;0.5;0.5;0.0 }Now that your OpenIV can read this shader, simply import .ODR your file and use it as a normal model of the map.-------------- Now I will tell you about the masks and the principle of mixing. First, consider the original texture of the terrain RDR. The top row - the texture of the order. Bottom row - normal map for them. And of course the two masks that define the mix. (3 mask in one picture for layers 1-3, and 3 mask in the second image for the layers 4-6) Mask layers are arranged in this order. МАСКА 1:#R слой 1#G слой 2#B слой 3МАСКА 2:#R слой 1#G слой 2#B слой 3Open the Photoshop mask and watch the channel data to understand what works. Now back to my tests, I had a total of 4 layers, so my textures look so. My params for test model. Shaders 1 { rdr2like_terrain.sps LOW_l1_dno LOW_l2_skala1 LOW_l3_skala2 LOW_l4_grass LOW_l5_gravel LOW_l6_grass2 custom_mask1 custom_mask2 LOW_l1_dno_n LOW_l2_skala1_n LOW_l3_skala2_n LOW_l4_grass_n LOW_l5_gravel_n LOW_l6_grass2_n 80.0;80.0;0.0;0.0 0.0;0.0;0.0;0.0 1.0;1.0;0.0;0.0 0.0;0.0;0.0;0.0 1.0;1.0;0.0;0.0 0.0;0.0;0.0;0.0 0.5;0.5;0.5;0.0 0.5;0.5;0.5;0.0 }It was the first test, and he did not look particularly impressionable. http://www.youtube.com/watch?v=16QO-zfjyBQ Later I made a more interesting map location with this shader, which event used in one version of fashion Criminal Russia Rage. http://www.youtube.com/watch?v=eNAgv6tHp3o and this ----------------- EPILOGUE ----------------- I hope you use this technology for creating amazing project for GTA IV. Edited December 13, 2015 by MIXAZZZ T-ru, TWIST_OF_HATE, Frank.s and 1 other 4 CPU: i7 4790\ MEM: 32GB ram \ GPU: NVIDIA GeForce RTX 2060 SUPER 8GB Vram \ OS: Win7 x64 Link to comment Share on other sites More sharing options...
reditec Posted December 12, 2015 Share Posted December 12, 2015 OMG OMG OMG THANKS! Link to comment Share on other sites More sharing options...
DamnedDev Posted December 12, 2015 Share Posted December 12, 2015 The RDR port will use this that's for sure. And might work on V too if the shader gets loaded. Jestic and Sweet Bellic 2 Link to comment Share on other sites More sharing options...
CropDusteR Posted September 10, 2016 Share Posted September 10, 2016 Can you update link, please? Link to comment Share on other sites More sharing options...
TWIST_OF_HATE Posted March 18, 2020 Share Posted March 18, 2020 Link renewal: https://drive.google.com/open?id=1dQj6ums75BrZTrjb2jQ5SAJBCLSyHP8i Igor Bogdanoff, D T, T-ru and 1 other 3 1 Link to comment Share on other sites More sharing options...