Edude Posted February 13, 2017 Report Posted February 13, 2017 (edited) Hello everybody! Lately I've been making a desert map; to fulfill my idea I did some sand and canyon textures. To increase their realism and detail I tried to adding phong to simulate those glowing grains present in the sands. So I made a specular map for the grains and put in the alpha channel of my Bumpmap and added the Phong parameters to the VMT file. But whenever I try the whole texture gets shiny: Without Phong With Phong Specular Map As you can see, the whole texture is affected by phong and not just grains. How can I fix this? I believe that I confused myself in the VMT parameters but I'm not sure: "WorldVertexTransition" { "$baseTexture" "tunisia/tun_sand_01" "$bumpmap" "tunisia/tun_sand_01_normal" "$surfaceprop" "sand" "$baseTexture2" "tunisia/tun_sand_02" "$bumpmap2" "tunisia/tun_sand_02_normal" "$surfaceprop2" "sand" "$blendmodulatetexture" "nature/blend_texture_01" "$blendmasktransform" "center .5 .5 scale 1 1 rotate 0 translate 0 0" "$normalalphaenvmask" "1" "$envmap" "env_cubemap" "$phong" "1" "$phongExponentTexture" "252" } Thank you in advice! Edited February 13, 2017 by Edude Quote
tomm Posted February 14, 2017 Report Posted February 14, 2017 try to put your alpha in your base texture and add this parameter in your vmt Quote $BasemapAlphaPhongMask 1 hope this helps Quote
Edude Posted February 14, 2017 Author Report Posted February 14, 2017 I'm going to test this right now. Thank you for your reply. I also would like to ask, is there any quality loss when converting TGA images to VTF and vice versa? Quote
grapen Posted February 14, 2017 Report Posted February 14, 2017 (edited) 1 minute ago, Edude said: I'm going to test this right now. Thank you for your reply. I also would like to ask, is there any quality loss when converting TGA images to VTF and vice versa? DXT formats are lossy, yes. The reduced file size is definitely worth it though. A lossy compression can't be uncompressed to its former state. Edited February 14, 2017 by grapen Edude 1 Quote
Edude Posted February 14, 2017 Author Report Posted February 14, 2017 (edited) Hum I got it. I check here and my bumpmaps were in DXT. Now that I put them on BGR888 they have improved a lot. Thanks! Edited February 14, 2017 by Edude Quote
Edude Posted February 14, 2017 Author Report Posted February 14, 2017 18 hours ago, tomm said: try to put your alpha in your base texture and add this parameter in your vmt hope this helps I did some more testing following your instructions but nothing has changed. The textures remain entirely bright, ignoring the specular map. Here's the VMT Quote "WorldVertexTransition" { "$baseTexture" "tunisia/tun_sand_01" "$bumpmap" "tunisia/tun_sand_01_normal" "$surfaceprop" "sand" "$baseTexture2" "tunisia/tun_sand_02" "$bumpmap2" "tunisia/tun_sand_02_normal" "$surfaceprop2" "sand" "$blendmodulatetexture" "nature/blend_texture_01" "$blendmasktransform" "center .5 .5 scale 1 1 rotate 0 translate 0 0" "$envmap" "env_cubemap" "$phong" "1" "$BasemapAlphaPhongMask" "1" "$phongExponentTexture" "1" } Quote
tomm Posted February 15, 2017 Report Posted February 15, 2017 8 hours ago, Edude said: I did some more testing following your instructions but nothing has changed. The textures remain entirely bright, ignoring the specular map. That's strange, maybe it doesn't work with blend materials even though it should. I've only tried this on a regular VertexLitGeneric. Quote
spa Posted February 15, 2017 Report Posted February 15, 2017 Are you sure that the alpha is working correctly in the base textures ? It needs to be dxt5 or BGRA8888 (BGR888 doesn't have alpha) You can view the channels in vtf edit. Quote
WD Posted February 15, 2017 Report Posted February 15, 2017 (edited) I think $phong is only supported on VertexLitGeneric shader with HL2 ep2 engine. https://developer.valvesoftware.com/wiki/$phong You're currently trying to apply $phong to a WorldVertexTransition shader so that's why there's errors. Wiki says $phong would work for WorldVertexTransition on the CS:GO engine though. You could replace the ground with a model and it would shade correctly then. Edited February 15, 2017 by WD Quote
Edude Posted March 7, 2017 Author Report Posted March 7, 2017 On 15/02/2017 at 5:17 AM, tomm said: That's strange, maybe it doesn't work with blend materials even though it should. I've only tried this on a regular VertexLitGeneric. I thought the same thing, but I tested it as lightmapped generic and did not get good result. Sorry for the late reply On 15/02/2017 at 7:30 AM, spa said: Are you sure that the alpha is working correctly in the base textures ? It needs to be dxt5 or BGRA8888 (BGR888 doesn't have alpha) You can view the channels in vtf edit. It's very strange because I tried both alpha in the base texture and alpha in the bumpmap. I also tried both formats DXT5 for the base texture and BRGA8888 for bump. Probably Day of Infamy (game I'm mapping) do not support $phong. On 15/02/2017 at 7:56 AM, WD said: I think $phong is only supported on VertexLitGeneric shader with HL2 ep2 engine. https://developer.valvesoftware.com/wiki/$phong You're currently trying to apply $phong to a WorldVertexTransition shader so that's why there's errors. Wiki says $phong would work for WorldVertexTransition on the CS:GO engine though. You could replace the ground with a model and it would shade correctly then. Maybe I was mistaken a bit, I thought that Insurgency and Day of Infamy would be using the CSGO version of the source engine and with that $phong would works normally. Quote
Vaya Posted March 12, 2017 Report Posted March 12, 2017 phong isn't supported in doi. Edude and Lizard 2 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.