Tue, Dec 24, 8:42 PM CST

Renderosity Forums / Vue



Welcome to the Vue Forum

Forum Moderators: wheatpenny, TheBryster

Vue F.A.Q (Last Updated: 2024 Dec 13 6:58 am)



Subject: switch material base on sun angle?


lightning2911 ( ) posted Fri, 06 February 2009 at 12:46 PM · edited Tue, 24 December 2024 at 7:13 PM

i would like the shadow part of a sphere have another material than the lit part ... can this be done in the function editor?

i am thinking i would need an angle of incidence but not from the camera to object but from sun to object.

any ideas how this can be done?

thanks in advance
chris


Cherryman ( ) posted Fri, 06 February 2009 at 2:15 PM

If you don't want to animate you can easy make a mixed or layered material.  Adjust the angle and height to get the distributian where you want it.


nruddock ( ) posted Fri, 06 February 2009 at 2:16 PM · edited Fri, 06 February 2009 at 2:20 PM

I suspect it can be done in Vue 7 (in editions that have full access to the function editor or with the appropriate module installed) due to the new ability to refer to the properties of other objects in a node network.

It may also be possible in Vue 6 an possibly 5 (same proviso) but you'd have to use a constant node instead of being able to refer directly to the Sun.


Cherryman ( ) posted Fri, 06 February 2009 at 2:20 PM

PS. I do not know myself how it fnctions, but maybe the "distance on ray" input node can help here also.


dburdick ( ) posted Fri, 06 February 2009 at 4:04 PM · edited Fri, 06 February 2009 at 4:09 PM

This is easily done in Vue 5, 6 ad 7 although it's a bit more automatic in Vue 7 because you can link the sun direction/orientation to the material automatically.  In Vue 5 and 6 you have to key in the sun rotation values.  Here's how.  Create a mixed material with the two materials you want to use.  Set up the distribution of the materials as follows in the function editor.  Basically, you are just doing a dot product of the sun's rotation against the normal (world standard) of the object.  In Vue 7, you can link the sun's orientation into the function editor automatically -- and when you move the sun around, it will automatically update the material distribution.  In Vue 5 and Vue 6, you have to manually key in the sun rotation coordinates when the sun is moved.

http://www.skinvue.net/Vue7/VueLightFresnel.jpg


lightning2911 ( ) posted Fri, 06 February 2009 at 11:39 PM

dot product ... of course :) you're my hero!
i love the function editor


Privacy Notice

This site uses cookies to deliver the best experience. Our own cookies make user accounts and other features possible. Third-party cookies are used to display relevant ads and to analyze how Renderosity is used. By using our site, you acknowledge that you have read and understood our Terms of Service, including our Cookie Policy and our Privacy Policy.