Shadows of a grate

Avatar
canari
70 Posts
Posted Jun 19, 2012
Hello everyone,

Here is my problem :
I have a room, with a light, and a vertical grate in the center of the room.
The grate is made of a func_brush not solid with a grate texture, and is surrounded by a func_clip_vphysics, and a brush textured with playerclip. I made it like this because i wanted :
- to be able to shoot portals through the grate
- a light bridge to pass through the grate
- the player and the cubes to be stopped by the grate
So far, everything works perfect. But now i would like to get realistic shadows of the grate on the wall.
I tried with a simple light, with a hard light, i tried adding a env_projectedtexture...but none worked.
I wonder if we can get shadows of a "texture", or if it only makes a shadow of the brush. But i've seen videos like this one : is it a grate texture or a specific grate model ?

Does anyone have the solution ?
Thanks

Advertisement
Registered users don’t see ads! Register now!
Avatar
Habzs
225 Posts
Posted Jun 19, 2012
Replied 12 minutes later
What grate texture are you using? It worked fine for me using a env_projectedtexture.
Avatar
RubyCarbuncIe
303 Posts
Posted Jun 19, 2012
Replied 3 minutes later
Did you disable the shadows? Do that and add an env_projectedtexture and it should work fine. It does for me anyway. It may also be what Habzs said and it may just be the texture your using.
Avatar
josepezdj
2,386 Posts
Posted Jun 19, 2012
Replied 21 minutes later
I'd suggest to lower the lightmap scale value with the Face Edit Sheet (use for instance a "4" value). If you check out this on the VDC, you'll see how different values can affect shadowing. :thumbup:

Ofc, use a env_proj_tex, make sure you set to YES the "Enable Shadows", and try a light_spot that it's more a "complete" entity than a normal light.

I don't know what grate texture you're using but if you are making the squares big enough (bigger scale than 0.25 on X and Y axis), you can also complement the frames by blocklight textured brushes that will help you to project shadows...

Avatar
canari
70 Posts
Posted Jun 19, 2012
Replied 1 hour later
First, thanks for help !
I can't solve it, and here are the details :

portal2 2012-06-19 17-37-45-76.jpg
  • the grate texture is metal/backstage_grate_002b
  • here are the settings for the func_brush with the grate texture :
Sans titre.jpg
  • here are the settings for the env_projectedtexture :
Sans titre2.jpg
  • i tried changing the lightmap scale but it didn't work (which brush face should have a lower lightmap scale ? the grate's, or the wall ? i tried for both...)
  • i tried copying my grate and my env_projectedtexture in another map (a single room made for tests) and it works there !!! :
portal2 2012-06-19 17-38-17-07.jpg

What's wrong with all that ??

EDIT : the env_projectedtexture is facing the grate in both maps (the problem is not caused by Pitch Yaw Roll...)

EDIT 2 : See Nacimota's post (next page) for his explanations about static and dynamic lighting concepts.

Images 4
Post image 1
Post image 2
Post image 3
Post image 4
Avatar
josepezdj
2,386 Posts
Posted Jun 19, 2012
Replied 1 hour later
Canari, try to set a higher Brightness scale value, for example 4 or 5, not 0.25.

Also, as I told you earlier, lower the lightmap scale of the walls texture with the Face Edit Sheet.

Anyway, if the walls that you're trying to project shadows onto are those black walls, I'm afraid you'll have problems anyway, don't you think? try using lighter wall colour textures. :wink:

Avatar
canari
70 Posts
Posted Jun 19, 2012
Replied 27 minutes later

josepezdj wrote:
Canari, try to set a higher Brightness scale value, for example 4 or 5, not 0.25.

Also, as I told you earlier, lower the lightmap scale of the walls texture with the Face Edit Sheet.

Anyway, if the walls that you're trying to project shadows onto are those black walls, I'm afraid you'll have problems anyway, don't you think? try using lighter wall colour textures. :wink:

Yes, i tried with different brightness scales (and 0.25 was the last one i tried).
I've just tried what you say :
- a brightness scale of 5
- a lower lightmap scale (it was 16 and i set it to 4)

Sans titre3.jpg - with lighter wall colour textures And the result is : portal2 2012-06-19 19-26-20-66.jpg Still don't have any shadow :cry: Do you have an idea ? :notworthy: EDIT : See Nacimota's post (next page) for his explanations about static and dynamic lighting concepts.
Images 2
Post image 1
Post image 2
Avatar
Habzs
225 Posts
Posted Jun 19, 2012
Replied 12 minutes later

canari wrote:
img

Try changing the 'Disable shadows' option to No. Just throwing ideas out there.

Avatar
FelixGriffin
2,680 Posts
Posted Jun 19, 2012
Replied 46 minutes later
And "Shadows" at the bottom to "Yes".
Avatar
josepezdj
2,386 Posts
Posted Jun 19, 2012
Replied 10 minutes later

FelixGriffin wrote:
And "Shadows" at the bottom to "Yes".

Exactly! I missed that!

Avatar
canari
70 Posts
Posted Jun 19, 2012
Replied 10 minutes later
Ok, same results after trying :
- disable shadows=Yes + Shadows=Yes
- disable shadows=No + Shadows=No
- disable shadows=Yes + Shadows=No
- disable shadows=No + Shadows=Yes

...

Avatar
josepezdj
2,386 Posts
Posted Jun 19, 2012
Replied 28 minutes later
Hmm... the issue then should be into the compile... what kind of compile are you doing? default? have you checked if you are not compiling lighting? (check in expert mode if $light_exe command is checked). Or maybe because it's matt_fullbright set to a value different than 1... or have you recently run any console command (or some script or someone's complex or scripted map) related to shadows (r_shadows / r_pr_shadows)? just in cases, try in the console: r_pr_shadows 1 (sv_cheats enabled)...
Avatar
canari
70 Posts
Posted Jun 19, 2012
Replied 37 minutes later

josepezdj wrote:
Hmm... the issue then should be into the compile...

:thumbup: :notworthy: :thumbup:
Well done ! That's it ! The expert mode !
I was compiling in the normal mode with HDR checked, but not in expert mode.
I should have tried this before posting ! but the fact that it worked in the second map (as shown on the screenshot of my other post) which was also compiled in the normal mode, was misleading !!!

It works with the func_brush with a grate texture, and disable shadows=No + Shadows=Yes

I will edit this post with a screenshot soon...

Thank you very much josepezdj

EDIT : See Nacimota's post (next page) for his explanations about static and dynamic lighting concepts.

Avatar
josepezdj
2,386 Posts
Posted Jun 19, 2012
Replied 30 minutes later
I'm glad to hear that, because I was running out of ideas and about to suggest you to burn you computer and watch the fire shadows on the wall of you bedroom! :lol: Looking forward to see a picture when the room is finished! :thumbup:
Avatar
Brainstone
401 Posts
Posted Jun 19, 2012
Replied 17 minutes later
I suppose your problem was that -textureshadows was not run in normal compile mode.
Avatar
ChickenMobile
2,460 Posts
Posted Jun 19, 2012
Replied 6 hours later
That video you posted, they actually used brushes and not a grate texture, hence why they had sharp shadows.

But good to know that you can actually get sharp shadows from textures that include alpha using an expert compile. :thumbup:

Avatar
Skotty
671 Posts
Posted Jun 20, 2012
Replied 14 hours later

Brainstone wrote:
I suppose your problem was that -textureshadows was not run in normal compile mode.

This is working on models only! https://developer.valvesoftware.com/wiki/VRAD#Effects

Avatar
Kaleido
272 Posts
Posted Jun 20, 2012
Replied 9 hours later

josepezdj wrote:
I'm glad to hear that, because I was running out of ideas and about to suggest you to burn you computer and watch the fire shadows on the wall of you bedroom! :lol: Looking forward to see a picture when the room is finished! :thumbup:

ahahahahaha

:hi5:

Avatar
canari
70 Posts
Posted Jun 21, 2012
Replied 17 hours later

josepezdj wrote:
I'm glad to hear that, because I was running out of ideas and about to suggest you to burn you computer and watch the fire shadows on the wall of you bedroom! :lol: Looking forward to see a picture when the room is finished! :thumbup:

:lol:

Here it is :

portal2 2012-06-21 22-25-05-17.jpg Much better like this ! And now if you still haven't tried yet, pleeeease take 1 hour to test [my map named Companion](http://forums.thinking.withportals.com/downloads.php?view=detail&df_id=1926), fifth version. I'll be glad to see a video of your blindrun, and i would love to get other feedbacks (and rates !) The grate and its shadow are in the map :thumbup:
Images 1
Post image 1
Advertisement
Registered users don’t see ads! Register now!
Avatar
josepezdj
2,386 Posts
Posted Jun 22, 2012
Replied 12 hours later
That looks grate! lol

I'll give it a look this evening to your map. :thumbup: