Autospawning sprites on a material Created 16 years ago2008-04-01 14:11:24 UTC by Spike Spike

Created 16 years ago2008-04-01 14:11:24 UTC by Spike Spike

Posted 16 years ago2008-04-01 14:11:24 UTC Post #248334
I want to make some grass sprites autospawning on a grass texture. Valve doesn't explain too much about this.

I've found that:

[quote]Group1
{
"alpha" "1"
Model1
{
	"sprite" "288 0 128 128 512"
	"spritesize" "0.5 0.0 19 25"
	"spriterandomscale" "0.2"
	"amount" "0.2"
	"detailOrientation" "2"
}
Model2
{
	"sprite" "0 0 128 128 512"
	"spritesize" "0.5 0.0 23 30"
	"spriterandomscale" "0.2"
	"amount" "0.1"
	"detailOrientation" "2"
	}
}
[/quote]

What does it mean? Why is it declared as Model? How do I link this file to the sprite texture?
Posted 16 years ago2008-04-01 14:34:47 UTC Post #248335
Yeah, i want to know how this is done as well.
I do know that the detail.vbsp file has something to do with it...
Posted 16 years ago2008-04-09 18:39:08 UTC Post #248636
I really need to know this. I hate because Valve explains all except the most important thing, how the hell do you link the .vtf to the .vbsp????
Posted 16 years ago2008-04-09 19:11:48 UTC Post #248637
Posted 16 years ago2008-04-09 19:22:02 UTC Post #248638
http://developer.valvesoftware.com/wiki/Det
ail_Props
I want to make some grass sprites autospawning on a grass texture. Valve doesn't explain too much about this.

I've found that:

Quote:
Group1
{
"alpha" "1"
Model1
{
"sprite" "288 0 128 128 512"
"spritesize" "0.5 0.0 19 25"
"spriterandomscale" "0.2"
"amount" "0.2"
"detailOrientation" "2"
}
Model2
{
"sprite" "0 0 128 128 512"
"spritesize" "0.5 0.0 23 30"
"spriterandomscale" "0.2"
"amount" "0.1"
"detailOrientation" "2"
}
}

What does it mean? Why is it declared as Model? How do I link this file to the sprite texture?
Means I've already read all the stuff and it doesn't explain how to tell the .vbsp which texture file do I want to use.
Posted 16 years ago2008-04-09 19:25:52 UTC Post #248639
You should read it again...it clearly states what you put in the VMT to link it to the VBSP.
Penguinboy PenguinboyHaha, I died again!
Posted 16 years ago2008-04-12 20:13:14 UTC Post #248729
Well I'm doing what it says there and is not spawning sprites. BTW I have tested the custom and the official ones and aren't shown on hammer neither ingame.
Posted 16 years ago2008-04-12 20:44:54 UTC Post #248730
in general, sprites only appear on displacements with alpha applied.
Penguinboy PenguinboyHaha, I died again!
Posted 16 years ago2008-04-12 21:53:51 UTC Post #248734
[quote]and aren't shown on hammer[quote]

They wont ever show in hammer, so keep your half-life 2 up
TheGrimReafer TheGrimReaferADMININATOR
Posted 16 years ago2008-04-14 10:58:32 UTC Post #248801
yes... seems on displacements work well, I'm going to try it with custom textures
Posted 16 years ago2008-04-18 14:36:13 UTC Post #248913
Ok, finally it works with a "custom" texture. But it seems to spawn on the wrong alpha too. Well, it doen't spawn on all the wrong alpha, but it does too much on the edge. I just want to spawn it on grass.

here's a pic, and the .vbsp
User posted image
[blue]detail
{
tf_grass
{
	"density" "8000"
	Group1
	{
		"alpha" "1"
	}
	Group2
	{
		"alpha" "1"
		Model2
		{
			"sprite" "200 85 94 172 512"
			"spritesize" "0.5 0.0 16 37"
			"spriterandomscale" "0.1"
			"amount" "0.025"
			"detailOrientation" "2"
		}
		Model3
		{
			"sprite" "376 0 112 256 512"
			"spritesize" "0.5 0.0 12 18"
			"spriterandomscale" "0.1"
			"amount" "0.015"
			"detailOrientation" "2"
		}
		Model4
		{
			"sprite" "32 416 64 96 512"
			"spritesize" "0.5 0.0 10 14"
			"spriterandomscale" "0.3"
			"amount" "0.05"
			"detailOrientation" "2"
		}
		Model5
		{
			"sprite" "217 472 68 40 512"
			"spritesize" "0.5 0.0 12 12"
			"spriterandomscale" "0.4"
			"amount" "0.15"
			"detailOrientation" "2"
		}
	}
	Group3
	{
		"alpha" "1"
		Model2
		{
			"sprite" "200 85 94 172 512"
			"spritesize" "0.5 0.0 16 37"
			"spriterandomscale" "0.1"
			"amount" "0.025"
			"detailOrientation" "2"
		}
		Model3
		{
			"sprite" "376 0 112 256 512"
			"spritesize" "0.5 0.0 12 18"
			"spriterandomscale" "0.1"
			"amount" "0.025"
			"detailOrientation" "2"
		}
		Model4
		{
			"sprite" "32 416 64 96 512"
			"spritesize" "0.5 0.0 10 14"
			"spriterandomscale" "0.3"
			"amount" "0.05"
			"detailOrientation" "2"
		}
		Model5
		{
			"sprite" "217 472 68 40 512"
			"spritesize" "0.5 0.0 12 12"
			"spriterandomscale" "0.4"
			"amount" "0.15"
			"detailOrientation" "2"
		}
	}
	Group4
	{
		"alpha" "1"
		Model1
		{
			"sprite" "0 0 164 256 512"
			"spritesize" "0.5 0.0 24 37"
			"spriterandomscale" "0.3"
			"amount" "0.05"
			"detailOrientation" "2"
		}
		Model2
		{
			"sprite" "200 85 94 172 512"
			"spritesize" "0.5 0.0 12 32"
			"spriterandomscale" "0.25"
			"amount" "0.05"
			"detailOrientation" "2"
		}
		Model3
		{
			"sprite" "376 0 112 256 512"
			"spritesize" "0.5 0.0 12 18"
			"spriterandomscale" "0.1"
			"amount" "0.25"
			"detailOrientation" "2"
		}
		Model4
		{
			"sprite" "32 416 64 96 512"
			"spritesize" "0.5 0.0 10 14"
			"spriterandomscale" "0.25"
			"amount" "0.05"
			"detailOrientation" "2"
		}
		Model5
		{
			"sprite" "217 472 68 40 512"
			"spritesize" "0.5 0.0 12 12"
			"spriterandomscale" "0.25"
			"amount" "0.15"
			"detailOrientation" "2"
		}
	}
}
}
[/blue]
Posted 16 years ago2008-04-19 13:28:48 UTC Post #248938
what's that look when compiled?
Tetsu0 Tetsu0Positive Chaos
Posted 16 years ago2008-04-19 21:49:54 UTC Post #248965
I fixed it. It spawns the details even if you got 5% alpha on the texture. So it won't look as nice as I would want it to look
Posted 16 years ago2008-04-24 17:11:27 UTC Post #249142
Still having problems with it. It seems it recognize the custom texture (is the same original texture but in green), but it does with the original detail.vbsp parameters, so the detail.vbsp I have on the tf/ folder doesn't make anything.
You must be logged in to post a response.