footpuffs & prints
by Blayne Watt · in Torque Game Engine · 08/11/2001 (11:40 pm) · 25 replies
Been trying to figure this out most of the evening... what do I need to do to re-enable the footpuffs and footprints? The water particles work, but the ground particles don't. I noticed the .PNG was missing for the footprints, so I created one... that got rid of the error message (once I made it a POW2)... nothing. Grabbed the lightmale from tribes2, still nothing. Compared player.cs, found a few minor difs, but nothing noteworthy... mod'd the v12 to match t2 anyways, still nothing.
Been cruising through the code, and if there's something missing, well, it's not commented out, it's gone (:
Please assist...
-Blayne
Been cruising through the code, and if there's something missing, well, it's not commented out, it's gone (:
Please assist...
-Blayne
About the author
#2
-bw
08/13/2001 (6:19 am)
I'm not as concerned about the puffs of dust, I really would like to get footprints back into the game... any ideas?-bw
#3
08/13/2001 (9:46 pm)
Probably the same problem.. have you checked to make sure they have an alpha channel?
#4
08/14/2001 (1:45 am)
It's not an alpha channel problem. There are some problems with the particle emitters. (no idea why.. look at my bug report about emitters / vehicles)
#5
I think there's definitely something missing, and Labrat seems to have confirmed that.
I didn't get a chance to look into it last night... too busy watching a movie, err, doing research (hey, when making a western, you really gotta get into the whole mood thing (: )
Hopefully, I can take a further look at it tonite, add the emitter scripts like Harold recommended, see what happens.
-bw
08/14/2001 (5:27 am)
The footprint .PNG I'm using is the one for a MediumArmor from Tribes 2... I assumed the v12 would use the same format (:I think there's definitely something missing, and Labrat seems to have confirmed that.
I didn't get a chance to look into it last night... too busy watching a movie, err, doing research (hey, when making a western, you really gotta get into the whole mood thing (: )
Hopefully, I can take a further look at it tonite, add the emitter scripts like Harold recommended, see what happens.
-bw
#6
ps. actually I just read the other post about the terrain materials, I guess that fixes it?
08/14/2001 (11:35 am)
Well the particle engine and emitters definitely work, since that's what's being used for the player water splash. Could be something with the settings, you might want to try copying the puff particle and emitter attributes from the T2 scripts :) The next thing would be to set a break point in the particle render and see if it's actually trying to render something.ps. actually I just read the other post about the terrain materials, I guess that fixes it?
#7
Sounds hopeful... just gotta check into the other issue he raised, about the properties not being used (color and size, I believe)...
-bw
08/14/2001 (4:38 pm)
Gonna try it out now... finally got home from a long day at work (:Sounds hopeful... just gotta check into the other issue he raised, about the properties not being used (color and size, I believe)...
-bw
#8
Code Snippet at end of message:
Basically, it checks if the terrain is a known type, I believe this is what the propmap.cs file Harold Brown mentioned sets up...
Then, it reads in the mapIndex from the terrainblock. THIS IS ALWAYS COMING BACK AS -1!!!
This causes the entire footpuff segment to get skipped. As in the code snippet, I set mapIndex = 0 and everything came online... this of course was just for testing purposes, I want to find out what's really happening (:
You'll need to add a footprint png in the G:\GarageGames\v12\example\data\Special\footprints directory called player.png
This code snip is from player.cc, around line 2200.
--- CODE ---
if( rInfo.object->getTypeMask() & TerrainObjectType)
{
//*** BEGIN
Con::errorf(ConsoleLogEntry::General, "**** Footpuff here ****");
//*** END
TerrainBlock* tBlock = static_cast(rInfo.object);
S32 mapIndex = tBlock->mMPMIndex[0];
//*** BEGIN
Con::errorf(ConsoleLogEntry::General, "**** Map Index: %d ****",mapIndex);
mapIndex = 0;
//*** END
if (mapIndex != -1)
{
--- END CODE ---
08/15/2001 (9:23 pm)
OK, I've investigated... results of my investigation:Code Snippet at end of message:
Basically, it checks if the terrain is a known type, I believe this is what the propmap.cs file Harold Brown mentioned sets up...
Then, it reads in the mapIndex from the terrainblock. THIS IS ALWAYS COMING BACK AS -1!!!
This causes the entire footpuff segment to get skipped. As in the code snippet, I set mapIndex = 0 and everything came online... this of course was just for testing purposes, I want to find out what's really happening (:
You'll need to add a footprint png in the G:\GarageGames\v12\example\data\Special\footprints directory called player.png
This code snip is from player.cc, around line 2200.
--- CODE ---
if( rInfo.object->getTypeMask() & TerrainObjectType)
{
//*** BEGIN
Con::errorf(ConsoleLogEntry::General, "**** Footpuff here ****");
//*** END
TerrainBlock* tBlock = static_cast
S32 mapIndex = tBlock->mMPMIndex[0];
//*** BEGIN
Con::errorf(ConsoleLogEntry::General, "**** Map Index: %d ****",mapIndex);
mapIndex = 0;
//*** END
if (mapIndex != -1)
{
--- END CODE ---
#9
this is also a little after line 2200... in player.cc ... just displays the values of red/blue/green/alpha in the console. They're always 0, even tho my script is:
colors[0] = "0.76 0.76 0.76 0.5";
colors[1] = "0.46 0.46 0.36 0.4";
(this may be a side effect of the mapIndex = -1)
-bw
--- CODE ---
for(x = 0; x < 2; ++x)
{
colorList[x].set( pEntry->puffColor[x].red, pEntry->puffColor[x].green, pEntry->puffColor[x].blue, pEntry->puffColor[x].alpha );
//*** BEGIN
Con::errorf(ConsoleLogEntry::General, "**** Colors: %f %f %f %f ****",pEntry->puffColor[x].red,pEntry->puffColor[x].green,pEntry->puffColor[x].blue,pEntry->puffColor[x].alpha);
//*** END
}
--- END CODE ---
08/15/2001 (9:52 pm)
I've also confirmed that footpuff emitter SIZE works, but color does not.this is also a little after line 2200... in player.cc ... just displays the values of red/blue/green/alpha in the console. They're always 0, even tho my script is:
colors[0] = "0.76 0.76 0.76 0.5";
colors[1] = "0.46 0.46 0.36 0.4";
(this may be a side effect of the mapIndex = -1)
-bw
--- CODE ---
for(x = 0; x < 2; ++x)
{
colorList[x].set( pEntry->puffColor[x].red, pEntry->puffColor[x].green, pEntry->puffColor[x].blue, pEntry->puffColor[x].alpha );
//*** BEGIN
Con::errorf(ConsoleLogEntry::General, "**** Colors: %f %f %f %f ****",pEntry->puffColor[x].red,pEntry->puffColor[x].green,pEntry->puffColor[x].blue,pEntry->puffColor[x].alpha);
//*** END
}
--- END CODE ---
#10
Look in terrData.cc about line 696, it currently reads:
mMPMIndex[0] = pMatMap->getIndexFromName(nameBuff);
Change that to:
mMPMIndex[0] = pMatMap->getIndexFromName(fn);
Compile so you have a test Application.
Add in a footprint image named "player.png" (I used one from T2) put it in:
data/special/footprints/
Copy the particleTest.png from Tribes 2 and put it in:
data/special/
Then edit the server/scripts/player.cs, search for particleTest and replace it with data/special/particleTest (lines 478 and 514)
Next you will need to create material property files for each of the maps. And create a main.cs file in the data directory to run them. My files are listed below.
data/main.cs
============
exec("~/terrains/grassland/grasslandPropMap.cs");
exec("~/terrains/scorched/scorchedPropMap.cs");
data/terrains/grassland/grasslandPropMap.cs
===========================================
addMaterialMapping("sand" , "sound: 0" , "color: 0.46 0.36 0.26 0.4 0.0");
addMaterialMapping("grass" , "sound: 0" , "color: 0.46 0.36 0.26 0.4 0.0");
addMaterialMapping("patchy" , "sound: 0" , "color: 0.46 0.36 0.26 0.4 0.0");
data/terrains/scorched/scorchedPropMap.cs
=========================================
addMaterialMapping("scorched_lt", "sound: 0" , "color: 0.46 0.36 0.26 0.4 0.0");
addMaterialMapping("scorched_dk", "sound: 0" , "color: 0.46 0.36 0.26 0.4 0.0");
08/16/2001 (1:21 am)
Fixed it...Look in terrData.cc about line 696, it currently reads:
mMPMIndex[0] = pMatMap->getIndexFromName(nameBuff);
Change that to:
mMPMIndex[0] = pMatMap->getIndexFromName(fn);
Compile so you have a test Application.
Add in a footprint image named "player.png" (I used one from T2) put it in:
data/special/footprints/
Copy the particleTest.png from Tribes 2 and put it in:
data/special/
Then edit the server/scripts/player.cs, search for particleTest and replace it with data/special/particleTest (lines 478 and 514)
Next you will need to create material property files for each of the maps. And create a main.cs file in the data directory to run them. My files are listed below.
data/main.cs
============
exec("~/terrains/grassland/grasslandPropMap.cs");
exec("~/terrains/scorched/scorchedPropMap.cs");
data/terrains/grassland/grasslandPropMap.cs
===========================================
addMaterialMapping("sand" , "sound: 0" , "color: 0.46 0.36 0.26 0.4 0.0");
addMaterialMapping("grass" , "sound: 0" , "color: 0.46 0.36 0.26 0.4 0.0");
addMaterialMapping("patchy" , "sound: 0" , "color: 0.46 0.36 0.26 0.4 0.0");
data/terrains/scorched/scorchedPropMap.cs
=========================================
addMaterialMapping("scorched_lt", "sound: 0" , "color: 0.46 0.36 0.26 0.4 0.0");
addMaterialMapping("scorched_dk", "sound: 0" , "color: 0.46 0.36 0.26 0.4 0.0");
#11
Oli
08/16/2001 (3:24 am)
Would it be hard to stop the engine from making footpuffs while underwater?Oli
#12
-bw
08/16/2001 (5:35 am)
It actually checks for that. I don't have the code with me, but it checks if WaterCover > 0.5 or something like that... You could easily change the way it responds, if you so desire.-bw
#13
Thanks for the terrdata info... I was gonna head in there, but it was 11pm, and I have to get up for work at 5am, so I figured it was time to pack it up... figured I'd post my findings and hit the sack (:
Thanks again!
-bw
08/16/2001 (5:38 am)
So, Harold, did my research help at all, or did we both investigate this at the same time? (:Thanks for the terrdata info... I was gonna head in there, but it was 11pm, and I have to get up for work at 5am, so I figured it was time to pack it up... figured I'd post my findings and hit the sack (:
Thanks again!
-bw
#14
Oli
08/16/2001 (6:20 am)
It seems that its working fine, the problem was just that the water in scorched planet where I was testing wasn't done correctly so instead of going into the water you went under a thin layer of water.Oli
#15
08/16/2001 (8:28 am)
I was doing research too.. but your info about the mapindex always returning -1 tipped me off on where to look more
#16
08/16/2001 (9:05 pm)
Thanks for the footprints, these are cool.
#17
thanks Anthony
08/17/2001 (6:38 am)
sorry to bud you all but are the tribe2 footprints.png in the skin.v12 zip file? I can't find them what is the filename?thanks Anthony
#18
08/17/2001 (6:44 am)
nevermind I found it in textures.v12
#19
anthony
08/17/2001 (11:39 am)
I still can't get it . . . .question I did what Labrat said, saw it in another thread, do I have to alter the code where blane said too?!?!?! me confused thanks anthony
#20
1. Edited line 696 to read - mMPMIndex[0] = pMatMap->getIndexFromName(fn);
2. Compiled so you have a new test Application (v12test_DEBUG.exe).
3. Copied a footprint.png to data/special/footprints/player.png
4. Copied the particleTest.png to data/special/particleTest.png
5. Edited the server/scripts/player.cs
6. Added the main.cs in the data folder
7. Added grasslandPropMap.cs and scorchedPropMap.cs
8. Run the v12test_DEBUG.exe and checked the puffs
08/17/2001 (12:05 pm)
OK let's go through the Check list.1. Edited line 696 to read - mMPMIndex[0] = pMatMap->getIndexFromName(fn);
2. Compiled so you have a new test Application (v12test_DEBUG.exe).
3. Copied a footprint.png to data/special/footprints/player.png
4. Copied the particleTest.png to data/special/particleTest.png
5. Edited the server/scripts/player.cs
6. Added the main.cs in the data folder
7. Added grasslandPropMap.cs and scorchedPropMap.cs
8. Run the v12test_DEBUG.exe and checked the puffs
Torque Owner Tim Gift