Jump to content

Sign in to follow this  
TobyB

3D gradient in R20 Node Mat?

Recommended Posts

Hey,

 

I'm trying to make a world space gradient in the new R20 Node Editor. Its a technique I've used many times before, xpresso linking the start & end points of a 3D gradient to Nulls in my scene. However, I can't get my head around the how to do this with the node editor (which I want to use for this to blend multiple world space grads). The gradient tools are quite different in the node materials compared to the non-node mats, and nothing seems to be in world space. I'm sure its something to do with using a 'context' node, but I'm just not getting it. Any pointers? Thanks!

Share this post


Link to post
Share on other sites

Getcontext will get you the uvw coordinates you need to create an own 3D Gradient.

Share this post


Link to post
Share on other sites
  • Topic Author
  • Thanks, Srek. That's what I thought, but I've been at it all day and can't figure out how to link any of the context nodes to get coordinates objects in my scene... Any pointers to get me started. This is the first time I've actually tried to do something complicated with the node material so assume it's my lack of knowledge here.  

    Share this post


    Link to post
    Share on other sites

    UVW is not a global position like an object position, but a position within the UVW space of the object defined by the projeciton. Usually it is in the range of 0-1 for all three components.

    If you want to use the global position of the currently rendered pixel use the position output of GetContext. This will be in scene units.

    Keep in mind that a 3D gradient that is scene space based is pretty specific, while UVW based noise will work in any position.

    Please find attached an example to create a world position based 3D (RGB) gradient. The range mapper defines the mapped area.

     

     

    WorldGradient.c4d

    Share this post


    Link to post
    Share on other sites
  • Topic Author
  • Thanks srek. That's really appreciated. 

     

    I managed to adapt your scene to get exactly what I needed. 

     

     

    Share this post


    Link to post
    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.

    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.

    Sign in to follow this  

    • Recently Browsing   0 members

      No registered users viewing this page.

    ×
    ×
    • Create New...