tag:blogger.com,1999:blog-6829904489614710740.post5112401803933991157..comments2023-04-05T17:57:40.716+08:00Comments on My Pseudocode Life: LO-SL BRDF Explained...John David Bonifacio Uyhttp://www.blogger.com/profile/04108888915485048942noreply@blogger.comBlogger5125tag:blogger.com,1999:blog-6829904489614710740.post-45184780446183556202010-07-15T11:22:14.097+08:002010-07-15T11:22:14.097+08:00@Aaron - Alas, you've finally found my blog. (...@Aaron - Alas, you've finally found my blog. (now where's the Hide Blog button?)hhehehe<br /><br />@Alejandro - Yes this is really exciting stuff! After seeing the result, I view light rendering in a very different way now.<br /><br />The material indexing is done on a different pass, prior to Light Accumulation pass. Remember during the Light Accumulation pass, there is no way of knowing what material the light is responding to. So we need it to ID material before this pass. The best way I could think of is by MRT with the ZNormal pass outputting into a seperate buffer.John David Bonifacio Uyhttps://www.blogger.com/profile/04108888915485048942noreply@blogger.comtag:blogger.com,1999:blog-6829904489614710740.post-35578251078061189072010-07-14T19:52:16.087+08:002010-07-14T19:52:16.087+08:00the last 1 look like marble!the last 1 look like marble!Aaron Linhttp://www.deathio.comnoreply@blogger.comtag:blogger.com,1999:blog-6829904489614710740.post-17467829436137349822010-07-14T17:47:43.164+08:002010-07-14T17:47:43.164+08:00This is neat stuff, let me tell you. Cool, crazy, ...This is neat stuff, let me tell you. Cool, crazy, flexible, otherwise impossible, materials could be done with this. Hopefully that great next post (:p) will clear everything up!<br /><br />One brief question: The BRDF and material indexing is then done only at the light accumulation pass. The final geometry pass just samples the light buffer like in a standard light pre pass renderer?<br /><br />Linear Filtering in a 3D texture perhaps won't do nothing, I mean, the U and V may get interpolated but your object would fall in a specific W slice. Or do you mean something like "this material ID is 3.7f" (70% ID 4 30% ID 3) that could be crazy!.<br /><br />I'm still trying to picture it in my mind... yes I know, that's my fault :p. So I'll just go into wait-for-next-post mode!Alejandro Martinezhttps://www.blogger.com/profile/02456564362442958227noreply@blogger.comtag:blogger.com,1999:blog-6829904489614710740.post-3628965246474488202010-07-14T11:14:09.612+08:002010-07-14T11:14:09.612+08:00Hi Alejandro,
I'll probably make a new post r...Hi Alejandro,<br /><br />I'll probably make a new post regarding the lookup as it is quite related to the 'flattening' of the Phi's. But in a nut shell, it will require us to have 3 lookup tables (+1 for specularity). Two of the lookup table can be combined as their samples will be multiplied eventually. So with that, we have atleast 2 lookup tables (+1 specularity). One material will result to one 2D texture and one 1D texture. Anyway, I hope to explain this more on my next post.<br /><br />You can store 3 channels for RGB if you wish to have individual light response on each type of color. Though I find this overkill already. But it is possible.<br /><br />Yes, I am using a Light Prepass rendering. Of course the limitation here(if you consider it to be one) is that we are now required to MRT the ZNormal pass with a material index pass stored on a small precision buffer(this one I haven't implemented). With this you can now process the light response in a per material index manner, albeit, index to a 3D texture of your material library lookup table.<br /><br />So the answer to when is, we do this on the Light Accumulation passes, distorting each light based from the material index buffer. <br /><br />Of course this would mean that once we choose BRDF to be implemented, ALL of the objects will have BRDF as this is the nature of the Light Prepass technique. But fret not my friend, as there is a way to LOD these light response(hopefully in the next post) *wink* *wink*.<br /><br />In STALKER, its really simple, you just have a 3D Texture (u=N.L, v=N.H, w=material id) and then you sample it with the same data N.L and N.H. I haven't tried this, but it would be interesting to see when we do a Linear Filtering in a 3D texture.John David Bonifacio Uyhttps://www.blogger.com/profile/04108888915485048942noreply@blogger.comtag:blogger.com,1999:blog-6829904489614710740.post-81425931816687640942010-07-14T06:22:43.179+08:002010-07-14T06:22:43.179+08:00Awesome!
Judging from the screenshots with the 3 m...Awesome!<br />Judging from the screenshots with the 3 materials it looks slick.<br /><br />Looking forward for that "flattening" of Phi Incident/Phi Reflectance explanation!.<br /><br />I have two questions:<br />1.- The indexing would be the same as stalker? The lookup texture is indexed by: U = Phi_IN; V = Phi_R;<br />How do you make those textures? something like RGB = color response, A = specular response?.<br /><br />2.- Are using this material technique in a light pre pass renderer? The question arises because how do you accumulate all lights, since we are talking about angles now and not color? I can almost understand STALKER technique (have read that article several times now, and still some bits are not clear to me), but they designed a full deferred rendered, so during each light pass they get the color channel and add the light right away.Alejandro Martinezhttps://www.blogger.com/profile/02456564362442958227noreply@blogger.com