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

[Source] What am I doing wrong with my tree?

  • grapen
  • January 12, 2017 at 11:18 PM
  • grapen
    • January 12, 2017 at 11:18 PM
    • #1

    Here's a shot of my WIP tree:

    The content cannot be displayed because it is no longer available.

    From the left:

    Shadows ON and ignore surface normals OFF Shadows ON and ignore surface normals ON Shadows OFF and ignore surface normals OFF

    I've edited my surface normals (radial in blender), so the tree on the left is looking more realistic in terms of lighting. However as you can see, the shadows are just too thick. The tree trunk is literally black. The same shadow problem is happening on the ground, where it looks to be casting double shadows?! One that outlines the transparent branches/leaves and one large blurry mess that follows the edges. If I disable shadows, the blurry messy shadow disappears (see tree on the right), but that also makes the tree look flat. The interesting thing is Valve's trees are NOT doing this despite shadows turned ON.

    I've tried making sure I do exactly as Valve, but I'm obviously missing something critical. Here are the steps I've taken:

    • Make sure my VMT use exactly the same parameters as Valve
      • $alphatest "1" $alphatestreference "0.3" $nocull "1" (and some tree sway)
    • Make sure my prop_statics have exactly the same settings
    • Make sure I have forcetextureshadows on my model in my custom .rad (and that the path is correct)
    • Check the console so that the .rad file gets read (it does)

    Any pointers? Is it the surface normals that are wrong?

    EDIT: Ok I managed to reduce the shadows on the actual tree by reducing the normal editing mix effect, however the blurry ground shadow remains a problem.

  • wylde
    • January 12, 2017 at 11:50 PM
    • #2

    I don't have an answer but I am interested in the solution. A map I am working on has many trees and plants and I can't seem to figure out the best model settings. What're the best practices?

    Do I disable per-vertex lighting? Disable self-shadowing? Both?

  • Yanzl
    • January 13, 2017 at 1:43 AM
    • #3

    Make sure you compile with -textureshadows and add your model to lights.rad with forcetextureshadow.

  • grapen
    • January 13, 2017 at 6:16 AM
    • #4
    Quote from Yanzl

    4 hours ago, Yanzl said: Make sure you compile with -textureshadows and add your model to lights.rad with forcetextureshadow.

    Yep done that to no effect :(

    Quote from wylde

    6 hours ago, wylde said: I don't have an answer but I am interested in the solution. A map I am working on has many trees and plants and I can't seem to figure out the best model settings. What're the best practices?

    Do I disable per-vertex lighting? Disable self-shadowing? Both?

    Valve foliage typically requires "Ignore Surface Normals" set to YES since they don't have custom normals on the model itself. The rest of the settings can be default for the most part.

  • grapen
    • January 13, 2017 at 7:06 AM
    • #5

    In my test map I have my tree and Valve's urban tree. In the console shot below we can see that Valve's alpha is being loaded, but not mine?

    The content cannot be displayed because it is no longer available.

    My .rad command is:

    forcetextureshadow de_scepter\scep_tree01.mdl

    I might also add that the other lines in scepter.rad is being read and working as intended, it's just this line that doesn't seem to work. I've also tried backslash instead of slash for the path but that didn't matter at all.

  • Yanzl
    • January 13, 2017 at 3:36 PM
    • #6

    What's your tree model path, vmt path and vtf path? Seems like everything should be working, so there's either a typo somewhere or something very weird going on.

  • grapen
    • January 13, 2017 at 3:49 PM
    • #7
    Quote from Yanzl

    44 minutes ago, Yanzl said: What's your tree model path, vmt path and vtf path? Seems like everything should be working, so there's either a typo somewhere or something very weird going on.

    Dirs:

    ...\csgo\models\de_scepter\scep_tree01.mdl ...\csgo\materials\models\de_scepter\scep_tree01branch.vtf ...\csgo\materials\models\de_scepter\scep_tree01branch.vmt

    .rad file:

    forcetextureshadow de_scepter\scep_tree01.mdl de_scepter\scep_windowglass01b 252 239 209 100 de_scepter\scep_windowglass01c 143 183 230 100 noshadow models\de_scepter\scep_grate01

    Line 2, 3 and 4 are working just fine. So the rad file is being read, but the compiler refuse to ray-trace the alpha. The vtf is 1024, DXT5, eight bit alpha, so no funny stuff there I don't think?

    I found this thread with the same problem, but it didn't lead anywhere: https://tf2maps.net/threads/textur…orrectly.26297/

    Another thread that lead nowhere: https://tf2maps.net/threads/proble…eshadows.24736/

    Checked the poly count to make sure it wouldn't be that, but my tree is cheaper than Valve's urban tree..

    Made a new model featuring just ONE branch, problem persist, definitely not polycount related, but could still be model related. Or material. Either of those probably.

  • Yanzl
    • January 13, 2017 at 5:06 PM
    • #8

    You can try moving the forcetextureshadow line to the end of the file or move it to the end of default lights.rad.

    Put just this in your vmt:

    VertexLitGeneric

    {

    $basetexture "models\de_scepter\scep_tree01branch"


    $alphatest 1

    $nocull 1

    }

  • grapen
    • January 13, 2017 at 5:58 PM
    • #9

    Neither worked unfortunately, I'm at a total loss.

  • Yanzl
    • January 13, 2017 at 7:28 PM
    • #10

    Can you send me the files, I can try looking at it a bit later.

  • grapen
    • January 14, 2017 at 12:46 PM
    • #11

    Issue has been resolved.

    @Yanzl recompiled my model in Max/Maya(?) and got it to work. I had a look at his qc and found that he was using smd instead of dmx. I've been using dmx all this time thinking it was the newer, superior format. Tried to compile again using smd, still didn't work. Fak.

    Had a look at my rad file again and changed the backslash to a slash in my material path. It worked. What the fuck. I'm using backslashes in all my materials and qc's and that is working fine. Not in rad files apparently.

    So yeah, smd and slashes are required for forcetextureshadow. If any mod wants to rename the title of this thead to make it more Google-friendly, go ahead. I'd suggest [SOLVED] forcetextureshadow not working on custom prop, or something to that extent. None of the other results have an actual solution.

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. About our archived forums

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

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

    Serialmapper
    June 22, 2026 at 11:56 AM
  4. Any of the old guard still around? D:

    Thrik
    June 20, 2026 at 10:11 PM
  5. Free Music / SFX Resource - Over 2500 Tracks

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

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

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

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

    SillySpaceCat
    May 31, 2026 at 10:33 PM
  10. [CS2] Dvina

    Pulbusha
    May 29, 2026 at 5:54 PM
  1. Privacy Policy
  2. Contact
Powered by WoltLab Suite™