Distributed light source? How?

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 May 23, 2007 10:06 pm

  • I'm making a map where large parts of the ceiling are light sources - windows or flourescents. Is there a way to create an even distribution of light from these surfaces or do I do this by spreading a large number of weak lights along this surface?
    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 May 23, 2007 10:34 pm

  • Add this to your shader: q3map_surfacelight [number]
    User avatar
    Revenant
    Alien
     
    Posts: 122
    Joined: Sat Mar 04, 2006 9:38 pm
    Location: Canada

Wed May 23, 2007 10:39 pm

  • You need to write a shader for your testure for that to work. something like:
    Code: Select all
    textures/yourfolder/yourtexture
    {
       qer_editorimage textures/yourfolder/yourtexture.tga
       q3map_lightsubdivide 8
       q3map_surfacelight 1500

       {
          map textures/yourfolder/yourtexture.tga
       }

       {
          blendfunc filter
          map $lightmap
          rgbGen identity
          tcGen lightmap
       }
    }


    save that as data/scripts/yourmap.shader and add a line with "yourmap.shader" at the end of data/scripts/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 May 24, 2007 2:57 pm

  • tZork wrote:You need to write a shader for your testure for that to work. something like:
    Code: Select all
    textures/yourfolder/yourtexture
    {
       qer_editorimage textures/yourfolder/yourtexture.tga
       q3map_lightsubdivide 8
       q3map_surfacelight 1500

       {
          map textures/yourfolder/yourtexture.tga
       }

       {
          blendfunc filter
          map $lightmap
          rgbGen identity
          tcGen lightmap
       }
    }


    save that as data/scripts/yourmap.shader and add a line with "yourmap.shader" at the end of data/scripts/shaderlist.txt

    Ok. "surfacelight" is the strength of the light, yes? How do I set the colour?
    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 May 24, 2007 6:30 pm

  • surfacelight is the strenght.. sorta. the lightsubdivide param is important too.
    q3map2 creates q3map_surfacelight strong lights on the surfance on a imaginary grid every q3map_lightsubdivide unit

    So for a smooth result use small calues for both. The smaller the grid the more lights and the longer the compiletime.

    Color is taken from the texture or from q3map_lightImage is one is given.

    http://members.lycos.co.uk/quakeroats/q ... er_manual/
    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 May 24, 2007 7:50 pm

  • tZork wrote:surfacelight is the strenght.. sorta. the lightsubdivide param is important too.
    q3map2 creates q3map_surfacelight strong lights on the surfance on a imaginary grid every q3map_lightsubdivide unit

    So for a smooth result use small calues for both. The smaller the grid the more lights and the longer the compiletime.

    Hmm.. ok.

    I put a file called "bevelpit.shader" in scripts/. The file is like this:

    Code: Select all
    textures/bevelpit/windowb
    {
       qer_editorimage textures/bevelpit/windowb.jpg
       q3map_lightsubdivide 8
       q3map_surfacelight 1500

       {
          map textures/bevelpit/windowb.jpg
       }

       {
          blendfunc filter
          map $lightmap
          rgbGen identity
          tcGen lightmap
       }
    }


    But it doesn't seem to have any effect. Do you see any obvious errors here?

    Is it case sensitive (title and / content)?

    Color is taken from the texture or from q3map_lightImage is one is given.

    http://members.lycos.co.uk/quakeroats/q ... er_manual/

    Thanks. I'll check it out.
    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 May 24, 2007 7:55 pm

  • Looks right.. and just to make sure:
    tZork wrote:save that as data/scripts/yourmap.shader and add a line with "yourmap.shader" at the end of data/scripts/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 May 24, 2007 8:49 pm

  • tZork wrote:Looks right.. and just to make sure:
    tZork wrote:save that as data/scripts/yourmap.shader and add a line with "yourmap.shader" at the end of data/scripts/shaderlist.txt
    Yeah, I did that too.

    I think I'll go open som .pk3 files and see what their shaders look like.
    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 May 24, 2007 9:29 pm

  • Clueless Newbie wrote:
    tZork wrote:Looks right.. and just to make sure:
    tZork wrote:save that as data/scripts/yourmap.shader and add a line with "yourmap.shader" at the end of data/scripts/shaderlist.txt
    Yeah, I did that too.

    I think I'll go open som .pk3 files and see what their shaders look like.


    Dammit i must have been a bit outa whack there. You should add "yourmap" to shaderlist.txt without .shader.. sorry abt that one.
    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 May 24, 2007 11:12 pm

  • tZork wrote:Dammit i must have been a bit outa whack there. You should add "yourmap" to shaderlist.txt without .shader.. sorry abt that one.

    Ok. Fixed that. Still doesn't work though.

    Just to clarify: What I'm trying to do is use a texture as a light source - not add glowmaps (cuz I already have those, and they work).
    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