#Thread

1 messages · Page 1 of 1 (latest)

digital fable
#

I don't think you're going to get correct results by using the tangent space normal map before converting to tangent space

fast ledge
#

oh, woops. missed that

digital fable
#

Using a normal map as the lerp T doesn't really make much sense to me anyway

fast ledge
#

the texture sampler there isn't really supposed to be a normal map

#

it's supposed to define the amount of the effect

#

my goal is that black parts use the default normal and white parts use a normal that always faces the view

#

presumably with some interpolation in between if necessary

#

on closer inspection my approach indeed doesn't work quite right

#

my thinking in changing the tangent normal and not the object normal is that i still want to support a regular normal map on top of my effect

digital fable
#

I have no idea how a physically accurate retroreflective material would be presented, or if that's even possible with the non-photonic lighting calculations we have

#

I was cooking up an example of how I'm doing it but everything crashed so give me a moment

fast ledge
#

i''ve done this once before with a different approach where the shader targeted a specific vector to be the light's 'direction' and it calculated it's own emission based on that

#

that would only support one light source at a time though

#

i wanted to try a more versatile approach this time

digital fable
#

Probably even possible to use multi-pass shading to overlay retrorefective shading and the usual lit shading, though that's tricky

fast ledge
#

yeah, it sounds tricky

digital fable
#

I don't know if that'd be the "correct" way to do retroreflectivity either

#

In reality the eyes and cameras we see them with are still quite different from game camera rendering and exposure

#

As well as how photons behave

fast ledge
#

yeah

#

well i've gone back to the simple approach for now, which affects the whole object

#

it looks pretty good on this cube, which reflects brightly from the correct angle

#

these cat eyes also appear to be doing what i told them to do but just aren't very bright regardless 🤔

#

do you know how i might make them brighter?

#

perhaps i could boost their total color by some amount

digital fable
#

You can, if you use a HDR color with a high intensity or multiply the color above 1 by other means

#

But that's hacky and can result in very unpredictable brightnesses so I don't recommend that before you get the material looking generally right first

#

Remember that metallic and smoothness values are important too

fast ledge
#

oh i think i'm just stupid?

#

okay yeah i painted them black by mistake LOL

#

they look much better white.

digital fable
#

Blending with a normal map is as simple as this

fast ledge
#

when you lerp between two normal vectors, what happens? does the result rotate, or does it like go 'across the middle' as it were?

#

pretend this unit circle is a unit sphere

digital fable
#

I'm not sure!
Maybe the result should be normalized to be correct

#

Doesn't look any different

fast ledge
#

what does Triplanar node do?

digital fable
fast ledge
#

oh, all right.

#

this should be all right?

#

i think so anyway.

digital fable
fast ledge
#

ah, i see

#

i wonder what that actually changes.

#

i always assumed the value from the texture could go straight in without adjustment

digital fable
#

Normal map textures use a different color space and have their color channels swapped about afaik so it's important for how they're sampled

#

wish i could make the cone of response narrower

#

This is what smoothness would do

#

And metallic too, to an extent

#

Smoother material makes direct reflections more intense, but more focused

fast ledge
#

is there a way to specify the default color of the sampler when there's no texture asset ?

digital fable
#

Yes, if you have a property you can specify a default

#

This is important for normal maps

fast ledge
#

mhm

#

thanks :)

#

thank you for all your lovely help

#

if i want to blend the affect in a texture i'd need to essentially...

#

lerp between the blended normal and the default normal i think

digital fable
fast ledge
#

ah, so it'd be kinda all or nothing?

digital fable
#

The average of two vectors will be pointing between the two directions

fast ledge
#

that doesn't sound good

#

the effect i want to see seems more like lerping between two possible output colors

digital fable
#

It won't look right, but it's an useful effect
I needed retroreflective clothing so I made a hacky solution that lerps between the usual normals and retroreflection by view angle

#

The effect "bends" rather than blends, but it looks reasonably okay, especially when smoothness is also lerped by angle

fast ledge
#

i see

digital fable
fast ledge
#

yeah, i guess it's not really a pixel shader

#

or a raster shader or however you would call it

#

i have another question

digital fable
#

My understanding is that calculating lighting more than once requires multiple passes, which is what the complex lit shader does with its clearcoat

fast ledge
#

oh, i see

digital fable
#

But that's unfamiliar area to me

fast ledge
#

this cat eye is painted red but is being totally drowned out by the white of the bright lamp

#

i've turned off bloom here

#

the diffuse color is red

digital fable
#

Metallic value?

fast ledge
#

0

digital fable
#

Try 1

#

Metallic materials tint reflected light by their base color

fast ledge
#

a 1 doesn't reflect very easily

#

irl i'd expect a red thing to only reflect red light and absorb other light

#

im not sure how to have that happen in pbr, i'm surprised it isn't just like that already tbh

#

increasing the metallic value seems to only have the effect of reducing the impact of the bright light in a total way

#

which makes it more red up close but impacts distant reflection negatively

digital fable
#

This of course reduces the total reflected light because they rarely "convert" light energy into their own wavelength

fast ledge
#

hmm

#

that isn't going to work here because these aren't true retro reflectors

#

so they need as much help as they can get

digital fable
#

For me it works decently well

fast ledge
#

here's a comparison of metal 0 vs metal .95

digital fable
#

Here's my metallic road paint retroreflectors vs nonmetallic

fast ledge
#

i don't think this worked how it was supposed to

digital fable
#

Is your project on URP?

fast ledge
#

i notice you're making the color HDR though, in the super red

#

no, it's on HDRP

digital fable
#

Ah, I see

digital fable
#

Though the scene's post processing or cameras probably would not

digital fable
#

I think both work decently

fast ledge
#

i tried by using the specular color workflow instead of metallic

#

it goes to white, curiously

digital fable
fast ledge
#

that's right

#

but i set my specular color to be red, and yet it goes to white in the distance skjhbs

#

oh i fixed the distant but it still doesn't have the effect i was hoping for

digital fable
fast ledge
#

i changed 'energy conserving specular' setting

#

can i make the total color HDR? how would i do that?

#

i want to cheat the same way yours are

digital fable
fast ledge
#

it doesn't appear to 😅

digital fable
#

Unless HDRP clamps it somehow

#

Energy conservation is what we would specifically not want in this situation

#

If you want a pure red, green or blue glow the color would need to be a pure shade of those colors
Increasing intensity in HDR color space will boost cyan, magenta and yellow tones more, ultimately towards white

#

Tonemapping often will further dull monochromatic RGB brightness

fast ledge
#

i think im stuck, then

#

it'll go into HDR ranges either from the boost or from a high power reflection but in both cases will trend to white ;-;

digital fable
#

I'm not familiar enough with HDRP to give more precise advice

fast ledge
#

i appreciate the help though!

digital fable
fast ledge
#

yeah :)

#

i got a nice effect at distance

#

i just wish i could get the total color after all of this, and multiply that

digital fable
fast ledge
#

:)

#

im not sure if want i want to do next is supported.

#

cos all this stuff is like, affecting the normal and the albedo and stuff.

#

but next i want to get like the final result of the render and multiply that.

#

like that isn't a property of the pbr material but like, a raster technique

#

pbr expects me to use emissive color to do this sort of thing but that's not really what i want

#

if part of the surface got put in shadow it should stay black

digital fable
#

If you can find a way to multiply the base color unclamped, that would be well enough as it'd boost reflections which is the important thing here

fast ledge
#

the issue i'm observing with boost is that it looks like HDRP is definitely clamping the base and i don't know how to get it to stop

#

and this means that after it's multiplied, exactly 1 unit of the sum total comes from the bright reflection and the all other 9999 units are the ambient color

#

this is kind of annoying tbh

#

tbh i don't really understand "HDR" color in contrast with non-hdr color and i've kind of never understood it

#

i don't get the difference, i don't really know why people make it out like there's a difference

#

to me it just seems that a color is hdr if you decide not to arbitrarily clamp your maximum value to 1, and that's it.

#

what i want to do is perfectly possible in mathematics and computer graphics but someone at unity arbitrarily decided that this node should clamp and now i'm stuck

digital fable
digital fable
fast ledge
#

they do, yes

#

in theory if i do this i can make the cat eye reflect more light than actually entered it

#

but for my purposes, this is exactly what i want, and im tbh pretty annoyed that i'm not allowed to do it

digital fable
#

It is frustrating!

#

But it's a bit of a theme
Like 90% of all rules we work with in these programs are arbitrary, often intended to help someone at the unintended effect of making something else harder

#

There's some hope that upcoming block shaders will give us control over individual parts of the existing Lit shaders

#

@mint owl Do you happen to know if there's a way to use "above 1" Base Color in HDRP, or some other way to boost reflected light above its normal intensity in the Lit shader, since it seems to be clamped to 1 for physical accuracy
(or if that variable could be unclamped in the future)

#

A workaround that comes to my mind could be to render the material twice, using a custom pass or the like, another time with an identical shader that's additively transparent
But that seems like a very roundabout way

fast ledge
#

my ultimate goal is to make these more visible at a distance and / or more intense in their albedo color

mint owl
#

No way to have the base color > 1, like you've said, it's clamped.

I think that the only way to do retro-reflection is to use a custom lighting, which HDRP doesn't support :/

digital fable
mint owl
#

"Ugly" solution : re-render the objects with transparent shader, read from the color buffer and output the same value multiplied by constant