Texture size issues

Texture size issues

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

Post Reply
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Texture size issues

Post by Forboding Angel »

Has anyone ever noticed that if you take a 512x512 texture and stick it on a unit, you get real bright colors? However, if you use a 256x256 you get significantly darker ones.

Even doing it with the same texture... (512 -> 256) Does this qualify as an engine bug?
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Texture size issues

Post by Argh »

I uh... I honestly don't know what you're talking about.

Oh, wait... you are one of the DDS holdouts. You're probably getting hosed by either your video card's drivers when the mipmaps are built, or (not likely) by Spring, when it tells the video card to do that, via OpenGL. It's not likely that it's Spring, but it should probably get tested. Remind me to look at this tomorrow evening- I have to go to bed now, but I'll confirm your theory one way or another.

Seriously, though... with DDS, 256 looks the same as 512 as 1024, no difference at all.
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: Texture size issues

Post by Forboding Angel »

Argh wrote:Seriously, though... with DDS, 256 looks the same as 512 as 1024, no difference at all.
So do png's and tga's. The problem is not quality. The problem is a darkening of the texture happening.

I did a little test. Took a unit with a 512 tex and downsized it to a 256. The unit texture looked the same ingame as before. So that leaves the model as the potential issue. The tex2's are almost the same. All areas have a very high specular level, and a miniscule reflectivity, all teamcolor is 100% glow.

Additionally, I recalculated the vertex normals in upspring on both units at 60 degrees (to guarantee a level field). Still no dice. It's somethign I've wondered about for some time now.


The big tank is using 256, and the little one is 512. Backwards I know, but it does a good job of illustrating what is going on. Also, both textures use the exact same color values.

Image
screen038.jpg
(697.19 KiB) Downloaded 137 times
User avatar
jK
Spring Developer
Posts: 2299
Joined: 28 Jun 2007, 07:30

Re: Texture size issues

Post by jK »

Forboding Angel wrote:The tex2's are almost the same. All areas have a very high specular level, and a miniscule reflectivity, all teamcolor is 100% glow.
Specularity and reflectivity use the SAME channel. The other channel is SELF-ILLUMINATION, which also explains why one is brighter than the other!
User avatar
lurker
Posts: 3842
Joined: 08 Jan 2007, 06:13

Re: Texture size issues

Post by lurker »

I don't follow. If they both have 'very high self-illumination', why is one brighter?
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Texture size issues

Post by smoth »

you didn't scale that model in upspring did you forb?
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: Texture size issues

Post by Forboding Angel »

jK wrote:
Forboding Angel wrote:The tex2's are almost the same. All areas have a very high specular level, and a miniscule reflectivity, all teamcolor is 100% glow.
Specularity and reflectivity use the SAME channel. The other channel is SELF-ILLUMINATION, which also explains why one is brighter than the other!
No they aren't JK... How did you miss that memo? Blue = specular, green = reflectivity, red = glow.

Lemmie post a tex2 for enlightenment purposes...

This is the big tank's tex2
efatso2glowy.png
efatso2glowy.png (75.25 KiB) Viewed 886 times
In case you don't know already just from looking... THe blue parts are the main parts of the tank (there is a slight hint of green in there). The brightest bits are teamcolor (high specularity, High reflectivity and 100% Glow), and the really green bits are the cockpit windows.

@smoth, yes, however, I don't have a choice. These come from max (which if I could import from max, keep the hierarchy and object origins intact along with having the right footprint, that would be sex, but life isn't like that). And yes I know that upspring does some wierd shit to the model when it is upscaled, but generally, it doesn't actually effect the look of it perceptibly.

Edit: This isn't the actual model being used ingame. I've changed stuff on it to show what is happening.

I originally thought it was the texture at fault, but it's actually something with the model and I'm guessing upspring is to blame (which means that upspring needs to be fixed in that case).
Last edited by Forboding Angel on 09 Oct 2009, 20:51, edited 1 time in total.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Texture size issues

Post by smoth »

oh no it does, see the rx78 thread in the gundam forum.

you need to recalc your normals if you are scaling in upspring.
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: Texture size issues

Post by Forboding Angel »

Smoth, I always recalc them to (60 as a general rule of thumb) 45 - 60/65. Perhaps on this tank I should try 45 instead of 60. Let me check and see if perhaps the normals are what is causing this...
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Texture size issues

Post by smoth »

It did on my rx78 model.
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: Texture size issues

Post by Forboding Angel »

AHA, that was it. Re-calced to 45 (instead of 60) and problem solved. Basically this means that I need to just be a lot more picky about how I redo the normals in upspring. That's nice to know...
screen039.jpg
screen039.jpg (247.35 KiB) Viewed 869 times
Edit: I'm guessing that there are enough small curves on this model that 60 was causing the entire thing to be rounded hardcore, making the entire thing appear to be much darker than it should be.

I guess what I'll do for the gun barrels is recalc them at a much higher point to get a more rounded appearance.

I have another question tho, in the next post...
Last edited by Forboding Angel on 09 Oct 2009, 20:58, edited 1 time in total.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Texture size issues

Post by smoth »

:P
User avatar
KaiserJ
Community Representative
Posts: 3113
Joined: 08 Sep 2008, 22:59

Re: Texture size issues

Post by KaiserJ »

much nicer.

still looks like shart at that size IMO when placed next to models with the same texture size but smaller scale, i should probably re-skin eventually if it stays that huge.
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: Texture size issues

Post by Forboding Angel »

Ok this is the reflective channel for the same tank. Pretty muted right? WHy on earth is spring to showing a heck of a lot of reflectivity? It's annoying as hell. I want a little bit of reflectivity, but just a lil bit, not POW! REFLECTIVE!

Now it's worth noting that taking this down from it's original reflectivity cut out a LOT of it, but the parts that are brighter than others on this map I actually DO want to show reflectivity on... Like the panel lines for instance.

anyway:

Edit: @ kaiser yeah, agreed, but atm it's doing a great job of showing off a "point" :-)

Edit2: oh son of a bitch... 1 sec, making a new attachment...
Clipboard01.jpg
Clipboard01.jpg (63.29 KiB) Viewed 862 times
Edit3: Kaiser, I did take it back to 5x5 like you said btw. Still looks like a brick shithouse, but at least a manageable one ;p
Attachments
efatso2glowyexample.png
efatso2glowyexample.png (75.25 KiB) Viewed 867 times
User avatar
KaiserJ
Community Representative
Posts: 3113
Joined: 08 Sep 2008, 22:59

Re: Texture size issues

Post by KaiserJ »

Image

edit : going to reskin it anyways somewhat... the background color of the texture for instance on most of the more recent models was set to light grey to avoid obvious alignment issues :>
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: Texture size issues

Post by Forboding Angel »

arugh, now everytime I see that tank I'm going to see a little fat evil man lol
Post Reply

Return to “Engine”