PDA

View Full Version : how do i make a surface thickness shader


adboy
05-02-2006, 07:34 PM
hi i have an object in a surface thats going to be water
i'm trying to make the "water" look more transparent when its closer to the object

coming from a lightwave background i'd just use a surface thickness gradient, set tha gradient range and a value at each end

how would i acheive this effect in xsi

thanks in advance

JDex
05-02-2006, 09:14 PM
See if this Thickness shader can help.

http://www.xsibase.com/tools/shaders.php?detail=1090

adboy
05-02-2006, 09:50 PM
hey that shader works well but i wouldnt mind a hand built method, still trying to learn xsi and every little bit helps me understand two bits more

also i have the normal problem of running out of underlaying geometry so the trancparancy or whatever just resets itself, is there anyway to make it "continue"

JDex
05-02-2006, 10:04 PM
I'm not really sure how to build the same effect in the RT... though I'm sure it's possible. I'm also not sure how many surfaces that shader is capable of passing though (if there is a limit, or if there is what it is)... but turning up the refraction ray depth may increase it.

adboy
05-02-2006, 10:10 PM
ah its not the ray depth thats the problem, i have an object in the water that spreads out
so when the water surface has geometry to measure too it reports back a varying value based ont he distance between surfaces (as expected) problem is once i run out of "object" the transparancy setting goes back to 100 so u get a nice smooth gradient then a sudden step back to completely transparent

RenisanceX
05-03-2006, 01:06 AM
coming from light wave back ground i can tell you the same effect and be done with much more control in xsi using either and incidence or gradient driving the transparency or translucency of you shader...

adboy
05-03-2006, 01:14 AM
yes but how

i tried a scalar state with a ray length to control it, incedent angle didnt seem to work for this either now when a distance not and angle is whats needed

if u could enlighten me about the method u have used i would be greatfull

Felipe
05-03-2006, 01:34 AM
Are you plugging the gradient node in the volume port of the material ?
Scalar_state with ray length -> input of the gradient mixer -> volume port of material

Adjust the range in the gradient shader to match the ray length input you want.

Cheers,
Felipe

adboy
05-03-2006, 01:32 PM
i tried that before but it didnt work, i think its becase the water and the object arent one thing so the volume option didnt work

RenisanceX
05-03-2006, 04:42 PM
how???

well try felipes way or

try creating a planar coordinate for the gradinentt in the direction you want and simple go about it that way....


use 2d text gradient with the coordinate node
laslty there is the option or driving it by weights similar to lightwaves own process

adboy
05-03-2006, 05:46 PM
how???

well try felipes way or

try creating a planar coordinate for the gradinentt in the direction you want and simple go about it that way....


use 2d text gradient with the coordinate node
laslty there is the option or driving it by weights similar to lightwaves own process

i think u somehow missed my last reply about already trying that and that it not working

and the thickness gradient in lightwave isnt weight driven

the whole idea is for it to be automatic around objects droped into the water so setting up a co-ordinate system wont work cos it would limit the objects that could be used
i'll attach and example of the basic effect using the plugin

Sbowling
05-05-2006, 05:17 AM
from the screen shot it looks like you are using a 2 dimensional plane for the water. Try using a cube with the volume setup and see if that works.

RenisanceX
05-05-2006, 06:01 AM
adboy sorry if i missed your post about that.

p.s there is a weight option in l.w for that as far as i can remember lw8.x

adboy
05-05-2006, 06:46 PM
hmm seemingly no effect witht he solid cube :(


and yea there is a weight controled gradient but the thickness is a different type

Sbowling
05-07-2006, 03:11 AM
I've attached a simple vbs script that will build a simple scene with a thickness effect.
Copy the contents of the VBS file into the script editor in a new scene and run it.

The only real problem with this setup is that the objectes that intersect the "water" take on the gradient color. I'm not completely sure how to adjust this to that it blends the two colors.

adboy
05-07-2006, 09:39 PM
sam thank you very much, will take a look and reverse engineer the scripting too as i've been meaing to look into that too

once again thanks

adboy
05-08-2006, 06:12 AM
ah now i see how the volume setting is supposed to work:)

dont think it'll work for the effect i want cos the ray length that needs to be measured is between the water and the surface below it

spikkel
05-09-2006, 02:23 PM
Not sure if I understand you correctly but how about using dirtmap and plugging that into the weight of a two colour mixer with black and white as the two colours, which is then plugged into your material transparency.

Then tweak the black and white colours in the mixer lighter or darker, to get a differant transparency intensity. Might also help to plug the mixer into the Index Of Refraction of your illumintation shader (phong or whatever).

This is a dirty way to do what I think you want and not really a replacement for the thickness shader but it might work.

I think.

RenisanceX
05-09-2006, 04:41 PM
so i used and incidence and set it to surface vector and its worked ..no tweaking needed all camera base...i will attempt later to see if i can affect the spread and post the tree and whats not
the dirt map idea seems very plausible

RenisanceX
05-13-2006, 08:34 AM
WaterSurfaceSahdow

WaterSurfaceShadow is the shadow shader of WaterSurface. It uses the same parameters. When looking at water from above, the surface's transparency and reflectivity changes according to the viewing angle. When looking up from below, this effect is amplified: some areas are completely reflective, while others are completely transparent, with little transition between them.


this is what i came acrosss its a lume shader

adboy
05-13-2006, 09:31 AM
yea the fresnel effect

are the lume shaders built into xsi now?

adboy
05-13-2006, 05:13 PM
found em on xsi base, nice shaders

just in case anyone else is after them heres the link (http://www.xsibase.com/forum/index.php?board=12;action=display;threadid=21938;start=0#msg142697)
versions for xsi 4.X and 5.X

CGTalk Moderation
05-13-2006, 05:13 PM
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.