xpresso to drive all scene materials

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

Thread Tools Display Modes
  08 August 2013
xpresso to drive all scene materials

Hello, I've a fairly simple idea I'm trying to execute in xpresso but being a bit of a novice this simple idea is proving rather harder to get working.

The idea is that all the objects in a scene will have the same shader (colour / texture etc.) But the shader has two states, for instance one red and one blue. The red is matt & the blue is reflective (for example)

A moving horizontal plane will control the position of the line between red & blue with it's Y position. (See attached image).

So where the line of the plane cuts through each object in the scene it will change the shader material from one to the other in a straight line.

Eventually I imagine a layered shader that hides or reveals the bottom shader depending on where the horizontal plane is... so they would look like two completely different materials.

I have put together a scene (also attached) that nearly works though it is FAR from perfect. (the object has to be a specific size and position to work) But it hopefully shows what I mean.

And what I really need it to do is work on all the objects in a scene regardless of their position as eventually I want them to be animating. (But one step at a time!)

I would massively appreciate anyone's help with moving this forward.

Attached Images
File Type: jpg mock_up_01.jpg (48.5 KB, 7 views)
Attached Files
File Type: zip xpresso_line_01.c4d.zip (66.5 KB, 2 views)
  08 August 2013
a linear 3d gradient shader in world space, plug two null objects global pos into the start and end vector.
There are holes in the sky. Where the rain gets in.
But they're ever so small. That's why the rain is thin.
  08 August 2013
Thanks for your reply.

I've done that but not sure how it creates the solid line between the 2 colours that's driven by the Y position of the plane.

Cheers, I appreciate you're time.
  08 August 2013
So I've been playing around and have figured out something that works pretty well. Thanks for the steer littledevil, it worked a treat.
  08 August 2013
when grouping both nulls under another null, the plane will be defined as the plane perpendicular to the vector null1.pos - null0.pos (vector AB). the length of AB - the distance between your nulls will define the falloff/smoothness of your gradient.
There are holes in the sky. Where the rain gets in.
But they're ever so small. That's why the rain is thin.
  08 August 2013
Thread automatically closed

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
Thread Closed share thread

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Society of Digital Artists

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump

All times are GMT. The time now is 08:49 AM.

Powered by vBulletin
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.