Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spec/gloss PBR materials #52

Closed
julienduroure opened this issue Oct 18, 2018 · 11 comments
Closed

Spec/gloss PBR materials #52

julienduroure opened this issue Oct 18, 2018 · 11 comments
Assignees
Labels
enhancement New feature or request exporter This involves or affects the export process importer This involves or affects the import process Material

Comments

@julienduroure
Copy link
Collaborator

Check if this is possible, and implement if it is.

@julienduroure julienduroure self-assigned this Oct 18, 2018
@julienduroure julienduroure added enhancement New feature or request importer This involves or affects the import process labels Oct 18, 2018
@emackey
Copy link
Member

emackey commented Oct 25, 2018

The Blender Principled shader is using the metal/rough model, not spec/gloss. It does have a monochrome specular input, but that's not what you're looking for here.

I don't know of any way to support KHR_materials_pbrSpecularGlossiness import in Blender without a rather complex node tree. There's more discussion in KhronosGroup/glTF-Blender-Exporter#222, and someone even made a new working node tree in KhronosGroup/glTF-Blender-Exporter#225.

@julienduroure
Copy link
Collaborator Author

Closing for now, seems this is not possible to use Principled shader for KHR_materials_pbrSpecularGlossiness

@emackey
Copy link
Member

emackey commented Jan 15, 2019

Just an update on this, no action needed yet.

Blender 2.80 Beta documentation lists Eevee-only Nodes that do not work in Cycles. One of these nodes is a Specular BSDF node exclusively for realtime Eevee.

This node offers the Spec/Gloss workflow, in particular offering a full-color Specular channel. It has a "roughness" channel instead of gloss, but a simple invert node can fix that.

Interestingly, it also has a dedicated input channel for baked ambient occlusion (but only for the spec/gloss workflow, not metal/rough).

@donmccurdy
Copy link
Contributor

From the docs:

It is similar to the Principled BSDF node but uses the specular workflow instead of the metallic. It has much less parameters and supports less features. Both might be merged into one node in the future.

Interesting.. 🤔I'm tempted to open an issue on Blender asking about the baked AO input issue. Not sure why they'd put it on their "less features" node but not Principled BSDF.

@donmccurdy
Copy link
Contributor

Just an update on this, no action needed yet.

@emackey any particular reservations about implementing this (import + export)? May be good to ask about Blender devs' plans but otherwise I think I'm in favor.

@emackey
Copy link
Member

emackey commented Jan 15, 2019

I tested out the node, and it could certainly be used to implement import/export, including the AO channel.

One small wrinkle is that the node doesn't use the max specular component, as discussed in KhronosGroup/glTF#1443. For example, if one sets a lime-green diffuse color and a solid-red specular color, in Blender you'll see a green diffuse object with red specular highlights, but, in glTF, you should just see a metallic red object (with the diffuse green zeroed out by that max statement). Looks to me like there's disagreement across the wider ecosystem on what to do about this, I'll have to update my notes in the other issue. But I don't think those concerns affect the mechanics of importing and exporting via this node, so, I'm OK to re-open this.

@donmccurdy donmccurdy changed the title KHR_materials_pbrSpecularGlossiness is not using Principled shader for now Spec/gloss PBR materials Jan 15, 2019
@donmccurdy donmccurdy added the exporter This involves or affects the export process label Jan 15, 2019
@donmccurdy donmccurdy reopened this Jan 15, 2019
@donmccurdy
Copy link
Contributor

Reopened. @julienduroure does it seem OK if I open an issue on the Blender tracker to ask about plans for this and AO? Or is there a better way to contact them?

@julienduroure
Copy link
Collaborator Author

Best way is to write on https://devtalk.blender.org/ and/or by email on mailing list bf-committers@blender.org.
Tracker is only for bugs, not for discussions / requests.

@donmccurdy
Copy link
Contributor

I'll close this again. It doesn't seem like we have any plans to support the Specular BSDF node right now, and the AO questions are discussed elsewhere.

@elfprince13
Copy link

elfprince13 commented Nov 30, 2022

@so-rose - can you post some of the sample models you used in working on KhronosGroup/glTF-Blender-Exporter#222 and KhronosGroup/glTF-Blender-Exporter#225 and maybe the screenshot comparing the BabylonJS + Cycles results you got? I have a glTF file that seems pretty washed out in Blender + but looks phenomenal in BabylonJS, and the current spec/gloss node import still looks kind-of sus to me.

@so-rose
Copy link

so-rose commented Dec 23, 2022

@elfprince13 Hm it's a while ago, but I didn't use any special model - just a UV sphere under a standard sky, with an area light casting shadows onto a plane.

If it's a supported material, I'd double check the Blender color management settings. See https://docs.blender.org/manual/en/latest/render/color_management.html

Blender's color management defaults to "Filmic", which tonemaps a large dynamic range with desaturation in the highlights. If you import a texture and render it under basic lighting, it will thus look washed out. You can up the contrast in the Color Mamagement menu, to match expectations associated with photography better. I'm guessing that's what's going on here.

In general, the key is to design your scene with physics in mind, not from what your texture "looks" like; use light intensities comparable to the real world, use the Principled Shader, and prioritize monitoring the saturation of textures. Treat it like a film set more than a CG scene, and Filmic will tend to treat you well.

If you really want to, you can also flip Blender's output back to sRGB. This should again result in a render of the texture as encoded.

glTF requires JPG/PNG textures encoded as sRGB. It's also a good sanity check to make sure that's a thing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request exporter This involves or affects the export process importer This involves or affects the import process Material
Projects
None yet
Development

No branches or pull requests

5 participants