Author Topic: UV Mapped AND Tiled  (Read 11800 times)

0 Members and 1 Guest are viewing this topic.

Offline Water

  • 210
I see what you mean but the problem is present even with 256x256 textures...
At a tiling factor of 1k to 10k, a 4096 texture won't make a difference. It can make a difference if you reduce the tiling factor.

It all comes down to scale. On a large ship, tiling gives sharp visuals close up, but you lose the sense of scale. All walls you are close to look alike. A non tiled texture with ambient occlusion gives a sense of scale but the close up suffers. For 1-3km I'd go with non tiled. But I'm guessing you are thinking a bit bigger than that.

 
interesting,
i m asking that to know about optimisation but, when you tile a texture for exemple 2x 1024*1024
does  the game load the map to the memory two times and finally react as you had a 2048*2048 texture?
$Formula: ( every-time
   ( has-time-elapsed "0" )
   ( Do-Nothing
   )
   ( send-message
      "#Dalek"
      "High"
      "Pro-crasti-nate"
   )
   )
)
+Name: Procratination
+Repeat Count: 99999999999
+Interval: 1

 

Offline ssmit132

  • 210
  • Also known as "Typhlomence"
    • Steam
    • Twitter
I doubt that it works how you're saying just there, but if it did, it would be 4x 1024*1024, since doubling the sides quadruples the area.

 

Offline Water

  • 210
interesting,
i m asking that to know about optimisation but, when you tile a texture for exemple 2x 1024*1024
does  the game load the map to the memory two times and finally react as you had a 2048*2048 texture?

When you tile a surface it loads the texture once and draws it on screen many times. Thats why dds is important. As the surface gets smaller due to distance the vid card needs to resize the texture. If the dds has mip maps it grabs a smaler image to save time.

 

Offline SeeNeYe

  • 25
Quote
At a tiling factor of 1k to 10k, a 4096 texture won't make a difference. It can make a difference if you reduce the tiling factor.

It all comes down to scale. On a large ship, tiling gives sharp visuals close up, but you lose the sense of scale. All walls you are close to look alike. A non tiled texture with ambient occlusion gives a sense of scale but the close up suffers. For 1-3km I'd go with non tiled. But I'm guessing you are thinking a bit bigger than that.

I understand, in fact, i'm not working on a big big ship but on a cockpit, although i think it is the same concept for tiling.

Actually, the problem is that i've started with uvmap, for all elements that needed detail mapping and think other parts might be in pure colors, so I place all the others parts of the pit in three little squares on the uvmap, and paint them through photoshop. That's why the tiling factor is that big ! All the elements I want to tile are very very small on the uvmap, so to get the good render in 3ds, i use big factors.

The issue come from the interpretation by the freespace 2 engine of the tiling factor of the maps, considering the maps not appropriate and replacing them by average map pure color. True ?
-----------------
The Thuth is a pathless land

 

Offline Water

  • 210
I sorta think we are talking different jargon.  Tiling = repeated texture over part of the model. I'm guessing tiling factor is the scaling factor for a uv map island?

For non tiled textures (standard uv maps)
The amount of pixels an element gets on the uv map is the amount of pixels it can use on screen. Even if it is right in front of you taking up the whole screen.

 

Offline SeeNeYe

  • 25
We have fixed the missings textures issue, by making all textures 256x256 sized and reduce the tiling factor to 20 in value. We also make the little pieces tiled bigger in the uvmap (in fact we've moved them outside of the base square).

So we're seeing the maps ingame, but the problem is that the tiling factor is not taken into account during the export process. DAE file is good when reopen it trough 3ds but when loading into PCS2, we clearly see that a factor of 1 is applied to all textures.

An idea ?  :)
-----------------
The Thuth is a pathless land

 

Offline Galemp

  • Actual father of Samus
  • 212
  • Ask me about GORT!
    • Steam
    • User page on the FreeSpace Wiki
You need to scale up the UV map itself, FS will always use a factor of one.
"Anyone can do any amount of work, provided it isn't the work he's supposed to be doing at that moment." -- Robert Benchley

Members I've personally met: RedStreblo, Goober5000, Sandwich, Splinter, Su-tehp, Hippo, CP5670, Terran Emperor, Karajorma, Dekker, McCall, Admiral Wolf, mxlm, RedSniper, Stealth, Black Wolf...

 

Offline SeeNeYe

  • 25
 :( Ouch
Are you saying there is no possibility to apply a tiled texture with a factor without doing it manually ? (like the first scooby solution in this topic)

I am sad. That's bad...  :p
« Last Edit: February 12, 2009, 02:19:26 am by SeeNeYe »
-----------------
The Thuth is a pathless land

 

Offline SeeNeYe

  • 25
To clarify the purpose of our questionnings, we've done an example of what we done on our model, this is a simple cube.

thanks to have a look !

 :D

[attachment deleted by admin]
-----------------
The Thuth is a pathless land

 

Offline Vasudan Admiral

  • Member
  • 211
    • Twisted Infinities
I *think* I have a rough idea of what you're saying, and if I'm right, it's basically a misconception of how tiling vs UV mapping works. If you know this already then I apologise - but it's best to make sure, and it might help others at some point anyway. :)

Whether you are UV mapping or texture tiling a face, the data you will end up creating is EXACTLY the same: the face itself, a reference to which texture map it uses and a UV projection of that face onto a 2d plane.

Whenever you 'texture tile' a face what you're actually doing is creating a UV projection for it - except unlike in UV mapping, the program is creating a projection automatically, based on what you input as tile factor (which becomes UV projection scale) and translation/rotation.

I'll use your cube to show you what I mean:
Here the cube has been 'texture tiled' with a tiling factor of 1. You can see how the UV is projected in EXACTLY the same way as the 'UVMAP' texture on the top of your cube has been.


Here the tiling factor has been increased to about 4. All that's changed in the UV editor is that the projection of that face is four times larger than it was at 1.


So, technically there is no way FS2 CAN'T support any type of texture tiling. If the tile factor is not being preserved, then it's simply a bug somewhere in the conversion where the tiling factor is being reset to 1 before it spits out the face-texture-uvprojection data. If that is the case, you can ALWAYS fake tiling by just resizing the UV projection of those faces manually in a UV editor so it can't get 'lost'.

Hope this helps - let me know if you don't follow any aspect of it. :)
« Last Edit: February 12, 2009, 08:30:37 am by Vasudan Admiral »
Get the 2014 Media VPs and report any bugs you find in them to the FSU Mantis so that we may squish them. || Blender to POF model conversion guide
Twisted Infinities

 

Offline SeeNeYe

  • 25
 :D

Nice tuto Vasudan Amiral  :)

Thank you all for your great explanations.

Okay, i've tryed to resize directly the uv of one of the material id and it works perfectly (just tested in PCS2 so far, but i think it won't be different ingame).

I will apply this method to the other parts of the model !

« Last Edit: February 12, 2009, 09:44:39 am by SeeNeYe »
-----------------
The Thuth is a pathless land

 

Offline Vasudan Admiral

  • Member
  • 211
    • Twisted Infinities
Excellent. :)

One additional thing which I think has been mentioned already in this thread - FSO doesn't like multiple textures. It will display them fine, but switching between textures takes a relative age. So much so that using two 512 tiled textures will be slower than using a single 1024 - even though they offer only half the resolution.

To that end, if you really need to tile, I would recommend doing as Galemp and Scooby described in the first couple of posts and blend as many tile textures into one map as you can, as this will improve performance considerably for the exact same visual result.
Get the 2014 Media VPs and report any bugs you find in them to the FSU Mantis so that we may squish them. || Blender to POF model conversion guide
Twisted Infinities

 

Offline SeeNeYe

  • 25
Sure, i see the goal of all that, we'll try to bake all the tiled textures into one 1024x1024 texture maximum or maybe 512x512, as we have just 4 tiled textures of 256x256.

At the end, we will have just 2 textures for the model, one for the detail map (1024² or 2048²) and the other for the tiled stuff (512² or 1024²).

As it is a cockpit, the textures will be loaded only one time at the beginning of each mission, will it be really essential to group the 2 textures into one ?
« Last Edit: February 13, 2009, 05:22:55 am by SeeNeYe »
-----------------
The Thuth is a pathless land

 
as i understood the way freespace2 works (feel free to correct me if i'm wrong), the number a models or texture is used do not change the loading time as it is loaded one time and then repeated in game (tested with loading 1 orion in a mission and compared with 9 orion and did not see difference in the loading time).
I think it would have more impact on the framerate ingame than the loading time.
ah another thing beeing forgot :

i wish you a warm welcome to hardlight.



i think that some point that was highlighted in this thread could be wikified  :confused:
« Last Edit: February 13, 2009, 03:35:50 am by Reprobator »
$Formula: ( every-time
   ( has-time-elapsed "0" )
   ( Do-Nothing
   )
   ( send-message
      "#Dalek"
      "High"
      "Pro-crasti-nate"
   )
   )
)
+Name: Procratination
+Repeat Count: 99999999999
+Interval: 1

 
Last I remember, the game loads the textures into system memory once, however, during frame rendering, the game renders each subobject as a texture change.   I believe this is one area where they wanted to improve the performance (do a texture change [aka load into vram] once per frame).
That's cool and ....disturbing at the same time o_o  - Vasudan Admiral

"Don't play games with me. You just killed someone I like, that is not a safe place to stand. I'm the Doctor. And you're in the biggest library in the universe. Look me up."

"Quick everyone out of the universe now!"

 

Offline Water

  • 210
At the end, we will have just 2 textures for the model, on for the detail map (1024² or 2048²) and the other for the tiled stuff (512² or 1024²).

As it is a cockpit, the textures will be loaded only one time at the beginning of each mission, will it be really essential to group the 2 textures into one ?
I think you could do a good job with a 1024.  - bake the tiled stuff into that texture and mirror some parts.