1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Ground polygon join grid lines

Discussion in 'GMax and 3DS Max' started by shez, 10/4/08.

  1. shez

    shez

    Joined:
    1/7/05
    Messages:
    150
    Not sure if anyone has seen this issue.

    Attached is a screenshot of a multipoly ground polygon made in gmax. The grid where the different parts of the main polygon join are showing a light coloured line along the join of the polygon.

    Does anyone have a solution to eliminate this?

    Shez
    Last edited: 30/10/12
  2. bob5568

    bob5568

    Joined:
    8/7/04
    Messages:
    1,113
    classic problem, shez..

    A variety of things have been tried. I think the concensus is that gmax dithers the edge of the texture, or perhaps the notion of mip maps is part of the picture, anyway, use of the outside pixels of the texture can cause this. I tend to add canvas to my textures by 2 or 4 pixels, duplicate the outer row and colume of pixel data, and fill the white space with that info, and then resample back to appropriate texture size. Now I can select for the texture assignment inboard of the outer row without losing any continuity between textures.

    Good luck.

    Bob
  3. Gianni

    Gianni

    Joined:
    12/6/05
    Messages:
    435
    Country:
    austria
    hi shez,

    I can confirm what Bob is saying. If you don't mind I would like to provide you with a step by step tutorial because it took me months to understand and learn the most practicable way. Maybe it is useable for you and others with the same problem.

    Let's assume that you have a ground photo with a size of 7168pxl x 3072 pxl. This represents a pattern of 7 tiles width and 3 tiles high - squared tiles with a size of 1024 pxl each. So in GMAX you would have to design 21 squared polys attached to each other with the appropriate measures where the textures will be applied.

    I would proceed as follows (with Adobe Photoshop CS2):
    (a) I choose a "fixed" rectangular frame tool with a size of 1024x1024 pxl.
    (b) Starting with the left top corner of the ground photo I copy the first part into a new file with a dimension of 1036x1036 pxl (this dimension depends on the resolution of your basic picture of course and might differ accordingly).
    (c)After pasting the picture into the newly made file you will see that it is centered with a canvas around it - fine so far!
    (d) Now add a new layer and locate it UNDER the picture. For this layer use a colour which is very close to the average pixel colour scheme of the picture (so if you had a grassy picture the most suitable colour will be a kind of green - just try it and find the appropriate colour for your own).
    (e) after having done this resize the picture to 1024x1024 pxl in your paint program.
    (f) Do this 21 times (for each texture tile in our example). Save these pictures. Leave the paint program.
    (g) Make a new material in GMAX for each picture - assign the first material to the yet made first polygon.
    (h) As mentioned by Bob in GMAX (fs2002 gamepack) you now will have to apply the texture in a way that the vertices are NOT located at the corners of the overall texture (so NOT at 0/0;0/1;1/0;1/1) - they have to be located exactly at the corners of the resized picture (use UVW mapping in the edit mode). This will be a little handwork for the first time. But the closer you are locating the vertices to the corner of the picture the less off-set you will have to expect at the end.
    (i) The advantage of this method IMHO is that you only have to do the UVW mapping once: for the first polygon! For the remaing 20 tiles you simply can clone the first polygon and need only to change the material assignment - the location of the vertices will be suitable for each material of course.

    The effect of this procedure is that the dithered edges are not a visible part of the texture in GMAX. In my opinion it is not really necessary to manually duplicate the rows of pixels into the canvas; it seems to be sufficient to have a colour in the "ancilliary" layer in Photoshop.

    So this might work. Good luck!

    greetz
    Last edited: 14/4/08
  4. Clutch Cargo

    Clutch Cargo

    Joined:
    7/3/06
    Messages:
    568
    Country:
    unitedstates
    Hey Gianni,

    Would you have a before and after screen shot by chance of your method?

    I think Shez's screenshot makes an excellent example of "What color would you choose?" Half of his ground texture is a gray tarmac and the other have is green grass? Which one would you choose? Or does it not really matter... you just need 'some' color as an additional layer?
  5. Gianni

    Gianni

    Joined:
    12/6/05
    Messages:
    435
    Country:
    austria
    Hi Clutch Cargo,

    Well, I do not have access to all of my pictures from here. But what I can contribute is a screenshot of my current project (Innsbruck/Austria/The Tirols). What you can see here is the ground made with the fs2002 gamepack. It consists of 24 tiles (constructed as described) with resized textures. The layer colour there is a pale green (nearly olive-colored). Usually I make an alpha mask in photoshop for the aprons, the runways and the taxiways (another polygon layer with high-resolution textures for concrete and asphalt is used there).

    I am not really sure whether or not it is important to find a colour which fits perfectly to the texture itself. But as I am using mip-levels for the texture it could be that (given that the alignment of the texture is not accurate at 100 pct) from a far away viewpoint the textures start to flicker. The edges then would somehow "blink" more visible and the visual effect will become more significant if the layer colour deviates too much from the texture colour.

    It is just a theory - but it works fine for me.

    [​IMG]

    greetz
    Last edited: 15/4/08
  6. PakMac

    PakMac

    Joined:
    22/1/05
    Messages:
    454
    Country:
    england
    Hi Gianni,

    Regarding the flickering
    (1) Have you tweaked the asm file.
    (2) Has the ground been flattened to the dimensions of your ground polyon.

    Also read this . It's the way we solved our flashing texture problem.

    David
  7. Gianni

    Gianni

    Joined:
    12/6/05
    Messages:
    435
    Country:
    austria
    Hi David,

    perhaps "flickering" was not the right expression. I meant that although I did the whole tweaking stuff and flattened the ground from a certain distance (and only sometimes) the edges of the tiles become visible. My feeling is that this might have something with the mip-maps in the textures. And funny thing - this happens only sometimes; perhaps it depends on the period of the moon or something else ;). I don't know.

    But thank you for the hint for the tweak in the asm_0 file. I will give it a try.
  8. shez

    shez

    Joined:
    1/7/05
    Messages:
    150
    Gianni,

    This is very interesting. Let me go through this and try and figure it out with your methodology. Looks complicated so may have questions.

    Thanks

    Shez

Share This Page