Full Cook-Torrance model #6752

Closed
opened 2007-05-26 14:18:44 +02:00 by Tom Bech · 7 comments

%%%Hi!

I'm new to Blender, so bear with me :)

I noticed that Blenders Cook-Torrance (CT) specular shader isn't really a "true" CT BRDF model as it lacks it's microfacet base. I'm not sure why it's designed this way, but sometimes it's useful to be able to specify the "standard" set of parameters for a CT model, for example when trying to reproduce the results from tutorials for other programs or from a research paper.

I've written a "full" CT model (see diff's attached) for those who might be interested in this kind of thing. It's a pretty trivial piece of code, and I'm not even sure if it's of interest to anyone else but me :)

I don't know Blenders code well at all - for example, where does the export to yafray occur? I've only modified the shader panel and the file DNA and the shader code, but I'd like to be able to export the "full" settings to yafray as well.

Tom%%%

%%%Hi! I'm new to Blender, so bear with me :) I noticed that Blenders Cook-Torrance (CT) specular shader isn't really a "true" CT BRDF model as it lacks it's microfacet base. I'm not sure why it's designed this way, but sometimes it's useful to be able to specify the "standard" set of parameters for a CT model, for example when trying to reproduce the results from tutorials for other programs or from a research paper. I've written a "full" CT model (see diff's attached) for those who might be interested in this kind of thing. It's a pretty trivial piece of code, and I'm not even sure if it's of interest to anyone else but me :) I don't know Blenders code well at all - for example, where does the export to yafray occur? I've only modified the shader panel and the file DNA and the shader code, but I'd like to be able to export the "full" settings to yafray as well. Tom%%%
Author

Changed status to: 'Open'

Changed status to: 'Open'

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'
Author

%%%
Sorry - I found the yafray exporter, didn't realise it was in cpp files. Seems yafray replicate the blender shaders so I guess I must implement the CT shader in yafray as well if I want it.%%%

%%% Sorry - I found the yafray exporter, didn't realise it was in cpp files. Seems yafray replicate the blender shaders so I guess I must implement the CT shader in yafray as well if I want it.%%%

%%%Hi

I am interested in implementing "physical" brdf models also. Please contact me to discuss is you are still interested. my email is tomfitzrugger@gmail.com. I am completing a PhD scene visualization project and am struggling with how best to put my "shaders" into blender.

Thanks

Tom%%%

%%%Hi I am interested in implementing "physical" brdf models also. Please contact me to discuss is you are still interested. my email is tomfitzrugger@gmail.com. I am completing a PhD scene visualization project and am struggling with how best to put my "shaders" into blender. Thanks Tom%%%
Member

%%%perhaps brecht can have a look%%%

%%%perhaps brecht can have a look%%%

%%%I'm reviewing this one now, better late than never.. But I'm still trying to figure out how this fits with other specular shaders, to avoid overlap, it's a bit ugly to have a Cook-Torrance shader and a Full Cook-Torrance shader, ideally there would be only one with more settings, but this works quite different from the existing one. There's also this beckmann shader patch, not sure how it fits together:
http://projects.blender.org/tracker/?func=detail&aid=11747&group_id=9&atid=127%%%

%%%I'm reviewing this one now, better late than never.. But I'm still trying to figure out how this fits with other specular shaders, to avoid overlap, it's a bit ugly to have a Cook-Torrance shader and a Full Cook-Torrance shader, ideally there would be only one with more settings, but this works quite different from the existing one. There's also this beckmann shader patch, not sure how it fits together: http://projects.blender.org/tracker/?func=detail&aid=11747&group_id=9&atid=127%%%
Member

%%%I propose to postpone this, and make it part of the new shader system we want for Blender.

Also a note: I did the Cook Torrance, and removed the nasty parts that took far too much rendertime and were nearly visible. Scientific accurace was not a spec for Blender really. This is better off as an option for a flexible shader system.

Thanks nevertheless, good reference for us.%%%

%%%I propose to postpone this, and make it part of the new shader system we want for Blender. Also a note: I did the Cook Torrance, and removed the nasty parts that took far too much rendertime and were nearly visible. Scientific accurace was not a spec for Blender really. This is better off as an option for a flexible shader system. Thanks nevertheless, good reference for us.%%%
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
6 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#6752
No description provided.