Odd problem with current svn (jan 4th 2009)

Developer discussion of experimental fixes, changes, and improvements.

Moderators: Nexuiz Moderators, Moderators


  • I downloaded svn today to test the turrets, and they work just fine, but I found a strange glitch instead;

    This is what the map I'm working on looks like with the prev release of nexuiz:
    Image

    This is what it looks like with the svn version I downloaded today:
    Image

    The textures that have transparencies aren't being rendered. Setting the effects to "ultimate" made no difference. (screens were taken at minimum)

    Is this a temporary glitch in the current build? Is there a setting I've missed somewhere in the svn menus? Or…?
    2 GHz Mac Pro
    Mac OS X 10.6.2
    nvidia GeForce 8800 GT
    Clueless Newbie
    Keyboard killer
     
    Posts: 518
    Joined: Wed Jan 03, 2007 1:01 pm

Mon Jan 05, 2009 9:11 am

  • look better without the leaves on the ground anyway... :P
    just kidding. Well, they are a little bit huge those leaves...
    Asraniel
    Alien
     
    Posts: 112
    Joined: Tue Feb 28, 2006 9:15 pm

Mon Jan 05, 2009 10:52 am

  • Must be a problem of your map, as transparent shaders work on other maps.

    What is the exact shader you're using for this texture?
    1. Open Notepad
    2. Paste: ÿþMSMSMS
    3. Save
    4. Open the file in Notepad again

    You can vary the number of "MS", so you can clearly see it's MS which is causing it.
    User avatar
    divVerent
    Site admin and keyboard killer
     
    Posts: 3809
    Joined: Thu Mar 02, 2006 4:46 pm
    Location: BRLOGENSHFEGLE

Mon Jan 05, 2009 11:35 am

  • divVerent wrote:Must be a problem of your map, as transparent shaders work on other maps.

    Good. Then it should be easy to solve. :)

    What is the exact shader you're using for this texture?

    Here's the shader for the branches:

    Code: Select all
    textures/rockyhills/branch1
    {
          surfaceparm trans
       cull none
       surfaceparm detail
       surfaceparm nonsolid
       polygonOffset
       qer_editorimage textures/rockyhills/branch1.tga
       {
             map textures/rockyhills/branch1.tga
          rgbGen identity
          blendfunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
       }
       {
          map $lightmap
          blendfunc filter
          rgbGen identity
          tcGen lightmap
       }
    }


    And for the leaves on the ground:
    Code: Select all
    textures/rockyhills/leaves
    {
          surfaceparm trans
       cull back
       surfaceparm detail
       surfaceparm nonsolid
       polygonOffset
       qer_editorimage textures/rockyhills/leaves.tga
       {
             map textures/rockyhills/leaves.tga
          rgbGen identity
          blendfunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
       }
       {
          map $lightmap
          blendfunc filter
          rgbGen identity
          tcGen lightmap
       }
    }
    2 GHz Mac Pro
    Mac OS X 10.6.2
    nvidia GeForce 8800 GT
    Clueless Newbie
    Keyboard killer
     
    Posts: 518
    Joined: Wed Jan 03, 2007 1:01 pm

Mon Jan 05, 2009 12:14 pm

  • Is your tga written correctly? Can you open and save it in GIMP?

    Can you check whether other maps show up right for you? Maybe it's a problem with the Apple drivers again. Try the map "toxic" or "strength", these use alpha testing grates, and try "capturecity" or "yourewinner", these use alpha blending.
    1. Open Notepad
    2. Paste: ÿþMSMSMS
    3. Save
    4. Open the file in Notepad again

    You can vary the number of "MS", so you can clearly see it's MS which is causing it.
    User avatar
    divVerent
    Site admin and keyboard killer
     
    Posts: 3809
    Joined: Thu Mar 02, 2006 4:46 pm
    Location: BRLOGENSHFEGLE

Mon Jan 05, 2009 12:36 pm

  • divVerent wrote:Is your tga written correctly? Can you open and save it in GIMP?

    The textures were edited with Photoshop, but saved as TGA with GIMP. Your question makes me think there was nothing wrong with the shaders.. :?

    Can you check whether other maps show up right for you?

    Specced a game of Figure8Revisted just now. The swirling fog texture above the bouncies isn't rendered. Also took a look at Caverna. The transparent textures aren't rendered there either.

    Maybe it's a problem with the Apple drivers again. Try the map "toxic" or "strength", these use alpha testing grates, and try "capturecity" or "yourewinner", these use alpha blending.

    The grates were rendered on both those levels.

    Seems to me that the .tgas I make are not supported by the current svn build. Maybe a look at the grid.tga texture of Caverna or jumpflare.tga of Figure8Revisited could tell you what's wrong.
    2 GHz Mac Pro
    Mac OS X 10.6.2
    nvidia GeForce 8800 GT
    Clueless Newbie
    Keyboard killer
     
    Posts: 518
    Joined: Wed Jan 03, 2007 1:01 pm

Mon Jan 05, 2009 1:22 pm

  • I don't want to waste time on this. I am not even responsible for this any more.

    Someone else? If not, can you try to compare to the other maps (like, compare the shaders, replace the tgas to see what is at fault)?
    1. Open Notepad
    2. Paste: ÿþMSMSMS
    3. Save
    4. Open the file in Notepad again

    You can vary the number of "MS", so you can clearly see it's MS which is causing it.
    User avatar
    divVerent
    Site admin and keyboard killer
     
    Posts: 3809
    Joined: Thu Mar 02, 2006 4:46 pm
    Location: BRLOGENSHFEGLE

Mon Jan 05, 2009 1:41 pm

  • I debugged this anyway.

    Clueless Newbie, your nickname really fits you. You ARE totally clueless.

    Why did you put rubbish characters in your .shader file? When I open it in a text editor, I see:

    Code: Select all
    textures/caverna/grid
    {
    Ê Ê     surfaceparm trans
            cull none
            surfaceparm detail
            polygonOffset
            qer_editorimage textures/caverna/grid.tga
    Ê Ê{
    Ê ÊÊ Ê  map textures/caverna/grid.tga
                    rgbGen identity
                    blendfunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
    Ê Ê}
    Ê Ê{
                    map $lightmap
                    blendfunc filter
                    rgbGen identity
                    tcGen lightmap
    Ê Ê}
    }


    Do not put Ê characters in your shader files, then they will suddenly work.

    This only worked before due to an engine bug that treated all non-ascii characters as whitespace.

    Also, you are a liar, for not posting the rubbish characters in the forum here (or I would have seen it immediately).

    Or are you using a text editor that randomly inserts useless characters in your text? I do not know ANY editor that is so stupid. In that case, throw it away and get a working text editor.
    1. Open Notepad
    2. Paste: ÿþMSMSMS
    3. Save
    4. Open the file in Notepad again

    You can vary the number of "MS", so you can clearly see it's MS which is causing it.
    User avatar
    divVerent
    Site admin and keyboard killer
     
    Posts: 3809
    Joined: Thu Mar 02, 2006 4:46 pm
    Location: BRLOGENSHFEGLE

Mon Jan 05, 2009 1:53 pm

  • i suspect a text editor that has a strange tab character. Looks at least like it from the placements of those characters
    Asraniel
    Alien
     
    Posts: 112
    Joined: Tue Feb 28, 2006 9:15 pm

Mon Jan 05, 2009 1:57 pm

  • Then that text editor should get thrown where it belongs, into the shredder.

    Use a text editor that actually works. Yes, even Microsoft's Notepad isn't that bad.
    1. Open Notepad
    2. Paste: ÿþMSMSMS
    3. Save
    4. Open the file in Notepad again

    You can vary the number of "MS", so you can clearly see it's MS which is causing it.
    User avatar
    divVerent
    Site admin and keyboard killer
     
    Posts: 3809
    Joined: Thu Mar 02, 2006 4:46 pm
    Location: BRLOGENSHFEGLE

Mon Jan 05, 2009 2:25 pm

  • It's bad and it inserts BOM. Anyway, it might work correctly on mac therefore copying and pasting into a forum will paste a tab insert of that symbol.
    Alien
    Forum addon
     
    Posts: 1212
    Joined: Tue Apr 22, 2008 7:12 am

Mon Jan 05, 2009 5:13 pm

  • divVerent wrote:Clueless Newbie, your nickname really fits you. You ARE totally clueless.

    Also, you are a liar


    You're usually both polite and helpful, so I'm going to assume you're just having a bad day.

    Anyway, this might explain the problem.
    2 GHz Mac Pro
    Mac OS X 10.6.2
    nvidia GeForce 8800 GT
    Clueless Newbie
    Keyboard killer
     
    Posts: 518
    Joined: Wed Jan 03, 2007 1:01 pm

Mon Jan 05, 2009 5:30 pm

  • At least, the case is closed... :roll:
    "One should strive to achieve; not sit in bitter regret."
    WE ARE NEXUIZ.
    Image
    Image
    User avatar
    C.Brutail
    Laidback mapper
     
    Posts: 2357
    Joined: Tue Feb 28, 2006 7:26 pm
    Location: Ironforge

Mon Jan 05, 2009 5:50 pm

  • C.Brutail wrote:At least, the case is closed... :roll:

    Hopefully.

    Turns out those extra characters don't show in any of my text editors. Seems I'll have to fix this by manually deleting all the indentations in the shaders. I'll find out later if it works. If it does, I guess I'll have to do the indentations with spaces from now on.

    How does Linux and Windows handle tabs, btw? By inserting a string of blanks? Or is there a "tab" character for those platforms?
    2 GHz Mac Pro
    Mac OS X 10.6.2
    nvidia GeForce 8800 GT
    Clueless Newbie
    Keyboard killer
     
    Posts: 518
    Joined: Wed Jan 03, 2007 1:01 pm

Mon Jan 05, 2009 5:57 pm

  • Yes, iirc there's a conventional, "unix way", and the MS way (doh!). But iirc Notepad just works fine (or better, notepad++)
    "One should strive to achieve; not sit in bitter regret."
    WE ARE NEXUIZ.
    Image
    Image
    User avatar
    C.Brutail
    Laidback mapper
     
    Posts: 2357
    Joined: Tue Feb 28, 2006 7:26 pm
    Location: Ironforge

Mon Jan 05, 2009 6:41 pm

  • Clueless Newbie wrote:How does Linux and Windows handle tabs, btw? By inserting a string of blanks? Or is there a "tab" character for those platforms?


    There is a general TAB character, which has the value 9 in ascii.

    Code: Select all
          Oct   Dec   Hex   Char                        Oct   Dec   Hex   Char
          011   9     09    HT  '\t' (horizontal tab)   111   73    49    I


    The interpretation is different between editors, the original meaning was "move up to the next tab stop", which usually were 8 characters apart. Many editors interpret it as 2,4 or 8 spaces. Doesn't matter as in the worst case your file will look ugly, but still work.

    Your character has the hex value 0xca, which isn't defined in ascii and can have different meanings, depending on encoding (iso8859-1, iso8859-2, utf-8...).
    [Tue Aug 5 2008] [00:15:01] <Ronan`> RoKenn, you're an evil person :P
    Image
    RoKenn
    Alien
     
    Posts: 141
    Joined: Wed Apr 25, 2007 10:25 pm

Mon Jan 05, 2009 8:13 pm

  • C.Brutail wrote:Yes, iirc there's a conventional, "unix way", and the MS way (doh!). But iirc Notepad just works fine (or better, notepad++)

    And apparently there's also a "mac way", which isn't supported by any other platform. Live and learn, I guess.

    Well, removing all the indentations fixed the problem. Not sure it's re-upping all those old maps for, though.. ;)
    2 GHz Mac Pro
    Mac OS X 10.6.2
    nvidia GeForce 8800 GT
    Clueless Newbie
    Keyboard killer
     
    Posts: 518
    Joined: Wed Jan 03, 2007 1:01 pm

Mon Jan 05, 2009 8:16 pm

  • RoKenn wrote:Your character has the hex value 0xca, which isn't defined in ascii and can have different meanings, depending on encoding (iso8859-1, iso8859-2, utf-8...).

    THanks for the info.

    The text-editor I use for making scripts — TextWrangler — has a bazillion settings of all kinds. Hopefully, one of them will provide cross-platform tabs.
    2 GHz Mac Pro
    Mac OS X 10.6.2
    nvidia GeForce 8800 GT
    Clueless Newbie
    Keyboard killer
     
    Posts: 518
    Joined: Wed Jan 03, 2007 1:01 pm

Mon Jan 05, 2009 10:44 pm

  • Clueless Newbie wrote:The text-editor I use for making scripts — TextWrangler —


    Well, i use that editor for quite a while now, is great.
    But i had similar problems, that there were random chars insert at the begin of some php files. A ware rare problem that i cannot reproduce. Might even be a apple problem with to files that get saved to often.
    Easiest way to solve that for me is, copy hole text, make a new file, paste that text into that new file, override the old file.

    ( char-encodings are realy messy. )
    bye sYm PB

    #pb.nexuiz #nexuiz.de @ quakenet.org
    User avatar
    sYm
    Advanced member
     
    Posts: 59
    Joined: Sat Dec 30, 2006 4:27 pm

Tue Jan 06, 2009 6:49 am

  • Actually, the files do have tabs TOO. The sequence is 0xCA 0x20 0xCA 0x09, which is space, rubbish, tab, rubbish.

    Just throw away this TextWrangler thing, and use a real editor, like the vim that comes with OS X. To fix your existing files, do this:

    vim
    :e ++enc=us-ascii foo.shader

    You'll get a "conversion error" message and question marks in the text file. Delete them. Done.

    After that:

    :w

    And I really assumed that it was you inserting these characters intentionally and expecting them to work.

    It really was a bad idea to support OS X from the start. Just problems everywhere. Can't even use standard whitespace characters....
    1. Open Notepad
    2. Paste: ÿþMSMSMS
    3. Save
    4. Open the file in Notepad again

    You can vary the number of "MS", so you can clearly see it's MS which is causing it.
    User avatar
    divVerent
    Site admin and keyboard killer
     
    Posts: 3809
    Joined: Thu Mar 02, 2006 4:46 pm
    Location: BRLOGENSHFEGLE



Return to Nexuiz - Development




Information
  • Who is online
  • Users browsing this forum: No registered users and 1 guest