Guest Swann Posted February 16, 2010 Share Posted February 16, 2010 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 . 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 Quote Link to comment Share on other sites More sharing options...
Guest Swann Posted February 16, 2010 Share Posted February 16, 2010 (edited) 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 ? Edited February 16, 2010 by SWANN Quote Link to comment Share on other sites More sharing options...
Guest Swann Posted February 16, 2010 Share Posted February 16, 2010 Another problem. When I change rendered object to sphere it renders as a flat object. Don't know why. Quote Link to comment Share on other sites More sharing options...
Guest Swann Posted February 16, 2010 Share Posted February 16, 2010 (edited) 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********* Thank you And here is the file. DOWNLOAD: wypociny.HIP Edited February 16, 2010 by SWANN Quote Link to comment Share on other sites More sharing options...
mrice Posted February 16, 2010 Share Posted February 16, 2010 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 Quote Link to comment Share on other sites More sharing options...
Guest Swann Posted February 16, 2010 Share Posted February 16, 2010 (edited) In both examples I turned of shadow.This is whats shows up when two light are ON. It's yellow only on one side. 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. Anyway, nice progress, thank you. Edited February 16, 2010 by SWANN Quote Link to comment Share on other sites More sharing options...
Guest Swann Posted February 16, 2010 Share Posted February 16, 2010 Directly from your file. Here you can see better how second half looks when two lights are ON. Exactly the same like when one light is on. Quote Link to comment Share on other sites More sharing options...
Guest Swann Posted February 16, 2010 Share Posted February 16, 2010 On the other hand, your file mae also good for both lights. Done some more tests: 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. Quote Link to comment Share on other sites More sharing options...
Guest Swann Posted February 16, 2010 Share Posted February 16, 2010 (edited) 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 February 16, 2010 by SWANN Quote Link to comment Share on other sites More sharing options...
mrice Posted February 16, 2010 Share Posted February 16, 2010 no problem, sounds like me almost every day. Glad it helped. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.