Rab,d
Light Guard
Posts: 29
|
Post by Rab,d on Mar 26, 2006 8:27:17 GMT -5
Hey, guys. I don't know if too many of have encountered this...but i have. Sometimes i get these faces that turn out all black or mostly... I get this most often when working with terrain generated stuff. Mostly of steep inclines. Til now this has drove me nuts. I finally have figured out the reason for the anomaly. It's all about texture alignment! If you take the "bad" face and just set it at the default 1 1 scale and 0 90 angle...it will no longer be black. It may not be the correct alignment for the map..but it will be fixed. I believe it's when the tex angles are too close to each other...the calculations get screwed up....maybe it produces high or negative values or something... It's a bit unfortunate...I have encountered this alot because i typically do alot of texture alignment...like making sure the wood grain lines up on a house or something. Or with terrain. It just comes down to forcing you to make exceptions with your texture alignment. ;[ But, it is possible to remove all black faces from a map.
|
|
|
Post by grieve[Q2C] on Mar 26, 2006 23:08:44 GMT -5
cool stuff, Rab,d. I'll keep that in mind when I try making terrain and get some black faces (what is quite likely to happen) would be interesting to get an in-depth explanation from a Q2 engine expert for this stuff. I would have guessed that the texture orientation on the face is negligible.
|
|
Rab,d
Light Guard
Posts: 29
|
Post by Rab,d on Mar 27, 2006 6:42:07 GMT -5
cool stuff, Rab,d. I'll keep that in mind when I try making terrain and get some black faces (what is quite likely to happen) would be interesting to get an in-depth explanation from a Q2 engine expert for this stuff. I would have guessed that the texture orientation on the face is negligible. Well..it's not really the engine. It's the rad computation. When your rad program does it's magic, it does consider the texture postion of each face. It does this, of course, mathematically. So, i believe, tex angle values like -102 -85...throw it for a loop. So maybe an arghrad expert could be more helpful. I could set up a sample map to test this on. I'll try that and post the results.
|
|
|
Post by Le Ray [Q2C] on Mar 27, 2006 13:00:56 GMT -5
Thanks for the tip!
|
|
|
Post by whirlingdervish on Mar 27, 2006 13:08:02 GMT -5
I would assume that arghrad takes the texture into account mostly when calculating the reflected light values (color, strength, angle) as it needs to know how reflective a surface is.... I think if the texture is too strangely positioned on the face, then the reflective value of the texture may come out as a number that rad sees as a negative or nearly 0 value.... adjusting the texture positioning manually to fix the problem areas makes pretty good sense if you are using generated terrain since the generator util usually does the texture positioning all by itself, utilizing different algebraic equations... this is good unless you have some very steep angles, as the program will align your texture in a very steep way to accomodate this face....
its either that or when it figures out the color of the reflected light coming off of a texture it tries to take an average of the colors on the surface.... a screwed up tex alignment would probably ruin this value too...
a test map is a good idea. lets see if we can figure this out without diving into the source code.... My C++ has gotten a bit rusty over the years.
|
|