GLSL PBR Shader for viewport

Great. Could the shader theoretically be used to capture indirect lighting in different places around a scene, and blend between them like UDK used to? Also, have you looked at Martins Upitis’ work on realtime reflections? Are the shadows just of the simple variance type, or a newer method that produces better results?

textureLod does it actually but your texture min filter must be set to GL_LINEAR_MIPMAP_LINEAR
TextureCubeLod is deprecated since glsl 1.5 and textureLod is the one to use. I don’t know what glsl version blender shader are written for though. But I’m pretty sure textureCubeLod follows the same behavior.
source
https://www.opengl.org/wiki/Sampler_(GLSL)
https://www.opengl.org/wiki/Sampler_Object#Filtering

Great work so far, very impressive.

Hey guys, just a heads up that I’m slowly looking into this.

The PBR shader itself is pretty important, but I was thinking some extra options for its integration:

Basically having this more tightly integrated to blender materials might actually be more interesting, for instance, we could enable it when a glossy shader is plugged in cycles or when mirror or so is activated in blender internal and use the world textures/node system if possible.

Other artists have asked for a separate material tree for the viewport. This would also allow us to define a custom shader tree especially suited to viewport rendering.

It may actually be time to rethink our viewport modes: Is it relevant to have a separate “texture” mode anymore? Maybe the modes can be “solid” (with textured solid), “GLSL”, where the new shader tree will be used and “material”, where the latter will still try to mimic the material if possible. Or it may be better to skip “material” or “GLSL” and always assume the viewport will use an approximation based on the material or the GLSL node tree?

Just some thoughts for now, I will do some more digging here first to make sure this works nicely. Finally and most importantly big thanks and thumbs up to hypersomniac for working on this!

Maybe those modes could work, but as far as like working GLSL and Multitexture - maybe we could have an isolate mode for a texture slot/channel that is what you get when you turn to Multitexture? For isolating a texture for painting in 3d as well as seeing it in 2d while not turning off all the texture slots when using many layers…

I would point to the way the interaction is in Substance Painter with the PBR shading there, it is very fluid response.

I beg for material tree for the viewport! Things like shaderFX do are super usefull, not only for games of course.

As a game artist, I feel cared for and loved.

screen space normals woud really help the bge as well,

no chance @ this in realtime in the bge @ the moment?

I would like to see someone strip out most of the render and rastizer code, and simplify it and make it fast…(the bge)

Nice work,
And I have a question:
Is it possible to write some python node to make it like a add-on?

Hi,

First of all, great work!
I’ve been testing this built for a couple of hours now and seems like ‘Bumb’ node is broken… I cant use bumb maps!

Bert

any chance to test os x build? :slight_smile: thanks

Hola,
Here is a test build of Psy-Fi’s / Jason’s viewport branch =
Viewport_Experiments_Win7.x64-0790db4 - updated 1.7.2015

Here, you can see on the roadmap for 2015 about viewport.
Dev blog here-n- here.

Branch history

I decided to post a link here instead of uploading to graphicall, less hassle sometimes :stuck_out_tongue:
I’ll leave the link up for a while :slight_smile:
Enjoy.

Cheers,
~Tung

I just forked the code I’m seeing if my extended pie menu system can be added if I patch the code that the blender foundation added for the pie menus calling additional pie menus.

Cool. What’s the status on this branch? Is it the Viewport FX branch plus PBR? Either way I’m excited for someone to be working on viewport stuff that is so sorely needed.

When I saw the title of this thread I honestly thought I would see something like this PBR :o

http://firstshift.files.wordpress.com/2011/01/pbr_can.jpg

Hello, nice work.
I tried to make it work on my PC (Win64 Build), but it says something like ‘msvcr120.dll is missing’.
Any idea?

Thanks

I think you should get Visual Studio 2012 2013 redistribution from microsoft it is about 1 to 3 mb file

Hey @hypersomniac thanks I hope to see this on blender soon.

Wow great work!

I approached PBR completely different by creating a plausible looking material setup within the confines of the current Blender. But your solution is so much more elegant (not to mention accurate).

It would be awesome if you can push it through to master in the future. I’ll be happy to create some content for it.

Hi,
Is this project still moving? It have great potential. A pity if it just dies away.

Thanks,
Andrew

Psy-Fi and Mike Erwin are working on realtime shading in viewport now, will include PBR from what I understand and will be nodal. I am not a coder,so I don’t know what is involved but I don’t think this is dead in any fashion really.