-np, -shadeangle and -shade question


(QESTUDENT) #1

Hi!
I’ve been wondering ,for ages, about some sort of q3map2 options. :moo:
AFAIK, options, -np (0-360) for bsp phase and -shadeangle (0-360) for light phase, can be set for map baking.
The end result for those options seems brushes are lit like patch meshes depending on the specified angle.
It seems they do the same job as far as observation goes.
Here is a question. :???:

  1. What is the difference between -np and -shadeangle?
  2. What advantage and disadvantage can we get from each option?
  3. And what does -shade, not -shadeangle, do by itself?
    They say -shade is automatically set if -shadeangle is specified.
    But this does not necessarily prove the meaning of its existence.
    Thanks in advance.

(pazur) #2

i use -shade in the command line for compiling to enable phong shading and then i specify shadeangles in my shaders


(QESTUDENT) #3

! :eek3:
Assuming q3map_shadeangle won’t work unless -shade is specified in command line, your method seems to answer why on earth -shade is required.
I’ll check it.
Thank you. :cool:


(ratty redemption) #4

I think -shade is no longer needed during compile, we can just use q3map_shadeangle in our shaders.


(QESTUDENT) #5

Oh, really? :eek2:
Thank you for your notification.
Question 3) seems to be solved now.


(ratty redemption) #6

well I dont use the -shade compile switch, and phong shading works for me, I can tell it is, because if I lower the q3map_shadeangle to say 10, then its obvious in game as the shading is less smooth along the edges of my terrain… I usually have it set to 178 though.

edit: q3map_shadeangle also directly affects dotproduct blending, so to get smooth results with that we need quite high shadeangles.


(QESTUDENT) #7

Yes, it’s expectable shadeangle should be such high values as for terrain.
One thing curious is you set it 178 rather than 179.
Maybe, they are almost the same in the end.

Thank you for your notification about dotproduct.
I might be able to avoid sharp blending at first trial of it… some day’s story. :smiley:

BTW do you know the difference between -np and -shadeangle?


(ratty redemption) #8

One thing curious is you set it 178 rather than 179.
Maybe, they are almost the same in the end.

yep, I cant see a difference between very small values, although Im not sure why we don`t use 180? perhaps ydnar or someone else can explain?

and sorry, no idea about -np