xrayjay wrote:Guess you can´t fix this, some textures are "fixed" to an axis (f.e. all the ...pxz ones works only on one axis and if you turn the object the texture will look deformed/ugly), guess the TechWall is fixed to the x axis, may you have to look for an alternative texture. Or try to unwrap your parts to that texture, may this solves this here.
(or there´s an work around for that and i didn´t know it^^ this appears on all titles with some textures also)
Maybe not the right thread but i think it would be really nice if Nadeo could shed some light on this "texture projection" topic. Why are there materials that only work on vertical or horizontal faces but some materials work on both, why not make all materials work on both, maybe performance?
Is it possible to fix with some settings in Blender or through UV mapping?
A bit short information would help a lot and also would be interesting.
Why not make materials work on all directions?
It is indeed for performance, and technical limitations, making it work implies that the shader would be a lot more complex (this is Luckyboy's part here, i won't enter in details because I maight say wrong things), maybe the geometry would have to be drawn many times.
But the art team also dream of this magic material.
We have one almost working in every directions, for storm/canyon cave roofs, but because of how the lightmap system works, we still have to switch to the vertical one as soon as possible.
The "UV in World" materials are used for big surfaces, often used for natural surfaces such as dirt, grass or cliff, it allows to have continuity of pixels on the geometry, whatever you do, and to blend controlled (UV1) textures on top of these (transition from road to dirt for exemple).
For Trackmania Original and Sunrise, only the ground material was using UV coordinates in world.
Cliffs were using UV1, and we had to do tricks such as Mirroring UVs to avoid stretching or ugly UV seams. If you look at the Snow mountains, you'll see a lot of rorschach monsters ^_^.
We still have these mirror monster faces on the little transitions between materials, because as they use UV coordinates, we need to use the same trick.
Another bonus of world coordinates is you can have the texture repeat itself at another frequency than the block grid, so the same block placed at 2 different places won't look the same.
We applied this system to big surfaces of concrete for the Canyon's Dam, or big surfaces of Metal/Bricks to storm.
If we use the standard UV1 method for these, we have to deal with the tiling of the texture on the borders of the blocks, and this is really visible and counter natural visual effects such as stains, that span across multiple blocks.
Also, it makes the creation of some blocks faster, because making good UV1 is time consuming (no strecthing, no seams).
This allowed us to have perfect tree trunk cylindrical texturing in storm, (excepted on horizontal branches).
If a block is part of a collection used to build big surfaces (castle walls, arena floors, etc..), it's better to use World Coordinates materials.
If a block is part of a collection of modular technical elements (roads, bridges, beams, etc..) it's better to use UV coordinates.
In the previous example, platform would have been the right choice, or MetalCover.
maxi031 wrote:Hope i am not far from topic.
I did some editing on lib file and discovered that you can construct your own material inside of lib as long as it follows special lib syntax and is using game textures.
Lets say textures for your material are PlatformD.dds, PlatformS.dds and PlatformN.dds, you can than add material to lib like this:
Thanks Fix for information.
Its good to know that there are indeed materials that do not work (look ugly) on certain geometry but others work on almost every geometry (the "UV in world coordinates" ones if i understood correctly).
A complex topic so we have to do a bit try and error when making things i guess
I had a problem with shadows too, with my giant moutain item.
→ http://puu.sh/dKxe4/ab727a7d5f.png
Shadows are particularly dark. (when shadows are computed in Ultra)
@Nerpson
You´ve just got tooooo much verts/faces etc., 262 144 verts are way to much imo (and this is only the "low" variant^^)
And it´s kind of displaced, means the 0 point is somewhere outside your object. May you should try to reduce the overall count of verts/faces and place this whole thing correct, reset the location/rotation/scale to 0, set the shading to smooth and make your object way smaller (now its 1700x1700x271 in blender size count). This all will reduce the overall filesize, you can set the size later inside the MeshParams way easier than make your object 1:1.
Imo you can realize these kind of mountains with less verts/faces and it will also looks nice and smooth, it´s just to much "HD" now
In general it´s imo the best to keep the verts/face count as low as possible
Paste this in Storm lib and it should work as valid game material.
Thanks for this hint, i'll try to do my own library with this (makes it very easy to combine different Textures with SurfaceIds)
Although it's not working for me
I created the new Material "TechWallStone" and the only thing i changed was the Surface Id
The result ingame is that i get only a grey texture.
I also tried to add a line with a BaseMaterial, but i got the same result and 1 time the Importer crashed...