Are materials for foot puff colors broken?
by Mike Nelson · in Torque Game Engine · 09/26/2002 (4:42 pm) · 7 replies
Are materials broken for the foot puff colors on the terrain? I've been testing this but it appears to always use the color the first material listed in the terrain block material list.
Thanks,
Mike
Thanks,
Mike
About the author
#2
1. When you are comparing 2 values, you could blend them according to the % of the material in that spot, but this would probably just look muddy.
2. Instead of using alpha, just use the % of the material. This would allow some materials to have only a maximum of 0.5 alpha.
3. What would be even cooler is different emitters for materials. So for someone running along grass you could have grass particles fly up sometimes.
09/30/2002 (11:47 am)
Sounds cool, wasn't sure if Torque did this or not. One thing that might be interesting is to do a little more with blending and alpha. A few ideas:1. When you are comparing 2 values, you could blend them according to the % of the material in that spot, but this would probably just look muddy.
2. Instead of using alpha, just use the % of the material. This would allow some materials to have only a maximum of 0.5 alpha.
3. What would be even cooler is different emitters for materials. So for someone running along grass you could have grass particles fly up sometimes.
#3
1. I thought of this too. But didn't go to the trouble of blending the values. Actually it might work out okay if the colors are representative of the textures since the textures themselves are blended. Don't know. Good idea anyway.
2. Interesting. Do you mean return the material and also say that this material is say 50% of the location?
3. I like this idea. I didn't think of this one. Duh! I was just thinking of generic green particles. I must spend too much time in game simulations and not in the real world. :)
09/30/2002 (12:35 pm)
Max,1. I thought of this too. But didn't go to the trouble of blending the values. Actually it might work out okay if the colors are representative of the textures since the textures themselves are blended. Don't know. Good idea anyway.
2. Interesting. Do you mean return the material and also say that this material is say 50% of the location?
3. I like this idea. I didn't think of this one. Duh! I was just thinking of generic green particles. I must spend too much time in game simulations and not in the real world. :)
#4
I, of course, mean in real life.
09/30/2002 (4:52 pm)
Run through the grass and see how many peices of grass are kicked up through the air.I, of course, mean in real life.
#6
Hehe yeah I thought of this too, but what about for things like bullets hittting/grazing the ground? They should make more dust than people walking...
In general a person doesnt kick up much dust unless you are running in a sand dune.
09/30/2002 (6:53 pm)
Maybe if you are an insectoid creature with 6 inch long blades at the end of your 32 legs it would kick up grass?Hehe yeah I thought of this too, but what about for things like bullets hittting/grazing the ground? They should make more dust than people walking...
In general a person doesnt kick up much dust unless you are running in a sand dune.
#7
I tried this too, just for curiosity sake... it seems that without trying to kick up grass, I didn't. ;)
However, a weird insect or a speeding vehicle might. O_o
10/04/2002 (1:05 pm)
Heh...I tried this too, just for curiosity sake... it seems that without trying to kick up grass, I didn't. ;)
However, a weird insect or a speeding vehicle might. O_o
Torque Owner Mike Nelson
I got this working by adding some methods to the TerrainBlock class. Most of the code was adapted from some methods in the TerrainEditor. There were functions on the TerrainEditor for getting some property info from a 2D or 3D location on the terrain, including the texture alpha table for that location (a list of all the material textures for the terrain and their respective alpha blending of each). I took this alpha blending value and found the one with the highest blending value which gives the correct texture to match with the material list name.
So basically this new method is called on the terrain block passing in a position (the point of collision in this case) and it returns the material for that location.
Right now the proper matching with the material list is not implemented yet (it just assumes the material list and the texture list items are in the same order) but this should be trivial. It does appear to pull to correct texture though.
Any thoughts on this approach?