Skip to content

Commit

Permalink
BRDF explorer app: This already works somehow
Browse files Browse the repository at this point in the history
TODO: oren-nayar needs fixing (there's cos(phi_i+phi_o) instead of cos(phi_i-phi_o) )
specular gets weirdly zeroed and looks terrible
look for divs by 0
(those are things to do for what is now to look fine but ofc there's more left to do: anisotropic roughness, bump/derivative mapping, full fresnel, glass bsdf, overall gui usage clean-up/fix, maybe i forgot about something)
  • Loading branch information
Crisspl committed Jun 19, 2019
1 parent 914b50d commit 5b3f3cb
Show file tree
Hide file tree
Showing 4 changed files with 222 additions and 155 deletions.
Loading

18 comments on commit 5b3f3cb

@devshgraphicsprogramming

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

glass BSDF not needed

@devshgraphicsprogramming

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but light animation like in ShaderMaker

@devshgraphicsprogramming

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Crisspl I get undefined refs to irrTex2ceguiTex and getTextureGLname

@devshgraphicsprogramming

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also there should be a default model + textures on start-up

@Crisspl
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I get undefined refs to irrTex2ceguiTex and getTextureGLname

yea, cmake for this isnt set up

@Crisspl
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

btw should i make another slider for imaginary part of IoR (for when metallic>0)? Turns out IoR for conductors is complex

@devshgraphicsprogramming

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

btw should i make another slider for imaginary part of IoR (for when metallic>0)? Turns out IoR for conductors is complex

Nah, I think its reasonable to approximate and say that it's real (Mitsuba, Cycles, etc. don't allow imaginary IoR)

@devshgraphicsprogramming

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also you need to disable camera movement (intercept mouse events) if one is clicking on the GUI windows, right now I slide sliders and camera moves

Also why is the entire mesh black?

@devshgraphicsprogramming

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Finally the light needs a "strenght" slider (multiplier up to 100.0) because right not with the color picker one cannot pick a HDR value

@devshgraphicsprogramming

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Texture inputs don't seem to work (tried the dwarf mesh) neither the constants.. I cannot see any diffuse (black mesh, except for specular).

Are you making irr textures from CEGUI textures or CEGUI textures from irr textures?

@devshgraphicsprogramming

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Finally I get a segfault if I first load the bunny obj and some textures and then I load the dwarf

@Crisspl
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also you need to disable camera movement (intercept mouse events) if one is clicking on the GUI windows, right now I slide sliders and camera moves

yea I know

Also why is the entire mesh black?

probably light is too far

The Texture inputs don't seem to work (tried the dwarf mesh) neither the constants.. I cannot see any diffuse (black mesh, except for specular).

I'm sure they work. But for now only textures from tex viewer (on the right). Albedo goes from 0 and I don't remember about others.
Maybe u have to set ior to something reasonable value (0.92 ) to see diffuse

@Crisspl
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you making irr textures from CEGUI textures or CEGUI textures from irr textures?

cegui from irr

@devshgraphicsprogramming

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe u have to set ior to something reasonable value (0.92 ) to see diffuse

IOR = 1 means no reflection/specular at all, its basically an air to air interface, and I've already set it to that.

I cannot have an IOR < 1 because that would mean that the camera is actually in some liquid/solid and I'd get Total Internal Reflection (which you can't simulate with schlick).

@Crisspl
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ior=0.92 gives F0=0.04 which according to some tutorials is good approximation of dieletrics, that's where my 0.92 comes from. I didnt have problmes with seeing diffuse on this value

@devshgraphicsprogramming

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Index of Refraction is always > 1.0 (speed of light in vacuum/speed of light in medium), your IoR to F0 function is wrong then

@devshgraphicsprogramming

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Index of Refraction is always > 1.0 (speed of light in vacuum/speed of light in medium), your IoR to F0 function is wrong then

The IoR slider is fucked, it should start at 1.0 and end at about 3.0 (zirconium or some shit more shinier than a diamond).

@devshgraphicsprogramming

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aaand I was wrong again... IoR can be < 1.0 because the crests move faster than light in Aluminium and Water (under X-Rays) but its not relaying any information so its still ok with General Relativity.

Please sign in to comment.