Glass doesn't reflect and look bad

Discussion in 'Track Modding' started by qusimano, Apr 7, 2016.

  1. qusimano

    qusimano Registered

    Joined:
    Oct 11, 2012
    Messages:
    170
    Likes Received:
    68
    Hi again guys, this time i have a problem with glass material:D
    i have modeled a little building with windows in 3ds,it is composed by 2 different object(glass and building, and i have assigned 2 different generic material, the main structure has uvwmap done and the glass not. I have exported in .3ds and imported in 3dsimed,saved as gmt, then i've applied the glass material on windows(taken from a building in portugal) but the result in game is weird: https://beta.postimg.org/image/o2r3zmtp9/
    the fence in front of the glass disappear, so something is happening, but not what i want to happen :D also the side windows has a different mapping than the front windows... do i need to do the uvw map even for the glass object?
    the material name for the windows is TSO_GLASS the object name and instance is "vetro", do I need to name the glass object in a specific way?
    Thx in advance guys, i have some other question, but for now i'll be more than happy to solve this :D
     
  2. Luc Van Camp

    Luc Van Camp Track Team Staff Member

    Joined:
    Oct 4, 2010
    Messages:
    1,030
    Likes Received:
    15
    - Set the fence to Chroma to avoid alpha soting issues.
    - Glass does need UVs like any normal material does.
    - If you copied the material from Portugal, then it uses Vertex Alpha to modulate the transparency (set Vertex Colour to a random colour and reset in order to export Vertex Alpha correctly).
     
  3. qusimano

    qusimano Registered

    Joined:
    Oct 11, 2012
    Messages:
    170
    Likes Received:
    68
    As always thx Luc one thing i don't undestrand is "set vertex colour to a random colour and reset in order to export Vertex Alpha correctly" it is something that i have to do in 3dmax?
    i set the uvw for the glass and now the texture is well placed in game, the fence are ok too with the chroma setting, but i cant find how to change this vertex colour, i found the "assign vertex colour" function.. i expect to find the classic color palette to choose from :D
    I put a screen of 3dmax pls tell me if you see something wrong https://beta.postimg.org/image/7bmjy0l2f/
    Sorry if im silly but i feel the solution its around the corner:cool:
     
    Last edited by a moderator: Apr 7, 2016
  4. Luc Van Camp

    Luc Van Camp Track Team Staff Member

    Joined:
    Oct 4, 2010
    Messages:
    1,030
    Likes Received:
    15
    That vertex colour thing is only relevant if you use the gMotor Exporter plugin (in x86 Max) :) .
     
  5. qusimano

    qusimano Registered

    Joined:
    Oct 11, 2012
    Messages:
    170
    Likes Received:
    68
    Thx again Luc, After some hours I realized that it was a problem of the model i think. I've made the windows with boolean modifiers, and i can see the reflection only if i do a "reverse face" in 3d sim ed, but then when i export the 3ds in gmt and import it in my project, the windows lose the reflection again, and in game the windows look invisible...need to restart the model i think
     
  6. Luc Van Camp

    Luc Van Camp Track Team Staff Member

    Joined:
    Oct 4, 2010
    Messages:
    1,030
    Likes Received:
    15
    Reverse Face? Hmm, when you model in Max, right click the object, Properties, enable Backface Cull?
     
  7. qusimano

    qusimano Registered

    Joined:
    Oct 11, 2012
    Messages:
    170
    Likes Received:
    68
    enabling backface cull show me that the side of the poly was fine, because disappear when i do a flip on it
    Finally i redo the model for the most part, and the problem returned, i Had to do the reverse face on the glass and then set the attribute "double sided" on true. Now i see the cubemap with the hill but cant get the sun reflect on it
    the problem is in my workflow maybe, i have 3dsmax 2014 wich is not compatible with ISI plugin, and i have to export in 3ds, and then apply material and convert in gmt with 3dsimed.
    I use boolean for carving the windows and i suspected the problem was this, so i converted the model to poly and selected the border, then i made a cap, but also with this metod the glass was on the wrong face in 3dsimed
    Anyway this is the result: https://beta.postimg.org/image/92hzomoj9/
    and the setting for glass: https://beta.postimg.org/image/617z1qrvr/
     
  8. woochoo

    woochoo Registered

    Joined:
    Nov 3, 2010
    Messages:
    1,339
    Likes Received:
    3,113
    I guess the final default debug method would be to create a 1x1 plane, apply material/ID/mapping etc, and then snap the corner verts into the corners of the window frames
     
  9. qusimano

    qusimano Registered

    Joined:
    Oct 11, 2012
    Messages:
    170
    Likes Received:
    68
    Thx for the hint woochoo, Finally i had success attaching the glass to the building and exporting as a single object with 2 material(previously the windows was detached)
    Now i can see the sun reflecting on each windows, i have to try to scale the texture, but something tell me that is better to have a single big glass for all windows instead of 7 different plane for reflection purpose(1 single sun moving on a single surface):confused:
     
  10. woochoo

    woochoo Registered

    Joined:
    Nov 3, 2010
    Messages:
    1,339
    Likes Received:
    3,113
    Someone will correct me if I'm wrong, but if I had a few buildings close by, and each had the same glass material, I probably would separate the glass in all the buildings and combine them into a single glass mesh.
    If it was a single building with multiple windows, I'd either have all the glass as a single mesh and the rest of the building as a separate mesh, or have all the building, including the glass, as a single mesh. I definitely wouldn't have a building mesh and multiple individual glass windows. Make all the glass a single mesh, and maybe attach it to the rest of the building as well.

    Again, someone might have a good technical reason for doing it one way or another, but at least multiple separate glass meshes would be inefficient in general, but probably even more so because they're reflecting.
    Hopefully that info fits your situation somehow :)

    edit: if the glass is attached to the building, and the building is casting shadows, then the glass will probably be casting shadows too, which is probably not what you want, unless it is what you want :)
     
    Last edited by a moderator: Apr 11, 2016
  11. qusimano

    qusimano Registered

    Joined:
    Oct 11, 2012
    Messages:
    170
    Likes Received:
    68
    Yes you are right, in my last experiment i noticed that,for example i tried with 3 plane for the glass instead of 7 (1 per side) and the result it's a bit better, but having the windows attached to the building as a single object lead to having the glass that cast shadows. I have to try some other things but detaching glass from building was the thing that caused all the problem in the beginning, anyway thx for the input:cool:
    PS: i noticed the same thing on a different building that i have done. if i have the elements of the building detached, i can see some elements through other, and the solution is to set double sided for that elements you can see through
     

Share This Page