What is the best method of adding tree shadows?

If you're looking for mapping help or you reckon you're a mapping guru, post your questions / solutions here

Moderator: Moderators

Post Reply
Stevo
Corporal
Posts: 38
Joined: Tue Dec 16, 2003 8:31 pm
Location: Florida, USA
Contact:

What is the best method of adding tree shadows?

Post by Stevo »

I can't find the answer. I've found a few single-tree masked textures that cast some nice tree shadows for the tree entities, but grenades bounce off of them and that is extremely odd. What is the best method for adding shadows to trees? Is it possible for a fence texture to cast a shadow and yet be non-solid? I want a tree shadow that doesn't hinder grenade lobbing, please!
Thanks.
K.I.A.
Corporal
Posts: 27
Joined: Thu Feb 26, 2004 11:19 pm

Post by K.I.A. »

I dont know much about, but did u try making a brush out of 'light clip' under 'common' textures. Just an idea.
Stevo
Corporal
Posts: 38
Joined: Tue Dec 16, 2003 8:31 pm
Location: Florida, USA
Contact:

Hmm

Post by Stevo »

Well I couldn't find light_clip but I found a texture just called light. It affected lighting, of course, but it's also visible and solid. Arg.
K.I.A.
Corporal
Posts: 27
Joined: Thu Feb 26, 2004 11:19 pm

Post by K.I.A. »

another idea... did u try sunblock? i know its not solid, i just dont know if it casts a shadow.
User avatar
wacko
Field Marshal
Posts: 2085
Joined: Fri Jul 05, 2002 8:42 pm
Location: Germany

Post by wacko »

common/caulkshadow is invisible and is casting shadows. but it's solid...
User avatar
hogleg
General
Posts: 1577
Joined: Tue Sep 09, 2003 5:23 pm
Location: Down South Hillbilly Country

Post by hogleg »

Its real easy man, Just make a circle brush like a plate.
Apply shadow clip to it!

Put it in the middle of your tree, like 3/4 towards the top.

Poof you will have your shadow from your tree. :D

O, my bad, I didn't know shadow clip was solid, can you check nonsolid?
or put regulare clip on the sides?

or just raise it so high that nothing will hit it. But you'll still get your shadow.
"all the governments in the world are corrupt and in the hands of the Illuminati"
Stevo
Corporal
Posts: 38
Joined: Tue Dec 16, 2003 8:31 pm
Location: Florida, USA
Contact:

A Solution!

Post by Stevo »

Awesome. Thanks for all the help.

Here's what I've come up with:

My goal was to make a shadow that looks like a tree, but is also non solid and invisible. I couldn't find any textures like this in MOHAA so I made my own using one of the tree pictures.

Code: Select all

textures/steve/treeshadowyeah
{
	qer_editorimage textures/models/natural/tree4_3.tga
	surfaceparm nodraw
	surfaceparm nonsolid
	surfaceparm castshadow
	surfaceparm alphashadow
	cull none
	{
		map textures/models/natural/tree4_3.tga
		depthWrite
		alphafunc GE128
		nextbundle
		map $lightmap
	}
} 
This does EXACTLY what I want it to do!! Now I can have trees casting their rightful shadows and still have grenades fly through the treetops. I haven't exhaustively searched the MOHAA textures yet, so there MAY be a texture like this already, but as far as I know there isn't. Woohoo! This will make maps look so much better. The only trick is, since it is a flat texture, making the texture face the sunlight in the right direction to cast the appropriate shadow in the map. BY THE WAY - This texture uses nodraw. You know how all fences use nodraw? Well, this texture counts as a fence. So, only one side has the texture, and the rest have nodraw.

Awesome!
Stevo
Corporal
Posts: 38
Joined: Tue Dec 16, 2003 8:31 pm
Location: Florida, USA
Contact:

Post by Stevo »

Oh yeah. The "cull none", of course, isn't necessary.
Post Reply