Aller au contenu

Photo

(SOLVED) Retextured model's texture distorts at a distance


  • Veuillez vous connecter pour répondre
20 réponses à ce sujet

#1
Talisander

Talisander
  • Members
  • 173 messages
I think this may be a problem with the specific .DDS format I used.  (I'm using the Nvidia DDS plugin for photoshop.) Wondering if anyone has run into this: The original model (in my case a piece of roof from the human noble set) gets blurry as you zoom out, creating a nice sort of depth of field effect.  It also gets blurry when you're looking at the texture from an extreme angle.

I took the texture, changed the colors in photoshop from a pale grey blue to a fairly bright red (there was no tint map or I would have done it that way) and saved it.  I believe as a DDS 3.  (I'm about to try a DDS 5 file instead.)  

The new red texture looks great up close, but as you get further away, instead of getting a soft blur the texture tries to stay sharp, and looks like you've literally shrunk it down to the point that the detail gets all messed up.

I've put all the files I'm using in this project, if anyone is curious.  Screenshots on the way.

Modifié par Talisander, 23 mai 2010 - 02:11 .


#2
ponozsticka

ponozsticka
  • Members
  • 453 messages
There are actually three models for everything in DA, that differes only by number, so _0,_2,_3 each for different distance of view, maybe you should try to retexture those as well, basicly it is the same texture, just with less details :)

#3
-Semper-

-Semper-
  • Members
  • 2 256 messages
when saving your texture you have to select the option to generate mipmaps. your texture is lacking them ;)
has nothing to do with the lod system. this only affects polygons and is controlled by the meta file. the textures are sized down through mipmapping.

oh, and better save your texture as a dxt1 - 1bit alpha like bioware. else your textures are getting way too big in filesize.

edit: take this one.

Modifié par -Semper-, 23 mai 2010 - 02:08 .


#4
Talisander

Talisander
  • Members
  • 173 messages
sigh.



You're my hero, Semper.

#5
Talisander

Talisander
  • Members
  • 173 messages
Wow, looks great now. Thanks again!

#6
-Semper-

-Semper-
  • Members
  • 2 256 messages
no problem. now you own me an article at the wiki^^

you could write a tutorial about retexturing static models so nobody runs into trouble in the future. my english is lacking words to describe it in a not retarded way :D



the article about textures could also need rewriting. there are floating too big files around in texture space :P

#7
mikemike37

mikemike37
  • Members
  • 669 messages
okay sure - DXT1 is okay then and smaller file size? i can change mine no problem. didnt actually know they worked. they save like 50% on DXT5...! this is good news!

#8
-Semper-

-Semper-
  • Members
  • 2 256 messages
yes. dunno why they tried the higher compressions when dxt1 delivers all the quality you need at half the size. saves up memory. with lots of custom models this is very important ;)



with dxt1 you can also choose to not save alpha maps if they are not needed.

#9
mikemike37

mikemike37
  • Members
  • 669 messages
thanks for the tips, this will cut our mods file size down substantially! ^^

#10
mikemike37

mikemike37
  • Members
  • 669 messages
in fact, while you're here - would you recommend diffuse at fullsize, normal and spec at halfsize? ive so far had all my textures in one material the same size, but I don't need to do that... or do i?

EDIT: DXT1 uses 1 bit for the alpha? in fact it actually removes it every time i use it... am i doing something wrong? can you confirm youre able to get a proper alpha using DXT1?

Modifié par mikemike37, 23 mai 2010 - 03:03 .


#11
DarthParametric

DarthParametric
  • Members
  • 1 409 messages
You can't use DXT1 for textures with an Alpha channel. You'll have to use DXT5 for textures that use the Alpha for specular.

#12
mikemike37

mikemike37
  • Members
  • 669 messages
ah thanks. well, guess itll be DXT1 for only certain stuff then.

#13
-Semper-

-Semper-
  • Members
  • 2 256 messages
you can use dxt1 compression together with alpha maps. if the alpha map is not of high quality than that's enough. if you need fine details like in feathers then i would recommend dxt3 with explicit alpha map. i am able to save the alpha map in dxt1.



textures don't have to be the same size, but i would set the normal map similar to the diffuse. the specular could be half the size because there is no detail added.


#14
mikemike37

mikemike37
  • Members
  • 669 messages
okay thanks. Is there a more efficient way to save normals? at the minute i understand they use the alpha for normal... but essentially they only need two channels - X and Y (red and alpha?), so to use DXT 3 or 5 and use 4 channels would seem unnecessary? is there a workaround?

Modifié par mikemike37, 23 mai 2010 - 04:43 .


#15
-Semper-

-Semper-
  • Members
  • 2 256 messages
don't think so. rgb format conatins 3 channels plus an additional alpha channel. if you now delete red and blue channel then i guess this won't be rgb format. dunno if you could save the remaining 2 channels as dds texture at all - don't think so^^

normal maps in dragon age are switching channels. the red channel is the alpha channel and the green one also covers the red and blue channel.

Modifié par -Semper-, 23 mai 2010 - 04:55 .


#16
mikemike37

mikemike37
  • Members
  • 669 messages
switching? as in, what...? theyre about to change with a patch?!



so red will become X and green will be Y... as with typical normal maps from every other game?

#17
DarthParametric

DarthParametric
  • Members
  • 1 409 messages
I think he means switched between a regular RGB normal map and DA's RGBA version.

#18
mikemike37

mikemike37
  • Members
  • 669 messages
oh, that makes more sense ^^

#19
DarthParametric

DarthParametric
  • Members
  • 1 409 messages
Also, I wouldn't use DXT3 for textures that use the Alpha as a spec map or normal maps. Use DXT5 as I said before. That's the whole reason there are 5 different formats.

#20
-Semper-

-Semper-
  • Members
  • 2 256 messages
dxt5 is an interpolated alpha channel. i would guess this produces a horrible bump map.

#21
Talisander

Talisander
  • Members
  • 173 messages
Note that for the file I was using at least, you can tell Bioware uses dxt1 because of the filesize. Saving in that format gives you something the exact same size as the original file, while saving in other formats does not.

It's really strange that they use the alpha channel for normal and specular. The result is that those DDS files are twice the size of the diffuse texture! Does the entire file get loaded into memory, I wonder? So something which could have only used 2 channels (normal and specular) is taking up twice as much space as something which uses 3 (diffuse)? Does this actually eat up more vram?


Thanks again guys, you've been incredibly helpful today. I feel like I've learned everything custom content related I was dreading having to learn for my standalone mod in one day.  Wiki article on the way.

Modifié par Talisander, 23 mai 2010 - 09:20 .