R8 :: HOWTO :: Materials with XPresso


#1

A more thorough version of this tutorial is now available at MAXON’s website.

OK - we’ll try to split answers to questions into HOWTOs for easy reference. Here’s the first in response to mdme’s questions about xpresso & materials. This isn’t necessarily practical - but serves as a good primer to xpresso & materials.

[list=1]
[li]Create a null object
[/li][li]In the Attrib. Manager, choose Add User Data from the User data menu.
[/li][li]Type “Color” in the name and choose “color” from the datatype drop-down
[/li][li]Choose Add User data again and add a float named “Refract”. Set units to real, min to 1, max to 2 and step to 0.1
[/li][li]Create a new material
[/li][li]Add an XPresso tag to your null object (OM-> File-> New Expression-> xpresso Expression).
[/li][li]Drag & Drop the material and null object into the xpresso window.
[/li][li]Click the red box on the upper right of the null object node to expose the outputs and choose User Data->Color->Color
[/li][li]Click the blue input box of the material and choose Color->Color->Color
[/li][li]Drag a wire between these two color nodes
[/li][li]Add an output node in the same way for User Data->Refract
[/li][li]Add an input node on the material for transparency->transparency refraction. And drag a connection between these two nodes.
[/li][li]You can now control the color and refraction of your object using the user data fields. You can keyframe the user data fields by choosing “set keyframe” from the context menu.
[/li][/list=1]


#2

Your xpresso window should look like this:


#3

Very cool… :slight_smile:

Did you also mean to say: Apply material to Null object?

It wouldn’t work for me until I did…or was that too obvious? :wink:

Cheers,

J>


#4

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.