PDA

View Full Version : Argh - how to do Y axis transparacy?



simonwoods
03-18-2007, 12:24 PM
I'm trying to do something I used o set up all the time in my old software - surely simple to do - but I cant sus it! Heres what it is -
I used to set up a turbulence traveling over y axis for fire, then use the same node to have the flames fade out at the upper y end - this culd also be used say to do a plank of wood which has been roughly broken off/weather'd at the top end - just plug that turbulence thru the opacity set to y axis - all I can get is variations on the theme, but nothing acceptable - how do I get that opacity to be nice and jaggy short of making an image map?
http://img.photobucket.com/albums/v697/lordnut/transy.jpg

Sensei
03-18-2007, 01:22 PM
In gradient I see color=black and alpha=100%.. Do you have reverse on color=white and alpha=0%? You have not connected color output of gradient but alpha, so colors are unused, just alphas..

tribbles
03-18-2007, 03:34 PM
I did something like this - although I'm not sure exactly if I did the right thing.

I firstly set up a gradient Y fade, which was nice and smooth. I then put in a random displacement on that Y fade, so it moved it around.

simonwoods
03-18-2007, 04:03 PM
Well I got to say -I been messing with this for hours and I'm getting nowhere - I got no idea why the color makes any difference or how 1/2 the stuff in LW works -

tribbles
03-18-2007, 04:41 PM
Do you have the basic gradient working? It kinda looks like you have in the picture (although it would've been clearer without a black background).

If that's the case, then what I effectively did was make the gradient an input, and use the spot info to give me the Y axis, which I then added another 3D texture (doesn't really matter which) to the Y input.

The only problem I had was that I had to do some normalisation to make the input gradient 0..1 - otherwise the maths seemed to go a bit awry.

simonwoods
03-18-2007, 04:43 PM
this is the sort of thing I mean - this isnt animated shade, but would be simple to set up - I know I'm missing something:
http://img.photobucket.com/albums/v697/lordnut/shade.jpg

simonwoods
03-18-2007, 05:05 PM
I'm not great at math - but I got this far
http://img.photobucket.com/albums/v697/lordnut/crop1.jpg
and I figure if I add the result from the turbulence to the grad, I'll get what I want -
http://img.photobucket.com/albums/v697/lordnut/crop2.jpg
But I dont - whats gone wrong?? The one over-rides the other - I tried subtracting, multiplying, dividing - everything - obviously I'm barking completely up the wrong tree :help:

simonwoods
03-19-2007, 06:23 AM
My apologies if I sounded a bit batty yesterday - I just couldnt figure out how these nodes were working - never could in my old software either!
http://img.photobucket.com/albums/v697/lordnut/crop4.jpg
I guess thats as far as I go with that particular method

Sensei
03-19-2007, 07:06 AM
I tried node Gradient Y here and worked fine.. It looks like Y is in object coordinate space, not world coordinate space so it's important to set up right ranges - positions in gradient.. Do you want example scene?

Sensei
03-19-2007, 07:16 AM
One important thing to check - do you have Ray Trace Transparency turned on in Render Globals?

tribbles
03-19-2007, 07:58 AM
My apologies if I sounded a bit batty yesterday - I just couldnt figure out how these nodes were working - never could in my old software either!
http://img.photobucket.com/albums/v697/lordnut/crop4.jpg
I guess thats as far as I go with that particular method

Try multiplying the output of the FBM node by 5.

simonwoods
03-19-2007, 04:23 PM
I'm going in circles a bit, here's my latest effort - works quite nicely - tho better on the yellow than the red
http://img.photobucket.com/albums/v697/lordnut/crop5.jpg

simonwoods
03-19-2007, 04:42 PM
As an afterthought, I duplicated those colors, then added the 2, just to see if I could get the nice jaggies in both channels, but they just cancelled each other out and gave a gradent as if nothing added but black, or white, or whatever.

Here I changed the yellow channel for red, it makes it look better, but only cos the red is a more contrasty color - nyone got any more ideas?
http://img.photobucket.com/albums/v697/lordnut/clip7.jpg

toby
03-20-2007, 03:20 PM
Just thought you should know that colors in a gradient layer determine value. White=100%, black=0%. So you had a 0 value gradient with the alpha fading out. This is one reason I never use the alpha value in gradients unless there's a layer below that I want to reveal - I just use black to white. The alpha setting just confuses things.