Trying to replicate 2.79 Phong/Lambert shading

Mine. It was one line code replacement in the GGX specular shader so could be hacked into any modern PBR engine.

I = GGX_Distribution(roughness2,..)
  |
  v
shininess = 1.0 / roughness2
I = pow(max(dot(R,V),0),shininess) / calc_I_M(dot(N,V),shininess)

calc_ I_M code is shown in the free preview of the paper. I think old Phong implementations limit the shininess but this is not necessary with a normalized version.

Ok so uh yea…

for it to be true phong it kinda has to not be able to get those weird sharp specular dots and stuff since normal phong and how it usually worked wouldn’t be able to do this

You do got part of it right, but the other part with with how the roughness works isn’t exactly correct

if you wanna get an idea of what it is am talking about, try downloading blender 2.79 and using internal for a moment, to take look at how the phong specular in that one acts when you mess with roughness and stuff

Normal phong should usually always look how it looks on the red sphere pretty much, and normally roughness would just effect its size sorta, with there being an intensity slider to to make it less or more visible

Again i say normal phong based on how i normally have seen it look in alot of old stuff

Also, now this is mainly specifice to those old 3D modeling engines but alot of them actually allowed for coloring the specular, so even if you had a white lightsource you could make the specular something like having it green but the sphere itself being red

I’ll show some images on this reply in a sec to show what exactly it is am refering to, since the roughness usually acted a bit differently, at least not in the way it seems to be in the images you show where you added the phong specular, since atm while its got the phong specular its not too different from the previous duo to the roughness still acting the same, but yea just hang on a sec, i’ll supply some images of what that looked like in 2.79 to get an idea, since if it was to be usable, the roughness has to work the same way too if for it to basicly be true vintage phong specular


Raytraced verison (any weirdness with the dark stuff at the bottom is just duo to the angle of the sphere and not anything to do with how the shading worked in that, incase that were to be confusing for any reason possibly, since i didn’t do that at a normal angle)

A sharp specular isn’t an issue because you can just avoid using too shiny material. I added it into a metal shader so it had color control. It looked very similar to a classic Phong except on the very rough end where the classic is too bright for energy conservation like in your images. So if you need the exact look you probably need a vintage lighting model like in 2.79. I have currently no plans for something like that.

You mean like this? The light here is sun lamp with default settings.

well then using the specular just wouldn’t be useful since a reason it was nice was you get get very interesting looks making it that shiny as it was useful for say metal materals that were cartoony as an example

Or just anything in general that needed to use a specular that big

Otherwise only thing its good for is realistic stuff and that being about it

BUT

if you got the same kind of brightness/contrast node that blender has, then using that plugging it into color, you can technicly hack it to work the same with the roughness, it just requiring adjusting both the brightness/contrast parameters and some stuff

Its possible to increase fresnell reflectance to metallic ranges to get large bright speculars:


EDIT: I re-did the image to make it more clear. Fresnell reflectance is from specular workflow and adjusts the specular reflectivity but without being limited to dielectric range.

now thats much more like it

Also i tried seeing if i could create the same thing in 2.79 and 3.5.1 and this is the results


3.5.1


2.79

it prob doesn’t help that 2.79 has extra types of lights such as Hemi, which is used in that to make it not so dark

1 Like

Honestly, if someone did, i would take an add-on that readded the Phong Specular (or a blinn-phong), and functioning how its suppose to and what not

and well, something that technicly wouldn’t need to be added to it, but also something that makes it so theres a seperate reflection slider that does not actually effect the specular but just makes it so if its reflective or not (with roughness and stuff) but doesn’t actually effect the specular at all

I have no reason to remove the support. It looks pretty nice and its still within the same modern energy conserving lighting model so it can be just selected as an alternative to GGX. For my part, it should happen with node based materials which is near the top of new features list.


you should be able to get blender 3.5 even closer to that 2.79 result

1 Like

is This in cycles cause am not really able to use that duo to how slow it is and the fact that theres no way to tell it at what roughness something should become reflective at, otherwise it becomes impossible to get interesting looking speculars without just outright becoming too reflective, or reflective at all when it shouldn’t be

oh i wasn’t refering to you removing it from your engine and doing it as an add-on

i was refering to if someone made an add-on verison for like blenders default rendering engines

since i am curious, is There going to be a point where people have to pay for the rendering engine that you’re working on, or well that not be required at all (am asking cause i know you said no one has to pay anything currently, but on the website it does show pricing and stuff, since if it does become paid at some point i wouldn’t really be able to use the rendering engine mostly duo to being poor)

It would need to be added into Blender I don’t think you can do it with an addon unless its a render engine. You could try to post it with the above code snippet and a link to the paper into Right-Click select.

something else i did try doing was using this to try to turn a texture into the specular reflection it uses instead

This image being what am trying to turn into the specular reflection
Phong Specular 1

am very aware am likely doing something wrong btw lol, was just an idea tho to see if i could turn that image into the specular reflection

(i love how this reply i did to Rawalanche got moved to here when it shouldn’t of since what i was doing was just saying him saying that they don’t belong in the 21 century aged poorly)

This aged poorly, mostly duo to the fact PBR isn’t really good at anything else except realism

and no am not refering to toon shaders or anything similer

But rather anything that has a VERY unique 3D Style that just cannot be done with PBR that actually requires different reflection models and other things

and using the excuse that Phong shaders look like crap doesn’t work here when they both look almost identical except for the actual functionality of them and the way they work

Now back to me wanting to bash my head againest a wall since am one of the few that require them for something am making but having ACTUAL pain trying to get them back and trying to look and look for anything that works remotely similer to phong specular shading

and no i cannot use 2.79, i had been for a while but the moment i start trying to render some grass with other objects in the scene using transparent textures that shadows don’t like trying to not render parts of
and starts going very slowly duo to the crappy Raytracer it has is where it begins to become irritating to use

and no, POV-ray isn’t an option either since that thing just seems to be purely made with how its suppose to work

and also no, This isn’t saying ‘oh oh remove pbr for phong’

PBR is fine, but it becomes a problem when its the only thing availabile and you cannot use anything else to get different kinds of interesting and unique looks, since being restricted to everything having Realism and not anything thats ‘Unrealistic’ becomes irritating real quick depending on what kind of art you have in mind that you’re trying to do

Realisticly if it were possible alot of different Reflection types should be available to the user besides PBR as some are infact better suited for some styles then others, Phong being one of thoses, since Phong pretty much belongs in the same place as toon shaders for various reasons, since much like toon shaders, They are also VERY good at getting different kinds of cartoony looks duo to how the specular itself worked

Since PBR for example

If your roughness is in the middle, you get a default specular dot

You turn it up, it comes bigger but alot less brighter

Turn it down it becomes brighter but more sharper until it looks like a perfect reflection

now phong tho

Its kinda as if you are resizing the actual specular dot rather then making it become brighter or darker, tho it does have a way to do that too that is seperated from the actual size parameter (the size usually being called Hardness)

Because it can have such extreme speculars, it actually makes it quite useful for getting some unique cartoony looks that still look 3D (or just any kind of unique looks in general that are different), but are not trying to look 2D like how toon shaders do

Even tho back then Those were made trying to be realistic, Today, they’re alot more useful for cartooyness rather then realism, just 3D Cartoonyness, if someone wants 2D cartoonyness they likely want to use Toon shaders

Where PBR is much less suited for that and more is suited for realism

Infact i’ll show some examples of the kind of cartoonyness am refering to





mario_and_bowser_fight_1_tall_51159252869_o


scene1_a1_540

And Please do not use the excuse “oh well cause phong shaders are not realistic, that means they’re garbage”

Saying that is like comparing paintings to realitly since by that logic, most paintings and cartoons in general, even toon stuff made in 3D Graphics do not look good by that logic

The images you linked are just generic crappy renders from 90’s. You don’t need phong shader for those. You just need to use Eevee and turn off most modern rendering features, which includes sRGB color space and any type of tone mapping. Then just avoid using PBR reflections, HDRI lighting, soft area shadows and so on, and you will be fine.

Here, I made you the Mario one. It’s not the same, but it’s the same/similar in terms of how aged 90’s the lighting and shaders look:

Here’s the link to the blender (3.5) file:

The credit for the mario model goes to gaddiellartey2010 from sketchfab: Sketchfab

In PBR shading, the intensity of the specular highlights is tied to roughness, but lack of this effect is not what makes the 90’s renders look 90’s. It’s just one small factor out of dozens more factors. You can still make it look like the ancient 90’s renders even with that limitation. Also, keep in mind that the Specular is only soft limited to 1, not hard limited. So if you lose specular intensity due to increased roughness, you can still go over the value of 1 to get it back.

2 Likes

Yes but for it to look correct and actually more good looking and not strange looking, you pretty much need to be able to resize the specular, otherwise it just looks more like metal of some kind, and in your case, it looks nothing like 90s CGI at all for that matter, like maybe 10% or 20% but otherwise, what you showed still has a modern look to it / non-phong specular look (which from things i’ve done the phong is actually the real thing that does it, besides not having not having modern rendering features

Infact the only thing on that image you showed that looks remotely like its 90s CGI is the hat and shoes

Everything else just looks like its PBR or metal of some kind

infact the whole scene you made actually looks more crappier then the actual 90s CGI does (which of course 90s CGI doesn’t unless you’re comparing it to reality otherwise it looks fine and just unique looking or cartoony depending on how its being used, but in this case, the scene you made pretty much as no actual good quality to it period no matter which way you actually look at it)

Also, Technicly, Cycles is usuable too since Raytracing did exist back then, you just couldnt use it at ALL in real time, and some stuff could take hours, to days or even worse cases, weeks to render, was mostly a matter of the complexity of the scene and what you had going on for it to take that long

Infact most of what i showed you is infact Raytraced, since pretty much all of those back then were unless it was on a game console or was PC game or anything that ran in real time, for reasons you likely already know

And for what am doing infact, This does not work, as i myself pretty much require a way to resize the specular

and i have tried but the things i’ve tried either don’t work, or do but have bugs duo to certain things not being exposed to the user as nodes or inputs/outputs on nodes

and as i mentioned, doesn’t exactly help that the Specular Light decreases in strength

Also i find it funny how you call those Generic Crappy renders when they don’t really look crappy at all, sure if you compare it to reality then they do, but otherwise, no, They really don’t

Infact, what i would call crap is making a Model with flat shading, no shadows and crap textures, and Extremely horrific modeling

But yea i find it funny that you say those look like crap since they really don’t, and for sure with the crash bandicoot ones, since those ones are pretty nice lookin and cartoony, since it has a fine blend of an almost 2D and 3D with some of its elements on the characters and stuff with how the texturing is and some of the color choices and other stuff
Crashwithngin

Honestly only one there in that bottom image i’d say looks odd is the guy wearin the weird Gold/Yellow Thing that has the Red and stuff under his eyes and is wearing some kind of thing with pink and red colors

Otherwise most of that looks fine duo to the texture work and the way the specular and other things are being used, plus the colors

Also, Soft shadows did infact exist back then, and turning off Tone mapping usually isn’t a good idea either, usually you wanna stick that crap on standard and mostly that for the colors, since using Raw is just pretty much overkill at that point

so interesting thing here, turns out those specular reflection types don’t work in Eevee which is a problem and also just really strange, so desprite it being on that one i mentioned appearntly its prob still just on GGX (or GXX i forget how it spelled at the time of me writing this comment)

also, What would prob help here is if there was a way to actually make proper real shaders in Blender, much like how theres a way in Godot when using the nodes as it has different modes for them, Fragment, Vertex and Light,

Light is pretty much where someone would write a custom phong or lambert shader or pretty much any kind of custom type (at least in Godot anyway)

if Blender had this, i’d be more willin to use that too since i know how to do it in Godot using Nodes, infact i even created a custom Lambert shading of some kind based on Valves Half-Lambert, tho prob a little more extreme but currently can’t really use that either in blender, with some hacks usin some nodes then kinda, but yea

(To point out my knowledge on shaders is infact limited, as i mostly just know how to do it using nodes specificly on Godot, and even then i still have to look back at it if i were to make a new one duo to me forgetting slightly how to set it up)

But yea if blender just had a way to make custom reflection models using nodes, then i’d be more willing to do that myself if that existed, but currently there isn’t any normal way of doing this, and any way i have seen usually doesn’t seem to work with the pointlights/dirlights and sunlights and stuff which is a problem for me