Texture quality and distance to object
by Funky Diver · in Torque Game Engine · 12/10/2004 (1:28 pm) · 14 replies
Greetings!
How can I change the maximum distance to show the object in full texture quality? For example, in Torque demo, the health kit looks like a rose brick on a distance, and appears with a red crest when I'm close enough. The same I would like to do a road texture, so road looks good even on a long distance, not be blurred 6 meters away...
Can I do it with a script or change some properties?
Thank you!
How can I change the maximum distance to show the object in full texture quality? For example, in Torque demo, the health kit looks like a rose brick on a distance, and appears with a red crest when I'm close enough. The same I would like to do a road texture, so road looks good even on a long distance, not be blurred 6 meters away...
Can I do it with a script or change some properties?
Thank you!
#2
12/10/2004 (10:23 pm)
There's a small textures check. Try changing that? :)
#3
Ben, can you give me some coordinates of that textures check point, please? script? code? class?
12/13/2004 (11:43 am)
Thank you!Ben, can you give me some coordinates of that textures check point, please? script? code? class?
#4
12/14/2004 (11:04 pm)
Try grepping for smallTextures?
#5
Thanks, Ben, I've got the idea. The code is quite simple.
Sam, look for "smallTextures" in the texture manager class (TextureManager).
I think I'm going to research it more and, then, publish my code snipit.
12/15/2004 (1:24 am)
Great!Thanks, Ben, I've got the idea. The code is quite simple.
Sam, look for "smallTextures" in the texture manager class (TextureManager).
I think I'm going to research it more and, then, publish my code snipit.
#6
12/15/2004 (7:08 am)
Would be interested in seeing that. Glad you got it dealt with!
#7
I'll see if I can dig it out tonight and post it here if you havent already Alex, if I get some spare time.
No promises though.
12/15/2004 (7:13 am)
I've changed it a few months ago, it's really just a hack and is very easy to apply.I'll see if I can dig it out tonight and post it here if you havent already Alex, if I get some spare time.
No promises though.
#9
In ShapeBase.cc # 2258 - 2262
You can remove this part, but if you have a very far view range, and if you keep alot of items visible at once which are far away, it might kill of some fps for you.
I changed (dist, axis) / 350; to (dist, axis) / 25; and the "issue" went away. The value I changed sets the radius at which SmallTextures are used.
Have fun.
01/04/2005 (1:18 pm)
Requested by Nathan Tran, this is the hack for more or less removing the check for smalltextures, which is what is making the texture look so flushed out.In ShapeBase.cc # 2258 - 2262
F32 projected = dglProjectRadius(dist, axis) / 350;
if (projected < (1.0 / 16.0))
{
TextureManager::setSmallTexturesActive(true);
}You can remove this part, but if you have a very far view range, and if you keep alot of items visible at once which are far away, it might kill of some fps for you.
I changed (dist, axis) / 350; to (dist, axis) / 25; and the "issue" went away. The value I changed sets the radius at which SmallTextures are used.
Have fun.
#10
Thanks a lot. It is so nice of you to look into this even though you have migrated your code base to TSE.
Nathan.
01/04/2005 (4:54 pm)
Stefan,Thanks a lot. It is so nice of you to look into this even though you have migrated your code base to TSE.
Nathan.
#11
01/04/2005 (11:51 pm)
Stefan, you are correct, it's the right place. I've prepared 2 code resources to be published soon, they will allow to control the distance from the script. Stay Tuned ;)
#12
01/11/2005 (8:27 am)
@Alexander: Ah, those sound like good candidates for HEAD inclusion.
#13
01/11/2005 (2:03 pm)
@Ben: good idea, just need time to make it in proper format, but soon it will be done.
#14
03/14/2005 (10:58 pm)
Well, I've included the hacky fix. This is an issue we'll have to revisit at some point. Thank you everyone!
Torque Owner Sam3d
But it would be nice to know if / where the global setting is in the code.