Jump to content

Create ROP planes with Supermaterial


Recommended Posts

Looks like the variables are missing the export feature for AOVs, looks like It'll work as long as you go into the code an add export to all the variables you want.

For example:

export vector amb = 0;
export vector diff = 0;
export vector spec = 0;
export vector ref = 0;

You add this to the variables declaration, which would be in:

surface
supermat(
     /* code code code code */
)

I would add this after the variables have been added into the mix.

Granted the AOV side should have some variables you can use that are sort of the "standard" ones.

This might be a bit complex if you don't know vex, here's some of the code you're gonna need to have, I haven't tested it, but it should work.

surface
supermat(
    /* All your already defined by SESI stuff in the shader, add this stuff to the END */
	export vector 	amb	= 0,
			diff	= 0,
			spec	= 0,
			refl	= 0,
			trans	= 0,
			emit	= 0;

	export float	drough   = 0,
	               	srough   = 0,
           	    	shadow   = 0,
          	     	refract  = 0,
             	  	apara    = 0,
           	    	aperp    = 0,
             	  	aroll    = 0,
             	  	fresnel  = 0,
              	 	bias     = 0;
     )

To add this plop down a vex super material, right click and click on Type Properties, then on the Code tab, search for the start of the Surface definition and paste the stuff there.

Then you do your AOV render planes in your mantra node.

Hope this helps.

Link to comment
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.
Note: Your post will require moderator approval before it will be visible.

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.

×
×
  • Create New...