looking at the native Coriolis station, I'm trying to figure how
to tile my textures in Oolite... however...
My attempts so far are not going very well, I tried several different
things by using educated guessing while looking at the Coriolis dat file. But
either my result is Equal to a non tiled version or they get stretched...
So if anyone knows how to then you are much welcome to tell me how exactly. from wings or 3dmax, to the finished product in Oolite Please ..
Textures in Oolite use CLAMP or CLAMP_TO_EDGE mode (depending on availability) by default. To enable tiling, you need to use a texture specifier with repeat_s and repeat_t set to true. (The built-in Coriolis doesn’t tile the texture. Texture specifiers are a test release feature.)
Textures in Oolite use CLAMP or CLAMP_TO_EDGE mode (depending on availability) by default. To enable tiling, you need to use a texture specifier with repeat_s and repeat_t set to true. (The built-in Coriolis doesn’t tile the texture. Texture specifiers are a test release feature.)
Welcome back Big A. & Thanks
not tiled Really ?, gotta have to take a 2nd look, because I could swear they are... Doh.. ofcourse it just dawned at me how it was made to appear that way.. manual projection pr side.
oh dear,repeat_t and _s I actually knew/know of this, but when I read this the first time, I had 1.72.2, So I forgot about it.
I just wonder about the texture entries In new_coriolis.dat then..
I would have expected values of less than 1 and the second and third token "256 256" ,seems to be indifferent, at least when you read the python script, that defaults to just put 1.0 1.0.. ("which ofcourse i modified to try at archive tiling"
I would have expected values of less than 1 and the second and third token "256 256" ,seems to be indifferent, at least when you read the python script, that defaults to just put 1.0 1.0.
These things are related. The second and third column specify the t and s scales of the texture coordinates, so the coordinates on, say, the first line are (0/256, 0/256), (0/256, 128/256), (128/256, 0/256).
Oddly enough, i just found this bit of code the other day in an example shader in AMD's Rendermonkey, they were using it there to tile a small 256x256 pixel normal map over the surface of a car model to create to 2tone metallic paint effect, i couldn't really follow all their code but the tiling the texture part seems suspiciously easy, you just have to multiply the texture co-oords from the vertex shader by a big number, the bigger the number the small each texture tile is
eg, this is done in line 28 of the fragment shader in the oxp i uploaded, i'm multiplying the texcoords by 8
vec4 colorMap = texture2D(tex0, texCoord.st * 8.0); // multiply the texcoords by 8.0 to tile them, experiment with different values, bigger numbers make smaller tiles
It's a floating point number so don't forget to put a decimal point in it otherwise the shader will assume it's an integer and it will fail to compile.
edit: oops, that stuff with the texcoords in the dat file wasn't there when i posted this, now i look like a twit
Ahh Thanks Griff. nice find, and thank you for posting.
That was exactly what I was looking for.. It looks way better now.... had to scale it down a bit to 0.5, see the station is twice as large as the standard Coriolis station. Naturally the texture got more strechted so i wanted to prevent that
However, then we are back to this would only work on machines that support shaders. ( catch up intel dammit)
Tiling should really also be possible via materials, and I find it difficult
to getting Oolite it to accept tiling via materials using repeat S & t