Jump to content

fighting with illuminanceLOOP


Guest Swann

Recommended Posts

Hi,

If somebody will find time to explain me some thhing I will be thankfull.

I'm checking the angle beetwen L and N based on this 801c35e5253974553ad706bcecae71d2.png. If the angle is bigger than 180 (so the face is not seen by light) it should add yellow color and darken it by half. Why this is not happening ? And why it behaves like trancluscent while the normals are not reversed ?

1.hipnc

Link to comment
Share on other sites

OK. Changed angle in compare to 90 and divided color by length of L and it's a little better, but still I get this yellow artifact(right) on face that is directly hitted by light and shadow is on face that is not visible (left) to light but it's not transluscent material. Why it's happening ?

post-3552-126631963804_thumb.jpg

Edited by SWANN
Link to comment
Share on other sites

OK. Now in illuminance i'm only doing angle calculation, all the rest outside.

What works:

1. When there is one light it adds yellow color to the side that is not hit by light directly (or vice versa, if you change value of compare or if on false)

What not works:

1. It works only for one light. When there is more than one light it should not add any yellow color (or when if is false, add yellow to both sides)

2. I don't know how to blend this new yellow color so it smoothly starts. Right now it has hard edge. ColorMix ? But I don't see how I should wire into this network.

Picture below shows how it behawe when two light are ON. It should behawe like this only when is lighten by one light.

**************BACK************************************FRONT******************************************SIDE*********

picbo.jpg

Thank you

And here is the file.

DOWNLOAD:

wypociny.HIP

Edited by SWANN
Link to comment
Share on other sites

Hey Sebastian

I havent looked at your new file, but I took a look at the old one and made some changes:

I think you're doing some extra calculations there. One nice thing about the dot product is with normalized vectors it gives you back a value from -1 to 1, where at zero the two vectors are perpendicular. So no need to convert back to angles unless I'm missing something.

The reason the sphere looks flat is because of the way you are adding the shadow shader. But with correct shadows, the "front" side here would be in shadow. Is what I did in the file what you're after?

In the illuminance loop you want to do something like:

color += ...

but what you have here is

color = ...

so on each cycle (ie each light) the color is overwritten. I changed that in the file.

hth

1_mr.hipnc

Link to comment
Share on other sites

In both examples I turned of shadow.This is whats shows up when two light are ON. It's yellow only on one side.

post-3552-126635823298_thumb.jpg

If I modify your file and add arccos calculation with radToDeg I get this. A little better, two lights and two yellow half's but as you can see again hard edge of the yellow.

post-3552-126635834946_thumb.jpg

Anyway, nice progress, thank you.

Edited by SWANN
Link to comment
Share on other sites

On the other hand, your file mae also good for both lights.

Done some more tests:

post-3552-126636019315_thumb.jpg

This is reversed scenarion so white should shows up where in previous renders yellow was.

As you can see on front view (left) there is a white hole, and on back view also should be white hole but instead it's tinted in yellow.

This may be the case with output with two lights directly from your file. One side is tinted more on yellow and it looks like second half is white.

So this render propably is good but because of this tinting one side is darker and second lighter and looks almost white.

post-3552-12663606109_thumb.jpg

Link to comment
Share on other sites

MAN, how stupid I'm. Forget about my last 3 posts.

Just realized that light intensity was set different on each light and thats why it looked differently.

Your file works Beatifully with one, two, three etc. lights. Thank you very much. I definetely need some sleep. Cheers !!!

Edited by SWANN
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...