Quake3World.com Forums
     Level Editing & Modeling
        Lighting for a cel-shaded mod map


Post new topicReply to topic
Login | Profile | | FAQ | Search | IRC




Print view Previous topic | Next topic 
Topic Starter Topic: Lighting for a cel-shaded mod map

Recruit
Recruit
Joined: 22 Feb 2005
Posts: 6
PostPosted: 02-22-2005 07:10 AM           Profile Send private message  E-mail  Edit post Reply with quote


Well i started mapping due to our mod lacking a dedicated mapper and i seem to be doing okay so far. One problem though - I need to light this map in a way that will look good with the cel-shading style.

My objective was to turn that roof into a light using a shader (e.g. q3map_sun, but that looked crap as any place the sun didnt touch was pitch black)

Now the main issue is i need a better way to do this...I was thinking perhaps making an invisible and nonsolid brush emit light, but i'm unsure of how to go about that. Or even sticking with the roof shader idea, but likewise i havent found a way to get it to emit non colored light.

Light entities just leave ugly light blobs that don't fit in well with the style i'm going for

Ideally it would be great if i could have the light not actually highlighting the textures, but instead just darking through the projected shadows (if this is possible)

Anybody got any "bright" (geddit? :icon25: ) ideas? They would be greatly appreciated.

Image




Top
                 

Trainee
Trainee
Joined: 17 Feb 2005
Posts: 41
PostPosted: 02-22-2005 08:48 AM           Profile Send private message  E-mail  Edit post Reply with quote


Element4q2 wrote:
My objective was to turn that roof into a light using a shader (e.g. q3map_sun, but that looked crap as any place the sun didnt touch was pitch black)


q3map_sun for the most part is deprecated in favour of q3map_sunExt. Not sure what kind of results it would bring for a cel shaded map, but you can try it and see how it looks.
http://shaderlab.com/q3map2/shader_manual/ch3.html#sunExt

Element4q2 wrote:
I was thinking perhaps making an invisible and nonsolid brush emit light, but i'm unsure of how to go about that.


Try something like this:
Code:
// Non-drawing light emitting surface light for use as lightboxes
textures/obsidian_common/lightbox
{
   q3map_lightRGB 1 1 1
   q3map_surfacelight 5000

   surfaceparm nolightmap
   surfaceparm nonsolid
   surfaceparm trans

   qer_editorimage textures/obsidian_common/FFFFFF.tga
   {
      map $whiteimage
      alphaFunc GE128
      alphaGen const 0
   }
}


Element4q2 wrote:
Or even sticking with the roof shader idea, but likewise i havent found a way to get it to emit non colored light.


The colour of the light emitted is the average colour of the pixels of the textures when using q3map_surfaceLight. With Q3Map2 sky shaders you shouldn't need to use q3map_surfaceLight anymore. See this:
http://shaderlab.com/q3map2/shader_manual/apI.html
The colour of light is set by the R G B parameters of the q3map_sunExt. If you ever need to force the colour of any other light emitting shader, you can use q3map_lightRGB.

Element4q2 wrote:
Ideally it would be great if i could have the light not actually highlighting the textures, but instead just darking through the projected shadows (if this is possible)


Have you tried playing around with the -gamma and -compensate compiler switches?



_________________
Q3Map2 | Shader Manual | Wiki Manual


Top
                 

Recruit
Recruit
Joined: 22 Feb 2005
Posts: 6
PostPosted: 02-22-2005 09:37 AM           Profile Send private message  E-mail  Edit post Reply with quote


Thanks, i'll try out your suggestions and hope for the best :D




Top
                 

Lasery Roboty
Lasery Roboty
Joined: 07 Jun 2004
Posts: 352
PostPosted: 02-22-2005 11:33 AM           Profile Send private message  E-mail  Edit post Reply with quote


try -bounce 8 or the like maybe? Would probably eliminate the total blackness.



_________________
Give someone a program, frustrate them for a day. Teach someone to program, frustrate them for a lifetime.


Top
                 

Recruit
Recruit
Joined: 22 Feb 2005
Posts: 6
PostPosted: 02-22-2005 09:03 PM           Profile Send private message  E-mail  Edit post Reply with quote


Ok, i've got something to work from now. This seems to look like what i'm going for, just need to find a way to lighten up those shadows. I'll likely have to adjust my textures after this.

Anyway anybody care to explain how i go about using -gamma / -compensate / -bounce 8

Image




Top
                 

It felt good...
It felt good...
Joined: 28 Mar 2001
Posts: 9558
PostPosted: 02-22-2005 09:11 PM           Profile   Send private message  E-mail  Edit post Reply with quote


That looks nice! :D

Who is that person stuck in the wall there? :)




Top
                 

Lasery Roboty
Lasery Roboty
Joined: 07 Jun 2004
Posts: 352
PostPosted: 02-22-2005 10:37 PM           Profile Send private message  E-mail  Edit post Reply with quote


I failed to see this before, but I notice now its the arena from naruto :D However I remember it as more round, but oh well :D



_________________
Give someone a program, frustrate them for a day. Teach someone to program, frustrate them for a lifetime.


Top
                 

Recruit
Recruit
Joined: 22 Feb 2005
Posts: 6
PostPosted: 02-22-2005 10:50 PM           Profile Send private message  E-mail  Edit post Reply with quote


Quote:
I failed to see this before, but I notice now its the arena from naruto However I remember it as more round, but oh well


Heh, i guess that means the lighting makes it look like something now. Oh and the arena is only rounded at one end (the end behind the camera in this case :p )

Still trying to figure out this -gamma / -compensate / -bounce 8 thing.




Top
                 

Trainee
Trainee
Joined: 17 Feb 2005
Posts: 41
PostPosted: 02-23-2005 07:09 AM           Profile Send private message  E-mail  Edit post Reply with quote


Looking good Element4q2!

-bounce 8:
Adds radiosity - light "rays" will bounce a maximum of 8 times if necessary. It reduces the occurance of perfectly black shadows and takes surface colour into consideration for coloured light reflection. You can set the value of bounce to any number you like but keep in mind that larger values will result in greatly increased compile times. 8 is usually as high as you will ever need. Use a lower value (like 2) for test compiles.

Check out this screenshot that ydnar has on the front page of shaderlab.com, you can see the reflected colour cast by the red wall onto that block in the back:
Image

-gamma tweaks the overbrightbits in Q3 while -compensate corrects it. Not sure how to explain this in words (you can see the difference in some of the technical tests that ydnar posted), but it adjusts the lightmaps brightness/contrast. Generally, I start with values of -gamma 2 -compensate 4, and then play around with these to see what looks best.

Download the latest version of Q3Map2 if you haven't already, and then read the readme.txt in the zip. Lots of good info in there, though brief and technical.

Q3map2 2.5.16: http://shaderlab.com
Manual (outdated but still useful): http://shaderlab.com/q3map2/manual/
Shader Manual: (see my signature)
Q3Map2 Wiki: http://en.wikibooks.org/wiki/Q3Map2



_________________
Q3Map2 | Shader Manual | Wiki Manual


Top
                 

Recruit
Recruit
Joined: 22 Feb 2005
Posts: 6
PostPosted: 02-27-2005 06:07 AM           Profile Send private message  E-mail  Edit post Reply with quote


Thanks for the tips, the lighting looks great now :)

Oh and any mappers wanting to help us out would be great since we're pretty well established but desperately need at least one dedicated mapper (as thats our main holdback atm and i should be busy with modelling and skinning)

Just pm me or visit http://www.ninja-densetsu.com (shameless plug that is hopefully not against policy :p )




Top
                 

Recruit
Recruit
Joined: 02 Mar 2005
Posts: 1
PostPosted: 03-02-2005 04:09 AM           Profile Send private message  E-mail  Edit post Reply with quote


Hey, that map looks pretty cool, you captured it right...and yaeh I'm a pretty big fan of naruto myself. And that mod looks intresting too, but I'm sorry I can't help you out though.




Top
                 
Quake3World.com | Forum Index | Level Editing & Modeling


Post new topic Reply to topic


cron
Quake3World.com
© ZeniMax. Zenimax, QUAKE III ARENA, Id Software and associated trademarks are trademarks of the ZeniMax group of companies. All rights reserved.
This is an unofficial fan website without any affiliation with or endorsement by ZeniMax.
All views and opinions expressed are those of the author.