Forum

What are you working on?

Discuss anything not covered by any of the other categories.

Moderator: InsideQC Admins

Re: What are you working on?

Postby mh » Fri Feb 13, 2015 1:47 pm

qbism wrote:q2bsp vs q3bsp - q2bsp lighting is additive, q3 is a multiplier. The q3 method is faster but dynamic lighting fails in dark areas. Anything x 0 = 0.

That's not really a feature of the BSP format though. Additive dynamic lighting could be added to Q3 in engine code.
We had the power, we had the space, we had a sense of time and place
We knew the words, we knew the score, we knew what we were fighting for
User avatar
mh
 
Posts: 2292
Joined: Sat Jan 12, 2008 1:38 am

Re: What are you working on?

Postby Barnes » Sat Feb 14, 2015 7:34 am

qbism wrote:q2bsp vs q3bsp - q2bsp lighting is additive, q3 is a multiplier. The q3 method is faster but dynamic lighting fails in dark areas. Anything x 0 = 0.

Khm q2 use multiplying lightmaps blending (in gl)
User avatar
Barnes
 
Posts: 226
Joined: Thu Dec 24, 2009 2:26 pm
Location: Russia, Moscow

Re: What are you working on?

Postby qbism » Sat Feb 14, 2015 4:18 pm

q1+q2: The light map is ADDED to the texture map to produce shading.
q3: The light map is MULTIPLIED with the texture map to produce shading.
So it takes a lighting tool change as well to flip from one type to the other?
User avatar
qbism
 
Posts: 1236
Joined: Thu Nov 04, 2004 5:51 am

Re: What are you working on?

Postby Spike » Sat Feb 14, 2015 4:46 pm

qbism wrote:q1+q2: The light map is ADDED to the texture map to produce shading.

that would make dark areas impossible.
q1+q2 support multiple lightstyles per surface. the multiple lightmaps per surface are added together and then the result of that is multiplied with the wall texture's colour (traditionally via the colourmap).
q3 doesn't support lightstyles, so it can skip the add part and go straight to multiplying. the result is the same.
there is a difference when it comes to dynamic lights, in that q3 does everything in the framebuffer instead of by editing the lightmaps, and thus they are typically additive (and untextured due to trying to not depend upon multitexture).
Spike
 
Posts: 2892
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Re: What are you working on?

Postby Barnes » Sat Feb 14, 2015 4:56 pm

There are debug tools gl_saturatelighting (additive if 1) gl_monolightmap with values I, L (multiplication), A (alpha blending)
otherwise, multitextured or 2-pass, there is multiplicative blending of a lightmap into diffuse texture

if ( qglMTexCoord2fSGIS )
{
GL_EnableMultitexture( true );

GL_SelectTexture( GL_TEXTURE0_SGIS );
GL_TexEnv( GL_REPLACE );
GL_SelectTexture( GL_TEXTURE1_SGIS );

if ( gl_lightmap->value )
GL_TexEnv( GL_REPLACE );
else
GL_TexEnv( GL_MODULATE );

R_RecursiveWorldNode (r_worldmodel->nodes);

GL_EnableMultitexture( false );
}
else
{
R_RecursiveWorldNode (r_worldmodel->nodes);
}
User avatar
Barnes
 
Posts: 226
Joined: Thu Dec 24, 2009 2:26 pm
Location: Russia, Moscow

Re: What are you working on?

Postby Barnes » Sat Feb 14, 2015 5:01 pm

explosion decals are now projected to 6 sides of the cube instead of just the frontal direction
Image
User avatar
Barnes
 
Posts: 226
Joined: Thu Dec 24, 2009 2:26 pm
Location: Russia, Moscow

Re: What are you working on?

Postby qbism » Sat Feb 14, 2015 5:07 pm

Spike wrote:the multiple lightmaps per surface are added together and then the result of that is multiplied with the wall texture's colour

That's what I should have said. :oops:

Barnes, I didn't know about the additive debug mode. Anyway, nice decals. It looks like they wrap properly around the "outside corner" but do not align on "inside corner".

The qfmap complier from the qfusion project brings back q1/q2 additive lightstyles to engines that support that format.
User avatar
qbism
 
Posts: 1236
Joined: Thu Nov 04, 2004 5:51 am

Re: What are you working on?

Postby Barnes » Sat Feb 14, 2015 5:41 pm

qbism wrote:
Spike wrote:the multiple lightmaps per surface are added together and then the result of that is multiplied with the wall texture's colour

That's what I should have said. :oops:

Ah, yes, now we have no misunderstandings :)
User avatar
Barnes
 
Posts: 226
Joined: Thu Dec 24, 2009 2:26 pm
Location: Russia, Moscow

Re: What are you working on?

Postby Barnes » Sat Feb 14, 2015 5:45 pm

qbism wrote:Anyway, nice decals. It looks like they wrap properly around the "outside corner" but do not align on "inside corner".

Sometimes looks good, sometimes very good, but it is not good. Basically we have a good result :)
User avatar
Barnes
 
Posts: 226
Joined: Thu Dec 24, 2009 2:26 pm
Location: Russia, Moscow

Re: What are you working on?

Postby Spiney » Sun Feb 15, 2015 1:41 pm

qbism wrote: Anyway, nice decals. It looks like they wrap properly around the "outside corner" but do not align on "inside corner".


Remembers me of this Wolfire post. Seems much more involved though, and no example code :(
Spiney
 
Posts: 63
Joined: Mon Feb 13, 2012 1:35 pm

Re: What are you working on?

Postby Barnes » Sun Feb 15, 2015 3:11 pm

is another technique (projected texture).
User avatar
Barnes
 
Posts: 226
Joined: Thu Dec 24, 2009 2:26 pm
Location: Russia, Moscow

Re: What are you working on?

Postby mankrip » Thu Feb 19, 2015 1:20 am

That's pretty cool Barnes. Good decals always impress me.

As for me, I've managed to implement a "dithering" effect on the particles. However, it's not a filter and it doesn't use the kernel matrices — it's a completely different approach. Everything in it is precalculated, and due to the reduced number of writes to the buffers, the impact on the framerate should be negligible.

The code still needs a good amount of cleanup and optimizations, and the translucent particles version will be implemented after that.

Also, no screenshot yet because I'm with very limited Internet access. Whoohoo!
Ph'nglui mglw'nafh mankrip Hell's end wgah'nagl fhtagn.
==-=-=-=-=-=-=-=-=-=-==
Dev blog / Twitter / YouTube
User avatar
mankrip
 
Posts: 915
Joined: Fri Jul 04, 2008 3:02 am

Re: What are you working on?

Postby Barnes » Fri Feb 20, 2015 6:07 am

Screen Space Local Reflection (early alpha testing)
reflections with out fps drop

Image Image Image Image Image Image Image Image Image Image
User avatar
Barnes
 
Posts: 226
Joined: Thu Dec 24, 2009 2:26 pm
Location: Russia, Moscow

Re: What are you working on?

Postby Barnes » Fri Feb 20, 2015 7:03 pm

User avatar
Barnes
 
Posts: 226
Joined: Thu Dec 24, 2009 2:26 pm
Location: Russia, Moscow

Re: What are you working on?

Postby hogsy » Sat Feb 21, 2015 2:18 am

Image
User avatar
hogsy
 
Posts: 198
Joined: Wed Aug 03, 2011 3:44 pm
Location: UK

PreviousNext

Return to General Discussion

Who is online

Users browsing this forum: No registered users and 1 guest