Lighting artifacts on meshes

Post anything to do with editing Nexuiz here. Whether its problems you've had, questions, or if you just want to show off your work.

Moderators: Nexuiz Moderators, Moderators

Wed Sep 10, 2008 9:23 am

  • I've noticed that meshes often end up with odd (and ugly) areas where the lighting goes wrong. The result is a mess of dark triangles or blotches.

    Any idea what can cause this? Too many lights? Not enough lights? Too many meshes in the same map? Too large meshes? ...?
    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

Wed Sep 10, 2008 11:56 am

  • Did you try other q3map2 versions. There are several patches for it in Nexuiz svn. tZork migh have already compiled version.
    Alien
    Forum addon
     
    Posts: 1212
    Joined: Tue Apr 22, 2008 7:12 am

Wed Sep 10, 2008 3:55 pm

  • Alien wrote:Did you try other q3map2 versions. There are several patches for it in Nexuiz svn. tZork migh have already compiled version.


    I've only tried MacRadiant 1.4. Where can I get the patches that might fix this problem? How do I install them? (I'm using OS X)
    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

Wed Sep 10, 2008 6:49 pm

  • try adding "q3map_lightmapSampleOffset 8" to the shader for this surface. if it still splotches, raise that value. (don't forget to list the shader in shaderlist.txt)
    HOF:
    <Diablo> the nex is a "game modification"
    <Diablo> quake1 never had a weapon like that.
    <Vordreller> there was no need for anything over 4GB untill Vista came along
    <Samua>]Idea: Fix it? :D
    <Samua>Lies, that only applies to other people.
    User avatar
    tZork
    tZite Admin
     
    Posts: 1337
    Joined: Tue Feb 28, 2006 6:16 pm
    Location: Halfway to somwhere else

Thu Sep 11, 2008 6:26 pm

  • tZork wrote:try adding "q3map_lightmapSampleOffset 8" to the shader for this surface. if it still splotches, raise that value. (don't forget to list the shader in shaderlist.txt)


    My shader-fu is somewhat weak. How would I make a shader that does nothing but what you're saying above? This does not work (stripes2.jpg isn't rendered at all):

    Code: Select all
    textures/hookrace/stripes2
    {
       qer_editorimage textures/hookrace/stripes2.jpg
            q3map_lightmapSampleOffset 8
       {
          textures/hookrace/stripes2.jpg
          map $lightmap
          rgbGen identity
       }
    }
    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

Thu Sep 11, 2008 8:32 pm

  • something like:

    Code: Select all
    textures/hookrace/stripes2
    {
        qer_editorimage textures/hookrace/stripes2
        q3map_lightmapSampleOffset 8

       {
          map textures/hookrace/stripes2.jpg
       }

       {
          map $lightmap
          blendfunc filter
          tcGen lightmap
       }
    }
    HOF:
    <Diablo> the nex is a "game modification"
    <Diablo> quake1 never had a weapon like that.
    <Vordreller> there was no need for anything over 4GB untill Vista came along
    <Samua>]Idea: Fix it? :D
    <Samua>Lies, that only applies to other people.
    User avatar
    tZork
    tZite Admin
     
    Posts: 1337
    Joined: Tue Feb 28, 2006 6:16 pm
    Location: Halfway to somwhere else

Fri Sep 12, 2008 7:07 pm

  • tZork wrote:something like:

    Code: Select all
    textures/hookrace/stripes2
    {
        qer_editorimage textures/hookrace/stripes2
        q3map_lightmapSampleOffset 8

       {
          map textures/hookrace/stripes2.jpg
       }

       {
          map $lightmap
          blendfunc filter
          tcGen lightmap
       }
    }

    That works. Thanks. It doesn't entirely rid me of the splotches, but at least it reduces them to a tolerable level. Only thing left now is to find an optimal value for q3map_lightmapSampleOffset.
    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

Fri Sep 12, 2008 10:06 pm

  • try increasing q3map_lightmapSampleOffset to 10 and so on. the higher the value the less splotching. but it also flattens the lighting out more. as a last resort there's q3map_splotchFix but it not recommended unless nothing else works.
    HOF:
    <Diablo> the nex is a "game modification"
    <Diablo> quake1 never had a weapon like that.
    <Vordreller> there was no need for anything over 4GB untill Vista came along
    <Samua>]Idea: Fix it? :D
    <Samua>Lies, that only applies to other people.
    User avatar
    tZork
    tZite Admin
     
    Posts: 1337
    Joined: Tue Feb 28, 2006 6:16 pm
    Location: Halfway to somwhere else

Sat Sep 13, 2008 7:31 pm

  • tZork wrote:try increasing q3map_lightmapSampleOffset to 10 and so on. the higher the value the less splotching. but it also flattens the lighting out more. as a last resort there's q3map_splotchFix but it not recommended unless nothing else works.

    Hmm.. I've tried various values of q3map_lightmapSampleOffset now, and it seems that while higher values reduces blocky, unwanted shadows, it introduces unwanted lighting. Bad either way. I've set q3map_lightmapSampleOffset to 1 now. Doesn't do much, of course.

    q3map_splotchFix, as far as I could tell, did not make any difference at all. Maybe I didn't do it right.

    Well, the map is going up real soon. It has some ugly shading artifacts, but it's playable anyway.
    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



Return to Nexuiz - Editing




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