Found a little whirly...

Started by dandelO, October 02, 2010, 02:37:05 PM

Previous topic - Next topic

Hetzen

Extremely interesting technique Martin. You've proven that PFs can be rotatated. It would be extremely usefull to be able to have an external input on the Position and Rotation values. It would then be quite easy to animate a swirl or position through Get Frame node, as well as increasing the rotation the further it gets from the centre point.

Got to say I hate using the warp shader to try and do these things, I hope Matt or Jo would think about giving us an input on this.

Cheers

Jon

dandelO

Cheers. We can in fact rotate almost any shader with the shader array node, which I used here. The main problem I don't like about it is that the rotation value requires keying. I don't mind this because I tend to use whole numbers most of the time and usually enter things by hand anyway, it's kind of strange that the shader array node's rotation value has limits of 0-1 degrees instead of 0-360 degrees, who needs a max rotation of 1? I'd get it if it was 0-1=360 but it isn't.
What is good is that you can translate any shader to any XZ point and rotate it around that point, not simply rotating from the origin. It only rotates on the Y, though.
Another cool thing about it is that you can use 'limit effect' in the shader and you get a bounding box of the area it's used on and you can see rotation values incrementally without waiting on a shader preview telling you what it looks like.

It's a good node but just a bit cumbersome.

More to follow...

Hetzen

0-1 is actually quite usefull, especially if you make a repeatable linear colour ramp. As an example...

Get Frame Number - Modulo (1 10) - Dive by 10

Will give you a constantly repeating black to white, which you could feed into the Rotate input.

What we will need to know, is if 0-1 is the same as 0-360, or if it's a vector calculation and in effect is only getting you to 90 degrees (my vector trig is crap, so I'd like to hear from some that know better). I'll do some investigation to find out.

Hetzen

#18
Ok, the rotation value is 0-360, ie you can get 0-360 degrees of rotation. It also allows values above 360.

***EDIT***

So if there was an input on the Shader Array node, you could drive it's rotation with..

Get Frame Number - Multiply (a scaler to increase the rotation amount)

No keyframes, constant rotation. What would also be needed is to offset the centre point, rather than having the bottom left as the shader inputs pivot point.

dandelO

My rotations for the shader array were from -1440 to 1440, as you know, though, there's no way to drive that other than keyframing between those points. I'll tidy up a clip of one of these setups and post again in a bit...

dandelO

#20
Here's a 30 frame skeleton Updated in a following post, file removed.
I've just stripped all the crap I was playing with and left the 3 nodes for the whirly.
A shader array cannot be scaled with a transform shader, which is a shame so, you have to use a transform on the painted shader, adjust the fractal scales and edit the boundary padding in the shader array to make it bigger.

Another pain in the arse is the Y value for the shader array location. Here, it's '0', editing the height makes strange things happen to the cloud layer, as to where the top/base of the cloud appear, even when they say otherwise in the parameters.

It's footery and awkward, clumsy and cumbersome, for now. But it's also extremely simple and it works. Once I work out exactly why the clouds react strangely to the shader array, I'll report back with what I find...

Animation properties are intact for those with access to it. Otherwise, it'll look like this:
[attachimg=#]

dandelO

Got a much nicer one going now using a simple shape shader instead of the painted shader because you need to paint exactly onto XYZ=0 to move it around comfortably. A simple shape can be more easily placed there.

I'd like a shader array that was more like the simple shape shader, its rotation runs through the 360 but, I can't find a way yet to make the simple shape rotation move a fractal. If it had a child layer socket, that would be bloody great. It could then be a one node setup to control the density fractal.

Anyway, looks like this now:
[attachimg=#]
The bar is just 20m guide planes.
I'll post an animation in a few minutes.

Hetzen

I was working on a blues set up to create an upwards cone which would help your masking here. You could then modulate that cone slightlty to get rid of hard linear edges. But I need a little more time with it. Which ain't going to happen tonight I'm afraid. But it's definately a possibility.

dandelO

Cool, the shape is a pain that requires a few random seed and coverage edits to make it nicer. Invert profile and the tweaks-tab help make it more 'coney', for now.

I don't know what's up with my .gif images, they run fine on my computer but online they're much slower and jumpy, as if the frame rates aren't kept, weird. Anyway, here's another:


I know it's a bit extreme at the edges.

dandelO

#24
A little calmer and less grainy. I'm already at 172 samples at quality=2, for a 25m cloud it's a bit much, and still grainy.
I'll need to mess with densities and things.

[attachimg=#]

Still only use the shader array to move and rotate, not the simple shape, that's just the fractal mask and it will move with the shader array controls(you won't see its bounding box move but it will be moved).
[attachimg=#]

jo

Hi dandelO,

Quote from: dandelO on October 03, 2010, 01:38:09 PMI don't mind this because I tend to use whole numbers most of the time and usually enter things by hand anyway, it's kind of strange that the shader array node's rotation value has limits of 0-1 degrees instead of 0-360 degrees, who needs a max rotation of 1? I'd get it if it was 0-1=360 but it isn't.

I've fixed this, it was just an oversight on my part. As with most params in TG2 you can enter values for rotation outside the ranges of the slider, as Hetzen mentions.

Regards,

Jo

dandelO

Great, Jo. Thanks for the reply. I had input values manually for the anim's. The widest of them ranged from -1440 to 1440 degrees, I'm no stranger to whacking things well beyond the limits. :P It just seemed a little strange that the default values were from 0-1. Good to hear that it will make more sense in the future when using this shader. :)

jo

Hi dandelO,

Quote from: dandelO on October 03, 2010, 06:56:30 PM
I'd like a shader array that was more like the simple shape shader, its rotation runs through the 360 but, I can't find a way yet to make the simple shape rotation move a fractal.

The simple shape shader won't rotate a fractal. All it does is rotate the shape generated by the shader.

I suppose I could add function inputs for rotation in the shader array and simple shader shader. However what I think what we need more generally is a system to allow replacing any param (within reason) with a function. Adding function inputs for params directly is a bit of a losing game - you probably won't do it for the ones someone wants to use and it also clutters up the param view for the node with something most people will probably never use. A way to drive params with function inputs that has a minimal impact on the UI is what we need. Keyframing is a fairly good compromise in the meantime, at least it lets you do the rotation.

Good to see someone using the shader array BTW, interesting use too. Note that limiting the effect area is an important optimisation. Although if set incorrectly it could lead to clipping the shader, taking the time to set it up could very well save you a chunk of render time. Very few shaders are able to provide information about their bounding areas to the shader array so it isn't possible to automatically figure out the area it needs to be working with. That means that unless you manually tell it the area to work with it has to evaluate every point rendered for every item in the array, which can get very slow.

Regards,

Jo

RichTwo

Wish I could help you, DandelO, but all I can think of is adding the LooneyTunes Tasmanian Devil with head, arms and legs sticking out...  Too much TV watching as a child, I know.  But really innovative work!
They're all wasted!

inkydigit

Quote from: Rich2 on October 06, 2010, 07:47:27 AM
Wish I could help you, DandelO, but all I can think of is adding the LooneyTunes Tasmanian Devil with head, arms and legs sticking out...  Too much TV watching as a child, I know.  But really innovative work!
I knew that was what I was thinking.lol
ingenious work for sure D!