Forum

Realm up on google code

Discuss anything not covered by any of the other categories.

Moderator: InsideQC Admins

Postby revelator » Mon Dec 06, 2010 1:25 am

is ok allways open for suggestions :)

svn still not working but atleast one of the options work now.
User avatar
revelator
 
Posts: 2567
Joined: Thu Jan 24, 2008 12:04 pm
Location: inside tha debugger

Postby mh » Mon Dec 06, 2010 1:32 am

Golden rule of everything - most tools are only easier if you're already familiar with them. Even if they are technically superior there is still a learning curve, and still a certain amount of having to throw away experience you've already gained and start afresh. This is quite often not a good idea.

A tool you're already familiar with is like debugged code. It may be cruddy, but damn it, it works for you, and you're not going to idly throw away debugged code, are you?

People who engage in religious wars often tend to forget this one. ;)
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

Postby revelator » Mon Dec 06, 2010 10:52 pm

true that :) personally im more used to svn which is why that was my first take (its something i know).

mercurial seems ok but i had to do quite some reading to figure out how to upload my repository :lol:

btw guess what youre looking at here :P


Image
User avatar
revelator
 
Posts: 2567
Joined: Thu Jan 24, 2008 12:04 pm
Location: inside tha debugger

Postby Sajt » Mon Dec 06, 2010 11:02 pm

reckless wrote:btw guess what youre looking at here :P


GAH! Another huge PNG screenshot!!!
F. A. Špork, an enlightened nobleman and a great patron of art, had a stately Baroque spa complex built on the banks of the River Labe.
Sajt
 
Posts: 1215
Joined: Sat Oct 16, 2004 3:39 am

Postby revelator » Tue Dec 07, 2010 12:11 am

:lol: well i could have resized it a bit ;)

notice anything strange with the nailgun :P.

small hint (sledgehammer style) bumpy bump 8)

allmost got it working only a few bizarros to get rid of (need to up the lightscale on models a bit when bumped) for some reason the code makes it pretty dark. most notably torches (kindof wierd) and the view veap.

and need to make some better code for the alias model vertex arrays atm its a bit messy.
User avatar
revelator
 
Posts: 2567
Joined: Thu Jan 24, 2008 12:04 pm
Location: inside tha debugger

Postby revelator » Wed Dec 08, 2010 8:16 pm

vis and ent file support allmost done, and fixed a small bugger with deprecation in the png loader.

gonna upload the changes soon.

with vis file support in ill turn of wateralpha by default (will be pretty akward to have an r_wateralpha cvar anyway since slime and water are the only things allowed to be transparant) instead you get the transparant water and slime if you have vis files in your game or mod dir. it wont be configurable though, and really it shouldnt be nessesary.

especially with the upcomming shader support for liquids and sky mh provided me with.

atm im toying a bit with the specular code i removed from it some time ago (newer worked right). the funny thing is that mh's Q2 engine had allmost the exact same code disabled also but i tried to enable it and it actually works there :shock:

the realm one looked like someone on LSD :P
User avatar
revelator
 
Posts: 2567
Joined: Thu Jan 24, 2008 12:04 pm
Location: inside tha debugger

Postby revelator » Thu Dec 09, 2010 12:31 am

heh seems i actually managed to get the specular code fixed.

had to look pretty hard at the tenebrae code how it was done there.

Code: Select all
void R_InitSpecularTMUs (GLenum MHGL_TEXTURE0, GLenum MHGL_TEXTURE1)
{
    // TMU0 writes the normalisation cubemap
    glActiveTexture(MHGL_TEXTURE0);
    glDisable(GL_TEXTURE_2D);

    // bind the cubemap texture
    glEnable(GL_TEXTURE_CUBE_MAP);
    glBindTexture(GL_TEXTURE_CUBE_MAP, r_normcubemap.gltexnum);

    // we use combine mode here instead of through the texture matrix.
    glTexEnvf (GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE);
    glTexEnvf (GL_TEXTURE_ENV, GL_SOURCE0_RGB, GL_TEXTURE);
    glTexEnvf (GL_TEXTURE_ENV, GL_SOURCE1_RGB, GL_TEXTURE);
    glTexEnvf (GL_TEXTURE_ENV, GL_COMBINE_RGB, GL_REPLACE);

    // basic replace texenv
    glTexEnvf (GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);

    // set flags for this TMU
    TMUFlags[MHGL_TEXTURE0 - GL_TEXTURE0] = (TMU_ACTIVE | TMU_CUBEMAP);

    // we need this so we can support drawing the cubemap only for testing
    if (!MHGL_TEXTURE1) return;

    // TMU1 holds the specular map
    glActiveTexture (MHGL_TEXTURE1);
    glEnable (GL_TEXTURE_2D);

    // allmost same as for the normal maps but we dont use the color combiners.
    glTexEnvf (GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE);
    glTexEnvf (GL_TEXTURE_ENV, GL_COMBINE_RGB, GL_DOT3_RGBA);
    glTexEnvf (GL_TEXTURE_ENV, GL_SOURCE0_RGB, GL_PREVIOUS);
    glTexEnvf (GL_TEXTURE_ENV, GL_SOURCE1_RGB, GL_TEXTURE);

    // we scaled down the specular maps when we created them so there's no need to reduce LOD
    glTexEnvf (GL_TEXTURE_FILTER_CONTROL, GL_TEXTURE_LOD_BIAS, gl_picmip.value);

    // set flags for this TMU
    TMUFlags[MHGL_TEXTURE1 - GL_TEXTURE0] = (TMU_ACTIVE | TMU_PICMIP);
}


diff from original used the texturematrix and i suspect it was not quite done enabling it made a mess of colors that changed with the playerview.

this one does much the same as the faked specular mh used instead.

one thing i noticed was that tenebrae didnt put calls to

glTexEnvf (GL_TEXTURE_ENV, GL_OPERAND0_RGB, GL_SRC_COLOR);

and

glTexEnvf (GL_TEXTURE_ENV, GL_OPERAND1_RGB, GL_SRC_COLOR);

so the original might even work with those two gone.

another thing i noticed is that tenebrae doesnt seem to bind specular to any texture besides the normal cube where the original had a seperate texnum just for that but it was uninitialized.
User avatar
revelator
 
Posts: 2567
Joined: Thu Jan 24, 2008 12:04 pm
Location: inside tha debugger

Postby revelator » Sat Dec 11, 2010 9:02 am

latest addition and damn me did it take some reading.

real specular lighting (in hardware with colors) and it works. ignore the above code. the real way to do this is 100 times harder since it requires calculating the normals to get the correct position.

i did something a wee bit hackish by using the recursivelightpoint
to get the normal and doing the specular light with glColorMaterial
but it works :).

GLSL watershaders about fracking time i got that done. many thanks to mh.

GLSL skyshaders where dropped because the current skysphere based one looks pretty much as fine as it gets without being half-life 2. :) also it would require a massive rewrite.
User avatar
revelator
 
Posts: 2567
Joined: Thu Jan 24, 2008 12:04 pm
Location: inside tha debugger

Postby revelator » Mon Apr 04, 2011 10:52 pm

no updates for some time since as some of you might know i found my dad after 38 years so its been some months worth of planning to visit him.

i returned this morning though :)

still a few things i newer got uploaded like the vis and ent support i hope to have that done by the end of the week.
User avatar
revelator
 
Posts: 2567
Joined: Thu Jan 24, 2008 12:04 pm
Location: inside tha debugger

Previous

Return to General Discussion

Who is online

Users browsing this forum: No registered users and 1 guest