#low@irc.freenode.net logs for 30 Oct 2003 (GMT)

Archive Today Yesterday Tomorrow
LoW homepage


[00:32:55] <-- servus has left IRC (Read error: 104 (Connection reset by peer))
[01:21:39] --> servus has joined #low
[06:59:08] --> Coren_ has joined #low
[06:59:08] --- ChanServ gives channel operator status to Coren_
[07:01:15] <Coren_> Just finished remastering the uw2 music. My old mp3s taken by capturing the analog audio out of my old lapc-1 with too much reverb sucked. :-)
[07:01:32] <Coren_> http://tab.ctrl-alt-del.ca/~marc/uw2music
[07:01:39] * servus steals your bandwidth
[07:02:06] <servus> wget --recursive -np http://tab.ctrl-alt-del.ca/~marc/uw2music/ :)
[07:02:18] <Coren_> As for the bumpmapping... just the same dot3 that I used for normal, only rather than the plane normal being used as the constant color I use a normal map in the previous texture unit.
[07:02:38] <servus> So you do it face by face
[07:02:46] <servus> And it's a hack.
[07:03:16] <Coren_> The normal map is just textured on the face in the texture unit before the dot3, otherwise it's the same code you saw basically.
[07:03:19] <servus> The two stipulations I've made for myself are 1. I can only change texture states at the start of a render, because I render through vertex arrays and 2. I want "real" bumpmapping
[07:03:33] <Coren_> My bumpmapping is exact
[07:03:51] <servus> Hmm
[07:04:05] <Coren_> But I do have to apply a rotate to one of the texture matrices for every plane (not face).
[07:04:19] <servus> Yeah... I'm thinking of a clever way to get around that...
[07:04:41] <servus> I'd like to stick with only 3 TUs... (base texture, normal map, light vector)
[07:05:33] <Coren_> I do it with 3; but I need one pass per light for every plane. In practice, few surfaces get hit by more than one light so that's not too painful.
[07:06:01] <Coren_> Only two units if you're willing to deal with non-colored light.
[07:06:21] <servus> I render the entire scene once for each light, plus 1 for ambient light.
[07:06:42] <servus> That's how carmack does it, though! *grin*
[07:07:51] <servus> ...and you dot the normal map with the vector of light->facecentroid?
[07:07:57] <Coren_> Hm, well, as a side effect of my portal system I can restrict the rendering to the very restricted intesection of lighted/visible planes.
[07:08:01] <Coren_> At no cost. :-)
[07:08:42] <Coren_> No, the normal map is dotted with my 3d denormalized vector map centered on the lightsource. That's the clever part. :-)
[07:09:38] <servus> Well, I'll just use the light attenuation as an extra factor when travelling the node visibility web
[07:10:19] <servus> I think I'll add some sort of BSP-ishness to the node web, so that I don't compute things on the other side of an inactive node
[07:12:36] <Coren_> Oh, and the normal map is not transformed; I just rotate the lightvector texture to face the plane.
[07:12:53] <Coren_> So that ( 0 0 1 ) faces the light.
[07:12:54] <servus> Yepyep
[07:13:20] <servus> I'm just wondering of a clever way to account for faces with different normals in the vertex array
[07:13:34] <Coren_> So; for me; normal map; dot3; light color+texture
[07:13:41] <servus> I'm thinking of having a tiny tiny normalmap texture for each face... *shivers*
[07:14:17] <Coren_> You're doing curved surfaces?
[07:14:44] <servus> Inasmuch as most of my objects are not flat sheets of paper (though it's all polygonal...)
[07:15:03] <Coren_> Hrm.
[07:15:19] <servus> A vertex program??
[07:15:30] <servus> I could change the colour of that vertex to be its normal!
[07:15:41] * servus is on to something
[07:15:44] <Coren_> Short of using fragment programs, I see no way to keep using the vertex array.
[07:15:52] <servus> I just got it. :)
[07:16:04] <Coren_> Yes, but if you use vertex programs you cut yourself off most users. Including yourself. :-)
[07:16:12] <servus> Furthermore, I only need 2 TUs (1 is base texture)
[07:16:20] <servus> Vertex programs? You are mistaken
[07:16:28] <Coren_> I meant fragment
[07:16:33] <servus> GL_ARB_vertex_program is widely supported
[07:16:35] <servus> Vertex program
[07:16:38] <servus> I don't need a fragment
[07:16:56] <servus> All copolygonal fragments have the same normal, as described by the vertices...
[07:17:21] <servus> I simply set my secondary colour to the face normal
[07:17:41] <Coren_> Erm, bedtime.
[07:17:52] <servus> That way, I will GL_DOT3_RGB_ARB with TU1 (the normal map) and the primary colour, which will shift and shift and shift!
[07:17:58] <servus> s/primary/secondary
[07:18:01] <servus> Alright, but do you see?
[07:18:05] * servus is proud of himself
[07:18:20] <Coren_> Yes, but then you can't combine with an actual normal map without transforming it (expensively) woth a fragment program.
[07:18:47] <servus> Nopers.
[07:18:57] <Coren_> Bedtime for real.
[07:19:04] <servus> The vertex program will make the secondary colour into a transformed normal
[07:19:07] <Coren_> Keep talking, I'll read the log
[07:19:10] <servus> I only use one light, so that's not a problem.
[07:19:13] * Coren_ smiles.
[07:19:13] <servus> Alright, g'night
[07:19:15] * Coren_ is away: sleep
[07:24:13] <servus> Here's the sketch:
[07:24:14] <servus> TU0: Base texture
[07:24:14] <servus> TU1: Normal Map
[07:24:14] <servus> Vertex colour: Vertex program makes this into into a transformed light vector.
[07:24:16] <servus> The GL_DOT3_RGB_ARB combiner will take TU0 as GL_REPLACE, TU1 as GL_SOURCE0_RGB_ARB(GL_TEXTURE) for GL_DOT3_RGB_ARB, and Colour as GL_SOURCE1_RGB_ARB(GL_PRIMARY_COLOR_ARB) for GL_DOT3_RGB_ARB
[11:32:56] <-- servus has left IRC (Read error: 60 (Operation timed out))
[17:01:43] * Coren_ is back
[18:10:19] <-- Coren_ has left IRC ("BBL")
[20:41:24] --> Coren_ has joined #low
[20:41:24] --- ChanServ gives channel operator status to Coren_