1. Forums
  2. Discord
  3. About Mapcore
  4. Patreon Supporters
  • Login
  • Register
  • Search
This Thread
  • Everywhere
  • This Thread
  • This Forum
  • Articles
  • Pages
  • Forum
  • More Options
  1. Mapcore
  2. Discussions
  3. Level Design

CS:GO phong on world surfaces

  • Klems
  • April 29, 2015 at 1:44 AM
  • nicoreda
    • April 29, 2015 at 7:45 PM
    • #21

    Volvo, please now add tf2 lightmap on models ;(

  • Skybex
    • April 29, 2015 at 9:23 PM
    • #22

    A few bits I did testing it out. The wood also uses world reflections so it is definitely possible. And I added phong to the carpet to see if it would reflect other lights and it does not. Seems it will only reflect the environment light.


    http://i.imgur.com/X4KhzvF.jpg

    http://i.imgur.com/87CiHVN.jpg

    http://i.imgur.com/H7Azo6U.jpg


    Quote from nicoreda

    Volvo, please now add tf2 lightmap on models ;(


    Do you have any example pics of this? I tried to look it up when I heard about it but couldn't really find anything.

  • nicoreda
    • April 29, 2015 at 9:27 PM
    • #23
    Quote from Skybex

    A few bits I did testing it out. The wood also uses world reflections so it is definitely possible. And I added phong to the carpet to see if it would reflect other lights and it does not. Seems it will only reflect the environment light.


    http://i.imgur.com/X4KhzvF.jpg

    http://i.imgur.com/87CiHVN.jpg

    http://i.imgur.com/H7Azo6U.jpg


    Do you have any example pics of this? I tried to look it up when I heard about it but couldn't really find anything.

    Display More

    with -staticproplighting and moonlight tf2 prop

    http://images.akamai.steamusercontent.com/ugc/7141620562…77C2A8DA1EC156/

    here it look weird, but imagine if you can make modular content on source

  • tr0nic
    • April 30, 2015 at 5:46 AM
    • #24

    is it wrong if i don't think it looks good? It's mostly a huge bright spot with no details in all of your examples.


    EDIT: Well nvm looks awesome

  • mendaxyz
    • April 30, 2015 at 5:56 AM
    • #25

    Does anyone know of a way to have it work with blend textures, so that it only appears on one base texture and not the other?

  • Skybex
    • April 30, 2015 at 10:10 AM
    • #26
    Quote from tr0nic

    is it wrong if i don't think it looks good? It's mostly a huge bright spot with no details in all of your examples.


    Its kind of the idea, to achieve a look like this


    http://i.imgur.com/fcQ7sye.jpg

    http://i.imgur.com/uk2XYk9.png


    Depending on the angle viewed from, you see reflections of the sun.

  • Single
    • April 30, 2015 at 12:08 PM
    • #27

    There are some other parameters in the hr_train .vmfs that I haven't seen before as well, like $envmapanisotropy, $envmapanisotropyscale, and $envmaplightscale, perhaps more.


    Are these new as well? Does anyone know the parameter space? There doesn't appear to be any documentation on the web, but from my testing they definitely have an effect (can post screenshots tomorrow if need be).

  • nicoreda
    • April 30, 2015 at 12:21 PM
    • #28
    Quote from Single

    There are some other parameters in the hr_train .vmfs that I haven't seen before as well, like $envmapanisotropy, $envmapanisotropyscale, and $envmaplightscale, perhaps more.


    Are these new as well? Does anyone know the parameter space? There doesn't appear to be any documentation on the web, but from my testing they definitely have an effect (can post screenshots tomorrow if need be).


    Quote from nicoreda

    New test:

    1 bumpmap

    http://images.akamai.steamusercontent.com/ugc/7141620562…AE1BE7E947A309/

    2 Bumpmap

    http://images.akamai.steamusercontent.com/ugc/7141620562…9618099EA632BD/

    2 Bumpmap Lowered the second scale

    http://images.akamai.steamusercontent.com/ugc/7141620562…9EE1B8AE98537D/


    $envmapanisotropy 1

    scale 0

    http://images.akamai.steamusercontent.com/ugc/7141620562…7A44D5BE13F5C5/


    scale 1

    http://images.akamai.steamusercontent.com/ugc/7141620562…8C0A8DE69608EF/

    Display More

    lightscale is to change where envmap will do effect. I think it use hdr but I'm really not sure.http://images.akamai.steamusercontent.com/ugc/7141620562…709C3078356834/http://images.akamai.steamusercontent.com/ugc/7141620562…D002F85B9824F8/ By the way all my screens here http://steamcommunity.com/id/nicoreda2/screenshots/

  • Yanzl
    • April 30, 2015 at 3:08 PM
    • #29

    Updated Resort materials to include phong: http://i.imgur.com/ouhdMhk.jpghttp://i.imgur.com/a8ImBuv.jpghttp://i.imgur.com/9wnB9P3.jpghttp://i.imgur.com/Z7urlaY.jpghttp://i.imgur.com/YSDJpel.jpg Some stuff I've learned (don't know if it's been said before): It uses the same mask as envmap, so you can use it with both base alpha or normal alpha.It doesn't work on 4wayblend or water.Since it uses the same mask as envmap, you can only have one on a blend material.You don't need a normal map for it to work, unlike on vetexlitgeneric.$phongMaskContrastBrightness "[1 1]" - the first value is contrast and second one is brightness of the mask, but it's tricky to get results, values go very high, still need to play with this some more.$phongAmount "[1 1 1 1.0]" - this is in format [R G B power], but the last value also makes the whole material brighter instead of just the highlight, so it's best to leave it at 1. You control the specular intensity here with RGB float values, or with the brightness of the mask.And yeah, it only works with environment light, probably because it can use the dynamic shadows as a mask, instead of adding even more data to lightmaps. And bonus:http://i.imgur.com/pbCQ1sa.jpg

  • Vaya
    • April 30, 2015 at 3:18 PM
    • #30

    Any noticeable hit to performance? Looks awesome but I don't know if I'd use it if it eats frames.

  • Skybex
    • April 30, 2015 at 3:25 PM
    • #31
    Quote from Yanzl

    And bonus:

    http://i.imgur.com/pbCQ1sa.jpg


    I had the same idea for the water on cruise when I saw the phong masks. Does the normal map scroll or is it static?

  • Yanzl
    • April 30, 2015 at 3:48 PM
    • #32

    Well the water is not actually the new phong. It's the normal water shader with a custom cubemap.

  • nicoreda
    • April 30, 2015 at 4:42 PM
    • #33
    Quote from Yanzl

    Well the water is not actually the new phong. It's the normal water shader with a custom cubemap.

    Oh! Can you tell me how do you make your custom cubemap ?

  • Yanzl
    • April 30, 2015 at 8:02 PM
    • #34
    Quote from nicoreda

    Oh! Can you tell me how do you make your custom cubemap ?

    I drew the sun on a spherical map of the sky and made the background black in Photoshop like this: http://i.imgur.com/jCvEfS8.pngThen I used HDRshop to convert it to hdr and cubemap format, added it on top of the skybox in Photoshop and changed the exposure +4. The images should be in this arrangement http://i.imgur.com/pa7lnGk.jpg  except mirrored vertical.

    I saved the image as .pfm (it has to end with _hdr) and used vtex to convert it to cubemap with

    cubemap 1

    pfm 1

    pfmscale 1

    nocompress 1

    Then you just add in in the vmt as $envmap "cubemaps/file_hdr"

  • TheGuma
    • April 30, 2015 at 9:01 PM
    • #35
    Quote from Yanzl

    Oh! Can you tell me how do you make your custom cubemap ?


    I drew the sun on a spherical map of the sky and made the background black in Photoshop like this: http://i.imgur.com/jCvEfS8.pngThen I used HDRshop to convert it to hdr and cubemap format, added it on top of the skybox in Photoshop and changed the exposure +4. The images should be in this arrangement http://i.imgur.com/pa7lnGk.jpg  except mirrored vertical.

    I saved the image as .pfm (it has to end with _hdr) and used vtex to convert it to cubemap with

    cubemap 1

    pfm 1

    pfmscale 1

    nocompress 1

    Then you just add in in the vmt as $envmap "cubemaps/file_hdr"


    Wow, thank you! I was looking for a way to do that.

    I guess the reflections would look better if I would make them blurry manually for every cubemap

    (I'd rather have blur than pixelated cubemaps).

    Is it possible to increase the resolution of a cubemap?

  • nicoreda
    • April 30, 2015 at 10:08 PM
    • #36
    Quote from TheGuma

    Oh! Can you tell me how do you make your custom cubemap ?


    I drew the sun on a spherical map of the sky and made the background black in Photoshop like this: http://i.imgur.com/jCvEfS8.pngThen I used HDRshop to convert it to hdr and cubemap format, added it on top of the skybox in Photoshop and changed the exposure +4. The images should be in this arrangement http://i.imgur.com/pa7lnGk.jpg  except mirrored vertical.

    I saved the image as .pfm (it has to end with _hdr) and used vtex to convert it to cubemap with

    cubemap 1

    pfm 1

    pfmscale 1

    nocompress 1

    Then you just add in in the vmt as $envmap "cubemaps/file_hdr"


    Wow, thank you! I was looking for a way to do that.

    I guess the reflections would look better if I would make them blurry manually for every cubemap

    (I'd rather have blur than pixelated cubemaps).

    Is it possible to increase the resolution of a cubemap?


    thanks yanzl.

    http://i.imgur.com/I6FBgDD.jpg

    512x512 per image here, made using cfg that "screenshot" and "setangle" 6 times

    then you can use amd cubemapgen

  • Mamorex
    • May 1, 2015 at 3:31 AM
    • #37

    "$envmap" "env_cubemap" isn't working with phong shading and "LightmappedGeneric" shader. But I think that it works properly with "WorldVertexTransition".


    "WorldVertexTransition" { "$basetexture" "metal/hr_metal/metal_grated_d""$bumpmap" "metal/hr_metal/metal_grated_d_normals" "$envmap" "env_cubemap""$envmaptint" "[0.3 0.3 0.3]" "$phong" "1""$phongexponent" "1500""$phongboost" "30""$phongfresnelranges" "[0.02 0.02 0.02]""$phongMaskContrastBrightness" "[.05 0.08]""$phongAmount" "[4 4 4 1.0]" "$surfaceprop" "metal" }

    Maybe we have a more issues with "WorldVertexTransition" option. I have one - I can't change .vmt after compiling my map, with "mat_reloadallmaterials".


    I wonder if we made a good blend material. I have an issues with two textures. And I can't waiting for complete parallax mapping. "Parallaxtest" shader...

  • Single
    • May 1, 2015 at 5:00 AM
    • #38
    Quote from Mamorex

    "$envmap" "env_cubemap" isn't working with phong shading and "LightmappedGeneric" shader.


    I have both $phong and $envmap enabled on my texture, and both are visible. The texture is LightmappedGeneric. See image below.


    [Blocked Image: http://i.imgur.com/0FVYbzZ.jpg]


    The bright spot in the middle is from the $phong 1, from the sun. The envmap is from a cubemap placed nearby. The lighter colour definitely isn't from the albedo, because the step texture on the right has neither $phong or $envmap, and is lit differently. It's $basetexture is basically the same as the main texture. Here is the .vmf:

    Code
    LightmappedGeneric
    {
    	$basetexture "neutron/floors/concrete_02"
    	$bumpmap "neutron/floors/concrete_02_bump_envmask"
    	$surfaceprop Concrete
    
    
    	//$color "[0.8 0.8 0.8]"
    
    
    	$normalmapalphaenvmapmask 1
    	$envmap env_cubemap
    	//$envmaptint "[0.05 0.05 0.05]"
    	$envmapsaturation 0.5
    
    
    	$phong 1
         	$phongexponent 400
    	$phongMaskContrastBrightness "[0 0.5]"
            $phongAmount "[1 1 1 1.0]"
    
    
    	%keywords neutron
    }
    Display More

    The $envmaptint is commented out to highlight the cubemapping.


    Quote from Mamorex

    "WorldVertexTransition" { [...]


    "$phongboost" "30""$phongfresnelranges" "[0.02 0.02 0.02]"

    [...]

    }


    At least on LightmappedGeneric, these parameters don't have a visible effect.

  • Skybex
    • May 1, 2015 at 9:51 AM
    • #39

    Just thought I would add that you can edit the $phongAmount to have the phong match the colour of your material


    "$phongAmount" "[3 3 2 1.0]"

    http://i.imgur.com/AolABOt.jpg


    "$phongAmount" "[5 0 5 1.0]"

    http://i.imgur.com/xxN8dUu.jpg

  • Mamorex
    • May 1, 2015 at 2:11 PM
    • #40

    I had broken "$bumpmap" material. Nice, it works with LightmappedGeneric too. With "$phongAmount" you can change phong shading colour and contrast of it. "$phongAmount" "[1.0 1.0 1.0 1.0]" - looks good with polished floors"$phongAmount" "[0.3 0.3 0.3 1.0]" - looks good with concrete materials etc.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!

Register Yourself Login
Discord

The Mapcore Discord is our lively IRC channel of the 2000s reborn. Chat about level design, gaming, and more.

Latest Posts

  1. Why is data science needed

    shilpa
    July 17, 2026 at 12:39 PM
  2. Any of the old guard still around? D:

    Warby
    July 12, 2026 at 8:23 PM
  3. About our archived forums

    Thrik
    June 30, 2026 at 2:12 PM
  4. Mapcore Discord

    mason_fan123
    June 24, 2026 at 8:52 PM
  5. [CS2] Valley

    Serialmapper
    June 22, 2026 at 11:56 AM
  6. Free Music / SFX Resource - Over 2500 Tracks

    Eric Matyas
    June 18, 2026 at 12:32 PM
  7. Pango [WIP]

    Elowen
    June 11, 2026 at 10:13 AM
  8. [CS2] Dvina

    Jeremy Rivera
    June 11, 2026 at 10:03 AM
  9. Bridges 2.0 by NEXSIDE, MAP SHOWCASE. ( Steam Workshop )

    MrTrane18
    June 1, 2026 at 7:46 PM
  10. Classic Maps Reborn For CS2

    SillySpaceCat
    May 31, 2026 at 10:33 PM

Users Viewing This Thread

  • 1 Guest
  1. Privacy Policy
  2. Contact
Powered by WoltLab Suite™