Adding 2 displacements, error/warning vex compile

   5439   6   2
User Avatar
Member
257 posts
Joined: 11月 2010
Offline
Morning,

had an error/warning when trying to add 2 displacements. First one was from a mix of anti-aliased noise and turb noise, second one i was hoping to displace the veins generated by the “Wood” texture operator. The anti-aliased noise and turb noise works fine on their own but error pop when the wood is plugged in. Tried making a new parameter to output the vein amount, same error occurred.

Is there something wrong about my setup? Want get horizontal line cracks on the rock's surface, ref image & hip file are below.

Many thanks!

eitht.

Attachments:
rock_msb_05.hipnc (349.6 KB)
aanoise_and_veinAmount.png (54.0 KB)
img_7655.jpg (122.2 KB)

User Avatar
Member
860 posts
Joined: 10月 2008
Offline
Are all the variables you use deriving from a displacement context?
--
Jobless
User Avatar
Member
257 posts
Joined: 11月 2010
Offline
Soothsayer
Are all the variables you use deriving from a displacement context?

Sorry, do you mean the displacement globals? Is the wood operator just for surface shading and plugging it into displacement output causes such error?

eitht.
User Avatar
Member
299 posts
Joined: 1月 2010
Offline
As you seem to be displacing along the same normal i would suggest adding together the displacement amounts instead.

Also what compilation error do you get?
Drive, monkey, drive!
User Avatar
Member
257 posts
Joined: 11月 2010
Offline
Same errors happened when adding displacement amounts.

oops right.. a list of errors related to variable “I” & “ii”, checked the global variables and i don't have the I variable plugged in anywhere or is it being used although it is not plugged?

The only time it would go away is not adding the wood to the noises.

eitht.

Attachments:
vexError.png (69.4 KB)

User Avatar
Member
299 posts
Joined: 1月 2010
Offline
It is probably because the wood is using surface shader inputs and is therefore calculated in the surface shader. Then you can not use it as input as it is not existing because the displacement shader is calculated before the surface shader.

Try using it only for displacement or try adding two of them. If it dont work then wood is restricted to the surface shader.
Drive, monkey, drive!
User Avatar
Member
257 posts
Joined: 11月 2010
Offline
Erik_JE
It is probably because the wood is using surface shader inputs and is therefore calculated in the surface shader. Then you can not use it as input as it is not existing because the displacement shader is calculated before the surface shader.

Try using it only for displacement or try adding two of them. If it dont work then wood is restricted to the surface shader.

Aye, appears that it is only for surface shading. Wasn't aware displacement was calculated before surface, now I know…
Thanks Erik.



If I may ask a side question also related to displacement, is it still true that displacement is still calculated for Mantra Surface even no map or noise is enabled, anybody? Thanks in adv!

eitht.
  • Quick Links