Realm up on google code
Moderator: InsideQC Admins
24 posts
• Page 2 of 2 • 1, 2
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.
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
We knew the words, we knew the score, we knew what we were fighting for
-

mh - Posts: 2292
- Joined: Sat Jan 12, 2008 1:38 am
notice anything strange with the nailgun
small hint (sledgehammer style) bumpy bump
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.
-

revelator - Posts: 2567
- Joined: Thu Jan 24, 2008 12:04 pm
- Location: inside tha debugger
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
the realm one looked like someone on LSD
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
the realm one looked like someone on LSD
-

revelator - Posts: 2567
- Joined: Thu Jan 24, 2008 12:04 pm
- Location: inside tha debugger
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.
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.
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.
-

revelator - Posts: 2567
- Joined: Thu Jan 24, 2008 12:04 pm
- Location: inside tha debugger
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.
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.
-

revelator - Posts: 2567
- Joined: Thu Jan 24, 2008 12:04 pm
- Location: inside tha debugger
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.
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.
-

revelator - Posts: 2567
- Joined: Thu Jan 24, 2008 12:04 pm
- Location: inside tha debugger
24 posts
• Page 2 of 2 • 1, 2
Who is online
Users browsing this forum: No registered users and 1 guest
