mental ray distance between support problem

Become a member of the CGSociety

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

Thread Tools Display Modes
  04 April 2004
mental ray distance between support problem

guys help out, i have a network that controls a ramp V value based on distance from a sampler info point on surface to a locator. i am using the distance between node to calc the distance, problem is mental ray SEEMS not to support this node in some way. i am not getting any gradiation when i use that node in mr, but it works fine in maya.
any ideas how i can bypass this? find a replacement for the distance calculation for each point on the surface of the shader on the object to a locator in the scene.

i attached the network graph (btw thanks mdme_sadie)

the sampler info global position point and locator world pos are connected to the distance between, that is connected to a multiply by x to control scale and clamped to 0-1 to control V on the ramp.
right now the ramp colors the shader just to test it, later on it will be used to control reflection decay,blurriness and so on..

if you can tell me of a workaround to make this work with mr i'd be most grateful.
thank you
Attached Images
File Type: jpg network.jpg (18.9 KB, 49 views)
  04 April 2004
i got same problem with distanceBetween Node ,I think it shoud
be instead by use vectorProduct node and multiply node to calculate the distance between two vector ,but, i almost forget
all of maths i have learned,so......someone can help ?

I believe i can fly
  04 April 2004
hey guys, well you can do it the longer way, distance between two points is just :

the square root of ( x1*x2 + y1*y2 + z1*z2 )

so i'll see if i can quickly put the network together that will do this for you in maya ple, and then you should be able to happily go on your way.
The Third Party | Homepage | My Reel
"You need to know what you're doing before you start, and to start because you need what you're doing."
  04 April 2004

thx Mdme,but i have some confusion:

x1*x2 + y1*y2 + z1*z2 is a dotProduct to get the cosine of the
angle between 2 vector and in maya distanceBetween Node is

but i don't kown which node can be used for "the square root"...if i won't use expression.....[IMG]
thx for respond :-)
I believe i can fly

Last edited by SIMPLE : 04 April 2004 at 10:00 AM.
  04 April 2004
i dont know if i am wrong about this

but i've tried using an expression on the multiply node to do the calculation from the sampler info and the locator. it seems it only does it once or just for the entire object. not per pixel.. i am getting no gradiation just like using the distance between node in mr.
hmm maybe there is something there..if both result to the same thing, could it be an unnsuported hmm math convertsion of sqrt() from maya to mr?

still no go.. anyone else have any ideas? i'm hanging on straws here.. any mr shader gurus, i'd love a working distance between node..plz
  04 April 2004
The distance between node doesn't appear to be directly supported by mental ray. It's not even read in durring mental ray's initial shader decleration durring rendering, so it doesn't appear to be supported.
  01 January 2006
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 06:45 PM.

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