Announcement

Collapse
No announcement yet.

UE2004 (Unreal Level Editor 2004) Terrain texture layers dotted

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • UE2004 (Unreal Level Editor 2004) Terrain texture layers dotted

    Hi people of oldschool!
    Today i ran into another interesting issue, maybe some of you got that once and managed to resolve:

    Click image for larger version  Name:	AzOQ6u0.png Views:	1 Size:	575.3 KB ID:	405684
    Click image for larger version  Name:	Tb7ucj3.png Views:	1 Size:	742.4 KB ID:	405685


    The terrainsize is 128x128
    Sector size is 16 ( I tried 8 and 2 and 32 and 64, that option doesnt seem to do anything )
    I tried to work with 128x128, 256 and 512 texture and also tried when making a new layer choosing the right width and height of the alpha according to the texture's dimensions.
    Creating entirely new terrain in a new project causes the same issue, i even followed 2-3 tutorials out there step by step 1:1 exactly with exact same size'd textures and format.
    This seems to be that the alpha isnt scaled properly, but i did not see any alpha nor i made any, just imported a texture and made a new layer with correct settings (played around there alot)

    I also took someone elses terrain, it copied everything in, and its working normally. Then I created one exactly with same settings (even compared both terraininfo actors) and used same texture, and it started to appear. Is my editor bugged if I use "new" terrain and im stuck with using someone elses?

    Any idea what is causing it?
    Thanks
    Last edited by Coffeediction; 05-31-2019, 05:03 PM.

  • replied
    Oh noes!! Not again!! TERRAIN!!!

    One of the things I never understood how to do properly, if you could take some time to explain like you are explaining to a complete n00b then I would be really grateful!

    I want to understand everything about terrain without having to go through old-deleted-google-indexed pages or non-existent Wikis....

    Leave a comment:


  • replied
    Originally posted by meowcatbuf View Post
    Hi Coffeediction. Yup, you got it. When creating in game terrain there are basically 3 elements:
    1. The G16 terrain vertex height map "texture" (typically 64x64, 128x128, 256x256, or 512x512... I've seen some that are 1024x2014 but not frequently)
    2. The layer "paint maps" that should match the the resolution of the terrain (these are the "AlphaMap" property of each "layer" in the TerrainInfo actor). Although you typically see these as a grayscale RGBA texture in UEd, actually only the 'A' channel of the texture (alpha transparency value) is used, and each pixel in this texture corresponds to the corresponding vertex/height pixel in the terrain G16 height map (#1 above).
    3. The actual textures applied to each painted layer. These can be any texture ("materials" don't always work on terrain properly in my experience... though some simple shaders might...). The resolution of these can be whatever UEd supports.

    Here is the old UDN Two terrain tutorial homepage if you have not already had a chance to check it out (though even there, I'm not sure that they make clear that the terrain map and layer alpha maps have to be the same resolution).
    Yep I got all 3 points now.
    The site im aware of too, it is described wrong, it states
    "AlphaHeight & AlphaWidth - It is very important to make sure that these values match the dimensions of the texture you are using. Otherwise, the texture may only appear as spots on a regular grid."
    But should say
    "AlphaHeight & AlphaWidth - It is very important to make sure that these values match the dimensions of the terrain you are using. Otherwise, the texture may only appear as spots on a regular grid."
    Now it would make sense for "Creating a terrain", but its stated under new layers.

    One question though, what does TerrainSectorSize do? Altering it doesnt seem to change anything, I was actually looking for TerrainResolution. Some people mentioned that its possible to change the terrain resolution (give more polygons to the same terrain size), but they dont remember where ._.
    My problem with it is that the size of each polygon on the terrain is too big to have fine adjustment for a small walkway for example. Any option doesnt seem to affect anything nor the UDN / some other pages mention it, im starting to think its impossible. Appreciate it!

    EDIT: XSize & YSize apparently is not the terrainsize, its heightmap resolution, 1 pixel = 1 quad(2 tris) on the terrain. Which means, the size of the terrain is set in the terrainsettings (which i was wondering why i was able to adjust it afterwards), so those 2 things are completely different.
    I think i got my answer then, terrainresolution is the heightmaps resolution, old, simple. Now I have to recreate the whole thing, since i used 64x64, and the layers are also 64, cant rescale now, whole thing has to be remade -_-
    If im wrong somewhere, please let me know.
    Last edited by Coffeediction; 06-03-2019, 01:57 PM.

    Leave a comment:


  • replied
    Hi Coffeediction. Yup, you got it. When creating in game terrain there are basically 3 elements:
    1. The G16 terrain vertex height map "texture" (typically 64x64, 128x128, 256x256, or 512x512... I've seen some that are 1024x2014 but not frequently)
    2. The layer "paint maps" that should match the the resolution of the terrain (these are the "AlphaMap" property of each "layer" in the TerrainInfo actor). Although you typically see these as a grayscale RGBA texture in UEd, actually only the 'A' channel of the texture (alpha transparency value) is used, and each pixel in this texture corresponds to the corresponding vertex/height pixel in the terrain G16 height map (#1 above).
    3. The actual textures applied to each painted layer. These can be any texture ("materials" don't always work on terrain properly in my experience... though some simple shaders might...). The resolution of these can be whatever UEd supports.

    Here is the old UDN Two terrain tutorial homepage if you have not already had a chance to check it out (though even there, I'm not sure that they make clear that the terrain map and layer alpha maps have to be the same resolution).

    Leave a comment:


  • replied
    Originally posted by meowcatbuf View Post
    Hi Coffeediction,
    That error occurs when the size of the layers does not match the size of the terrain (e.g. with a 128x128 terrain map, each layer, which should be created by using the "New..." button in the terrain editor, should also be 128x128). If you import a pre-created layer "alpha map" texture from a separate program (PhotoShop, PaintShopPro etc.) the file's resolution should match the terrain's size. The actual "texture' applied to a given layer can be any supported resolution, how many times it "tiles" (scales on the terrain) is adjusted via the UScale and VScale properties.
    Wait.. it totally fixed it, you are my hero!
    So when i create the terrain, the X and Y are supposed to be equal to the layers Im making, means terrain 128, and layers 128? (That info was took out of every single tutorial, they even mention that the X and Y while creating the terrain is the size of the terrain, but not its sectors...(which was weird because he mentioned that the numbers are small, and it means X or Y 1 = 255 units size of the terrain)
    Therefore misinforming that terrain X and Y values are the size of the terrain.

    I just imported a 1024 texture on a 64x64 layer and its working so far.
    If I understood correctly you mean alphas as extra "alpha" (black/white) to work with has to be the same size as we cannot adjust it in the editor.
    Which means if I dont work with pre-created ones, and just use diffuse, any resolution is ok.
    I hope I understood you correct.

    Just wondering, is it backwards compatible, cause from some tutorials they make a 128 size terrain, and 64 layer, it works, but not with 256 and up. I just didnt think it was something worth trying because "64 and 128" ive seen as "resolution" of the texture, which means I was thinking more modern = pixelated textures. But is had nothing to do with the resolution of texture at all, only alpha.
    Thanks a lot! I mean it. Have an awesome day
    Last edited by Coffeediction; 06-01-2019, 06:12 AM.

    Leave a comment:


  • replied
    Hi Coffeediction,
    That error occurs when the size of the layers does not match the size of the terrain (e.g. with a 128x128 terrain map, each layer, which should be created by using the "New..." button in the terrain editor, should also be 128x128). If you import a pre-created layer "alpha map" texture from a separate program (PhotoShop, PaintShopPro etc.) the file's resolution should match the terrain's size. The actual "texture' applied to a given layer can be any supported resolution, how many times it "tiles" (scales on the terrain) is adjusted via the UScale and VScale properties.

    Leave a comment:

Working...
X