Basic material effects for rendering

Your work on PBR is excellent and I love what you done with it, and I’m sure it’s something that all would use if going for realism. What fake BRDF offers is a non-realistic rendering that you couldn’t achieve with PBR. Sticking with the mushroom example, take a look at the image 1 below. A is using normal diff mat and B is fakeBRDF, which is achieved by using image 2. Trying to get the effect B using a real BRDF would probably be… I don’t even know if it’s possible. By simply mixing random gradient colors you can achieve some really cool effect and it might be useful for some ppl and their game.

Image 1

Image 2

1 Like

OMG thanks for share…

God Bless You so much…

My attempt at post process blur, pic below. I’ll update my repo with all that you see here in a day or two.

edit: changed the pic again to a better one and to demonstrate that only the masked section on the mesh gets blurred.

1 Like

What fake BRDF offers is a non-realistic rendering that you couldn’t achieve with PBR. Sticking with the mushroom example, take a look at the image 1 below. A is using normal diff mat and B is fakeBRDF, which is achieved by using image 2. Trying to get the effect B using a real BRDF would probably be… I don’t even know if it’s possible. By simply mixing random gradient colors you can achieve some really cool effect and it might be useful for some ppl and their game.

I agree as someone whose project doesn’t aim for photo-realism. That image B is kind of fantastic considering the mesh you’re using.

PBR doesnt mean realism, it just happens to makes it easier to be realistic by allowed artists to get more accurate metallics and mate materials with less work. It is easily possible to be artistic and stylisised.

That result would likely be possible by using a custom cubemap on a low roughness material in PBR. Although id have to test.

I have no doubt you will be able to do it, but us layman who are not all that graphics programming savvy would probably have trouble :sweat:

PBR doesnt mean realism, it just happens to makes it easier to be realistic by allowed artists to get more accurate metallics and mate materials with less work.

This is a good chance to ask you what the intention of the PBR renderer implemented in Urho is, then. Although I understand the concept itself loosely, it also seems to be a loosely defined concept in general from the reading I’ve done on it, and as I’m still a novice when it comes to graphics programming, looking at the code only helps me use and extend it, not understand it completely at this point. As far as I could tell, the single common aim for PBR was realistic light simulation. As this is a more general principal, I imagined there was an unnecessary overhead inherent in its use when we could simplify the desired effects for style, and wrestling to refit the PBR pipeline into all other use-cases would be inefficient. I’d love it if you could demystify this for me. :smile:

It is easily possible to be artistic and stylisised.

Of course.

Wrapped up the project and checked everything in on the repo. A ton of files deleted and replaced, so I might have missed some. Let me know if something’s missing, thx.

What’s new:
-per object, per emissive mask post process glow
-fake BRDF
-all 500+ sequence frame images, i.e. fire, explosion, etc., were deleted packed into a single files
-several new shaders added for both glsl and hlsl
-uv sequencer class to handle updates
etc. etc.

edit: update the post process glow.xml

vid

2 Likes

The key is in the name, Physically Based. The whole idea behind PBR is to base material inputs on real world and observable values. This makes it easier for artists to create materials that resemble the real world as they can just look up values, for example most metallic objects have 1 metallic (because there metal) and 1 smoothness (because the microsurface is smooth) and then you just input the RGB and your away, you can then add increased detail to the material through changes in the roughness and metallic maps to simulate paint and scratches. The overall advantage, in that case it is easier to be more accurate and more detailed in materials.

One of the best benefits to PBR is it allowed for metallic objects that look metallic. In reallity metallic objects tends to have really dark diffuses with a lot of that color going into the specular (hence a the specular is tinted). They also reflect most of the incoming light. In traditional renderers the closest they would get was a tinted specular and a high specularity.

None PBR:

Compare the metal of the skyhook in Bioshock infinite to an stylised PBR object that uses metal:

Another benefit of PBR is that due to it relying on environmental lighting from reflection techniques such as cubemaps it allows materials to render in many diffrent lighting environments with no changes to the textures. In traditional materials it was common to change the diffuse color based on the environment you placed the object, but in PBR the shader handles all that for you .

Overall it just allowed more control over materials allowing developers to hit higher quality with less effort and allows engines to render a wider range of materials with no changes across a wider range of environments in addition to very little performance overhead compared to traditional rendering. There is likely many other benefits i have not mentioned. But the short of it is once PBR is implemented there is not really a need to use traditional rendering as PBR can do all that and do more whilst giving a quality boost in the process, hence why larger engines completely replaced there material pipeline with PBR,

I appreciate you taking the time to explain that and I think I understand what you’re saying. To me the name physically based rendering did imply a pursuit of simulating physical properties, and I’m not sure any of what you said counters that, to be honest, but at the same time I can imagine there is the possibility and I simply haven’t seen it yet. The stylized book you reference, for example, kind of demonstrates what I mean – style isn’t limited to just more or less “cartoony” geometry.

As for the cost of PBR when trying to do complex scenes, which is my true concern, I saw this render below a while back, and it is perhaps the type of thing I’m thinking of when I doubt PBR as a be-all-end-all. Meaning, fantastical scenes.

The performance of PBR is extremely low to the point where the point where i cant think of a single platform that cant run a complex scene with PBR. Most of the heavy lifting is pre-calculated so there is not much of a cost. The diffuse model is still the same, and you can still use blinn specular you just add fresnel (very fast) for rim lighting/reflections and a geometry term ( very very fast) for ensuring incoming light is not lost withing a surface. I believe epic showed part of the rouge one (star wars) running in realtime using PBR + more and that tends to be as compelx as you can get as it is designed to mimic the real world. As for stylised i have sean everything done with PBR from low poly to realism and all existing materials should work perfectly fine with PBR as long as you scrap the specular map (easily replaced). So in theory it means that porting to PBR is a case of just using the right material path and make sure you have a neutral roughness and metallic so traditional textures done look out of place without roughness and metallic maps.

As for the image you linked i assume it to be done in Blender Cycles. If that is the case then it is likely using a BRDF identical to what PBR in games approximates so in terms of results it should be identical to if you set it up with PBR, although without added effects like DOF. All pathtraces to my knowledge simulate a BRDF of some form just out of the nature of their design. Take that as you wish but i cant imagine a single style or outcome you can do with traditional rendering that cant be done in PBR especially not for performance reasons.

Take that as you wish but i cant imagine a single style or outcome you can do with traditional rendering that cant be done in PBR especially not for performance reasons.

I’m comfortable taking your word for it at this point. You might have hit the nail on the head by saying traditional rendering. I am perhaps thinking of “non-traditional” rendering. I will experiment with PBR for my use-case further (when I tried it last time it seemed to slow down my scenes considerably, but it’s not unlikely it was my own fault) and will pass judgment then.

Also, when that render is done using Blender Cycles without faking the effects it takes unrealistically long (which is my point), however, that’s not important to this discussion. I didn’t mean to derail this thread with this discussion. Sorry about that Lumak.

Edit: My point at the start was that the fake BRDF Lumak posted was cool and useful for me where PBR over-complicated my life and slowed down my renders, and the explanations of PBR dragonCASTjosh provided in response to my questions were useful and suggested I might have been doing something wrong. So perhaps it wasn’t completely off-topic.

I’m happy to would you through it and help make things are working as intended.

I agree that the fake PBR is cool and there is probably is a good use case for something like that. I’m just concerned that the current use case is based on miss understanding

Made a lot of minor tweaks, such as resizing sequence frame textures, etc., and corrected post-process glow.

Blur5 and 3, sigma=2 (what’s checked in)

Blur9, sigma=5

2 Likes

I recently watched some gameplay of Yakuza 0 and wondered how they’re able to process so many marquee lights in the scene w/o performance loss. It turns out it’s a simple mechanic by creating a mesh with a set number of repeating geometry. In the pic below is a 3-bulb template geom repeated to fill the entire panel.

So is it a single instanced mesh with 3 bulbs, one of which is unlit, or 3 bulbs which are programmatically all lit or unlit? Or have I misunderstood what you meant?

It might make it more clear if I explain how I created the marquee light panel:

  1. create a 3-bulb mesh, the uv’s for each bulb is placed at top, middle and bottom.
  2. duplicate the 3-bulb mesh and create a long column - in the gif above, that would be the one directly above the char’s head and goes to the top center of the screen - then combine the column into a single mesh
  3. duplicate the column mesh from 2 and place them left and right of the original to fill the panel
  4. trim excess mesh (bulbs) extending from the panel
  5. combine all the columns into a single mesh - done.

What you end up with is a mesh that uses single material with the same diffuse map and emissive map. What you see in the gif is an UVFrame offset sequence for the emissive map, changing the uv offset to bottom black, mid black to top black.

I hope that clarifies what’s going on in the gif.

Yes, that does clarify it, thanks.

Hi, all!

Could you help me create basic car glass? I mean the feeling of glass,
better not PBR way…

Recently added: https://github.com/Lumak/Urho3D-Greenscreen-UVFrame (added the link on my 1st post as well)