Shadows on textures

Avatar
Konke
161 Posts
Posted Mar 04, 2014
Cubes and spheres that I use in my map cast shadows on world brush faces but not on func_brush faces. Is it possible? I have a couple of arms that are going in the floor and are supposed to melt in with the rest of the floor. It's kind of weird when a cube cast a shadow and then suddenly the shadow is clipped. Thanks in advance!
Advertisement
Registered users don't see ads! Register now!
Avatar
User
630 Posts
Posted Mar 04, 2014
Replied 2 hours later
Maybe you get an better result with an env_projected_texture,
Avatar
Konke
161 Posts
Posted Mar 04, 2014
Replied 43 minutes later
Isn't that the real time lighting? Sorry, I'm still pretty new to Hammer. Isn't there another way that doesn't cost as much hardware resources?
Avatar
CJLERCH
50 Posts
Posted Mar 04, 2014
Replied 10 minutes later

Konke wrote:
Isn't that the real time lighting? Sorry, I'm still pretty new to Hammer. Isn't there another way that doesn't cost as much hardware resources?

An env_projected_texture is what is used in most maps. It is in no way the real-time lighting. It projects a texture (hence the name) on ALL faces in the form of a shadow, which will mimic how a real-life shadow would look.

Avatar
Konke
161 Posts
Posted Mar 05, 2014
Replied 12 hours later
That's what I meant with the real time lighting. Sorry, maybe I'm using the wrong terminology, but what's real time lighting then?

In any case, if I'm not mistaken: the env_projectedtexture is very expensive, no? That's why I've been trying not to use it in my map. Besides, I'd have to use two of the env_projectedtexture entities since I've got the shadow issue in two separate places, and as far as I'm concerned I'm only limited to one env_projected texture.

Please correct me if I'm wrong! If this is the case - is there another solution that is cheaper? And thanks for the answers so far!

Avatar
iWork925
1,080 Posts
Posted Mar 05, 2014
Replied 26 minutes later
I wouldn't consider env_projectedtexture 'expensive' as its only projecting a texture, not casting rays. You are limited to one, at a time; but you can have as many in a map as you want. Just activate and deactivate them as the player progresses through the map with triggers and the like.

This is the only approximation to 'real time' lighting in Source. It is used heavily in Valve's Portal 2 maps, so I wouldn't worry to much about the cost of it.

Avatar
FelixGriffin
2,680 Posts
Posted Mar 05, 2014
Replied 2 hours later
There's also light_dynamic, which I believe is even more expensive and doesn't use the projected-texture effect (it's effectively the precursor to projected-texture lighting).
Avatar
Konke
161 Posts
Posted Mar 05, 2014
Replied 2 hours later
I'm trying to get env_projectedtexture to work but it doesn't on my map. I've checked out TopHattWaffles tutorial and read on the developer pages, without success. I'm pretty sure I don't have another env_projectedtexture in my map since I haven't added one, not actively anyway. Is there anything else that can block the projected texture entity from working?
Avatar
Skotty
671 Posts
Posted Mar 05, 2014
Replied 2 hours later
A wrong texture name could be a problem.
Avatar
Konke
161 Posts
Posted Mar 05, 2014
Replied 19 minutes later

Skotty wrote:
A wrong texture name could be a problem.

What do you mean?

I've also tried to directly copy already working env_projectedtexture from another map to mine but it didn't work so there's something wrong with my map.

Avatar
iWork925
1,080 Posts
Posted Mar 05, 2014
Replied 1 hour later
Is it activated automatically or through IO? Could you post vmf?
Avatar
Konke
161 Posts
Posted Mar 06, 2014
Replied 18 hours later

iWork925 wrote:
Is it activated automatically or through IO? Could you post vmf?

I chose the Enabled flag and don't have any outputs/inputs on the entity.

What's the vmf you want me to post?

I do use cube dropper instances and elevator instances that I've seen from tutorials from TopHattWaffle. There are some different instances that were implemented to the map, one that even gave me fog when I just wanted the elevator. Could one of those instances have a env_projectedtexture entity that's on and needs to be turned off before I can use one of my own?

Avatar
User
630 Posts
Posted Mar 06, 2014
Replied 11 minutes later

Konke wrote:
iWork925 wrote:

Is it activated automatically or through IO? Could you post vmf?

I chose the Enabled flag and don't have any outputs/inputs on the entity.

*What's the vmf you want me to post? *

I do use cube dropper instances and elevator instances that I've seen from tutorials from TopHattWaffle. There are some different instances that were implemented to the map, one that even gave me fog when I just wanted the elevator. Could one of those instances have a env_projectedtexture entity that's on and needs to be turned off before I can use one of my own?

Maybe you should also read some tutorials on the VDC

The Elevator env_projected_texture turns your env_projected_texture off, set an input to yours, "TurnOn"

Avatar
Konke
161 Posts
Posted Mar 06, 2014
Replied 34 minutes later

TheTobbell wrote:
Konke wrote:

iWork925 wrote:

Is it activated automatically or through IO? Could you post vmf?

I chose the Enabled flag and don't have any outputs/inputs on the entity.

*What's the vmf you want me to post? *

I do use cube dropper instances and elevator instances that I've seen from tutorials from TopHattWaffle. There are some different instances that were implemented to the map, one that even gave me fog when I just wanted the elevator. Could one of those instances have a env_projectedtexture entity that's on and needs to be turned off before I can use one of my own?

Maybe you should also read some tutorials on the VDC

The Elevator env_projected_texture turns your env_projected_texture off, set an input to yours, "TurnOn"

Thanks, it worked when I triggered it!

I do read tutorials and watch youtube tutorials, but also seek help here on the forum when I don't find my own answers.

Avatar
Konke
161 Posts
Posted Mar 06, 2014
Replied 7 minutes later
And I have to add, the env_projectedtexture that I use is very expensive. I use it from my observation room with a farz of 1600 and fov of 85. Perhaps those are heavy numbers, but that's what I need since my map is pretty large.

When I changed to the projected texture my FPS droppen about 30, which I find is quite a lot.

Avatar
iWork925
1,080 Posts
Posted Mar 06, 2014
Replied 57 minutes later
Do you have a gfx card?
Avatar
Konke
161 Posts
Posted Mar 06, 2014
Replied 25 minutes later
I have a MacBook Pro from 2010 with GeForce 9600M 256MB, but I play in Windows 7. I have set my graphic options to max in Portal 2 and so far my map has had about 60 fps in average, depending on the location. Now it has about 30 fps.
Avatar
User
630 Posts
Posted Mar 06, 2014
Replied 23 minutes later

Konke wrote:
I have a MacBook Pro from 2010 with GeForce 9600M 256MB, but I play in Windows 7. I have set my graphic options to max in Portal 2 and so far my map has had about 60 fps in average, depending on the location. Now it has about 30 fps.

You're using max settings on a geforce 9600m with 256mb? okay

Also, you set the FarZ to 1600 Units? Do you really need these shadows at a distance of 1600 units? I would use at this distance some normal shadows, that's cheaper

Avatar
Konke
161 Posts
Posted Mar 06, 2014
Replied 26 minutes later
Well max settings for my card at least. And no Anti Aliasing. Why? Is my graphics card too weak for env_projectedtexture, and that it's not really that expensive for more modern computers?

Hmm, now there's a thought. I just thought the entire map should be with real time shadows.

Advertisement
Registered users don't see ads! Register now!
Avatar
User
630 Posts
Posted Mar 06, 2014
Replied 1 hour later

Konke wrote:
I just thought the entire map should be with real time shadows.

I think youre missunderstanding the env_projected_texture.
This entity doesnt make your map "realtime shadowed". It just projects a texture (in this case a complete white texture). And its just like a projector (in rl), who makes shadows (for example) if a person is in the shadow, so you see his shadow on the wall.

So you can use this entity somewhere in your map, that projects a texture, and then you have these nice shadows at this place. But its expensive, because the shadows are rendered in realtime. And with FarZ you can set, how far this texture should be rendered. (Decreasing FarZ -> Better performance).

And then there are some normal shadows (using normal lights etc.) who are static, and much cheaper.