Help needed with strange edges on skyboxi object

Discussion in 'Track Modding' started by CodeF1, Aug 21, 2012.

  1. CodeF1

    CodeF1 Registered

    Joined:
    Oct 5, 2010
    Messages:
    52
    Likes Received:
    0
    Can somebody give me advice on the following please.

    I have created a skyboxi object in 3dsMax by creating a cylinder with 16 sides...delete the bottom and top polygons and then flip the polygons so that the materials are on the inside. After applying the materials for each face I apply a "UVW Map" modifier using "Face mapping". The problem I am having is the little edge where the two faces meet of the two adjacent polygons, it even leaves a dark edges where it goes up in the sky. It is even more visible in the game as you can actually see a little gap. Any ideas why this is happening?

    Thanks. Screenshot-2012-08-21_07.45.37.png
     
  2. Mario Morais

    Mario Morais Registered

    Joined:
    Oct 26, 2010
    Messages:
    1,465
    Likes Received:
    169
    Try to fix smoothing groups. In editable Poly check if exist only one Element and smoothing group "1".

    Check GMT instance "Shading" smooth.

    how many materials you use?
     
  3. CodeF1

    CodeF1 Registered

    Joined:
    Oct 5, 2010
    Messages:
    52
    Likes Received:
    0
    Hmmm the smoothing groups was set at 4 - changed it to 1 and yes it is only one element. for the GMT it is set to shading as well but the problem still exists.

    I have 8 materials.

    Thanks for your suggestions Mario.
     
  4. K Szczech

    K Szczech Registered

    Joined:
    Oct 5, 2010
    Messages:
    1,720
    Likes Received:
    45
    The problem is UV mapping - you grabbed a bit too wide area of your horizon texture with UV coordinates and rightmost texels of texture pop up on it's left side and vice versa.

    In other words - texture starts to repeat itself just before the edge of polygon.
     
  5. CodeF1

    CodeF1 Registered

    Joined:
    Oct 5, 2010
    Messages:
    52
    Likes Received:
    0
    Thanks. Yes what I thought as well initially - tested it by drawing a red line on the left side one pixel wide and a green line one pixel wide on the right of the texture but still got the same effect - the red and green lines were in their place perfectly next to each other - but if I take the lines away I see the seam. One would think that if you apply face mapping that it would that the mapping would occur over the face perfectly. Will try to adjust the UV mapping.

    Thanks for the input guys.

    Oh and by the way - I enjoyed the Polish "piwo" when I visited back in 1990 :) - were there on a wrestling tour during the European Championships in Poznan.
     
  6. ethone

    ethone Registered

    Joined:
    Nov 30, 2011
    Messages:
    1,153
    Likes Received:
    37
    If it's not slight deviations in the UVW mapping perhaps it's anti-aliasing on the texture or the mip-maps? Try turning it off for the material and see if that helps you track it down.
     
  7. K Szczech

    K Szczech Registered

    Joined:
    Oct 5, 2010
    Messages:
    1,720
    Likes Received:
    45
    I live in Poznan actually, but only since 2002.

    Try disabling UV tiling in texture properties - see what happens then (if nothing then map a little bigger area to see if tiling is actually disabled). I'm still pretty sure it's about UV coordinates and texture wrapping.
     
  8. Jka

    Jka Member Staff Member

    Joined:
    Jan 31, 2011
    Messages:
    954
    Likes Received:
    213
    This is actually more likely a problem with rF2 and it has been changing little bit between different builds.

    With Botniaring (temporary) trees, this is clearly visible problem with build 101. Personally I haven't notice so much difference material anti-aliasing or mipmap settings. I haven't alter trees UVW mapping between builds. With earlier builds problem wasn't so visible as it is now.

    Cheers!
     
  9. Bink

    Bink Registered

    Joined:
    Nov 20, 2011
    Messages:
    523
    Likes Received:
    2
    ..
     
    Last edited by a moderator: Oct 18, 2013
  10. CodeF1

    CodeF1 Registered

    Joined:
    Oct 5, 2010
    Messages:
    52
    Likes Received:
    0
    Tried to I uncheck the tiling but the image goes black in Max - maybe I am understanding it wrong? See the images below.

    First one is how it looks in Max as it were. Second one the tiling is unchecked for one of the textures and the third one is the is 2 adjacent textures where tiling is unchecked. See it even shows up a white line. Funny thing is, I use those same textures on an existing skyboxi object that I have imported and it does not show those seems....got me puzzled.

    Screenshot-2012-08-22_20.16.20.png

    Screenshot-2012-08-22_20.17.00.png

    Screenshot-2012-08-22_20.17.37.png

    Thanks for the help guys.
     
  11. CodeF1

    CodeF1 Registered

    Joined:
    Oct 5, 2010
    Messages:
    52
    Likes Received:
    0
    I think I might know what is causing it...I think the problem is with the texture and how I create it in Photoshop. Will investigate and report back.
     
  12. Bink

    Bink Registered

    Joined:
    Nov 20, 2011
    Messages:
    523
    Likes Received:
    2
    ..
     
    Last edited by a moderator: Oct 18, 2013
  13. blakboks

    blakboks Registered

    Joined:
    Oct 20, 2010
    Messages:
    843
    Likes Received:
    30
    Wait...you're using multiple images? Why?

    You know you can use non-square images, so long as their dimensions are still powers of 2, right? (i.e. 4096x1024, 2048x1024, and so on...). By using multiple images, you're causing multiple draw-calls--which you/we all should be doing as little as possible. You'd be best off throwing them all into one texture, I think.
     
  14. CodeF1

    CodeF1 Registered

    Joined:
    Oct 5, 2010
    Messages:
    52
    Likes Received:
    0
    Will try that tonight and see.

    Yes I a am aware of it, did try it but can't seem to get the mapping right. Going to play with that a little bit more.

    Thanks guys.
     
  15. K Szczech

    K Szczech Registered

    Joined:
    Oct 5, 2010
    Messages:
    1,720
    Likes Received:
    45
    Actually, you can use images with non power of two dimensions - hardware is much more flexible nowadays.
    But despite it's possible I would still rather stick to power of two image sizes since they may provide slightly better performance.

    And of course you can use 4096x4096 image with four 4096x1024 images inside actually - you would just map 90 degrees of horizon on each 4096x1024 portion of this texture and get 16384x1024 image this way.


    Or you can go one better and skew your horizon like this:

    [​IMG]

    Red square shows your UV mapping - this way you can actually have 16384x1024 horizon mapped to 4096x4096 texture with full filtering because your UV mapping is continous.

    This will give you 2048 pixels per 45 degrees, so should look good even with zoomed in cameras.
     
    Last edited by a moderator: Aug 23, 2012
  16. CodeF1

    CodeF1 Registered

    Joined:
    Oct 5, 2010
    Messages:
    52
    Likes Received:
    0
    Ok tried a couple of things and I am by know means an expert in Max and need some advise please. I can get the mapping right by using separate images and use face mapping (with the seems showing of course) but how do I map one big image over all the faces for a skyboxi (cylinder)? I tried all the variation from planar to XYZ but without being able to get it to scale horizontally over all the faces - if you know what I mean. I can get it right with a planar map onto a straight piece I created with multiple faces but cannot get the same result with the cylinder.
     
  17. ethone

    ethone Registered

    Joined:
    Nov 30, 2011
    Messages:
    1,153
    Likes Received:
    37
    Have you tried UVW Mapping -> Cylindrical?
     
  18. K Szczech

    K Szczech Registered

    Joined:
    Oct 5, 2010
    Messages:
    1,720
    Likes Received:
    45
    Map it any way you want and then just edit UV coordinates manually. For just a few quads this should be easy enough.

    Cylindrical mapping may serve best as a base layout.
     
  19. Bink

    Bink Registered

    Joined:
    Nov 20, 2011
    Messages:
    523
    Likes Received:
    2
    ..
     
    Last edited by a moderator: Oct 18, 2013
  20. CodeF1

    CodeF1 Registered

    Joined:
    Oct 5, 2010
    Messages:
    52
    Likes Received:
    0
    Thanks for the advice guys - sorry didn't have time yesterday to play with it any further - will try some ideas over the weekend.

    Yes tried cylindrical mapping - actually I did get it right and feel a bit stupid now :eek: because I added the full image to one of my 8 horizon materials and forgot to assign that material to all the faces of the skyboxi, so I have been trying to map the full image basically over just 2 faces :( - still needs some fine tuning though.
     

Share This Page