Warp shader and Image map?

Started by Roberts, July 19, 2010, 07:22:19 AM

Previous topic - Next topic

Roberts

Do they work together? Can I use the warp shader to warp an image map? I am able to set up a node network with a PF shader that is warped by a warp shader, but if I change the "shader" in the warp shader to use an image map shader instead, the warping effect is lost...
Is this a limitation to the program or is it- as usual - my own limitation... ;)

Regards

Robert

dandelO

#1
You need a 'get position in texture' function and 'plan Y' mapping in the image map shader, otherwise, the image map shader can't provide any tex coords to be warped. :)

LIES!

I had my brain on backwards before I typed that, of course an image map supplies tex coord's to the warp shader, it has its own position translate fields! :D

See below, sorry. :)

Roberts

Thanks for your reply DandelO!

But where do I plug the "get position in texture" function? Into the image map shader or into the warp shader?  Plugging it into the "input" of the image map shader seems to do nothing (which makes sense to me). Plugging it between the image map shader and the warp shader just gives me funky colors and a noise pattern...I have tried both ways, so maybe it´s supposed to be some other way around?

Thanks

Robert

dandelO

I'm sorry, Roberts. What I typed up there is completely wrong.

An image map shader is actually one of the shaders that doesn't require a 'get position in texture' node.
A power fractal, however, in my experience, does. I was back to front, sorry.

I don't understand how you're warping a power fractal without it, a single power fractal won't feed any texture coordinates to the warp shader. Could you post a screenshot or example file?

*** Ahhh, perhaps the power fractal that is being warped is linked to the main node chain before the planet, taking coordinates from the  compute terrain node? I like to warp the raw shader before adding it to the main network.

I'll post an example of how I'd do it for both methods in a wee while, unless anyone beats me to it, a bit busy right now, getting ready for a festival! 8)

dandelO

#4
So, here's how I'd warp an image map shader, which is your main question:
[attachimg=#]
You can either use only one of the X,Y or Z inputs of the redirect shader to specify the warp direction or, use them all to warp in all directions. Since there's no displacement here, I used only the X and Z.
A good thing to also note here, for anyone who doesn't know, is that, the amount of warping applied comes from the 'displacement amplitude' of the warping power fractal shader.

Warping a power fractal is a little bit different(the way I do it, at least), I'll post that later, on my next break... :D

Roberts

Perfect!

Thank you so much, DandelO! It´s working! (which you already know, of course ;))

Now I can add some irregularities to my imagetextures.

Regards

Robert

dandelO

Here's the way I'd warp a power fractal shader:

[attachimg=#]

A power fractal shader supplies no tex coord's to the warp shader when used on it's own so, the warp shader doesn't know what to apply warping to. Just plug a 'get position in texture' node into its input to supply them.


dandelO

#7
Quote from: Roberts on July 20, 2010, 06:22:03 PM
Perfect!

Thank you so much, DandelO! It´s working! (which you already know, of course ;))

Now I can add some irregularities to my imagetextures.

Regards

Robert

:) Glad you got it going!
There's very little documentation for things like the warp shader or, rather, how to use it on different kinds of shaders, and such. Other than to say it 'warps a shader by another shader', there's no instruction about its implementation for the different types of shaders that could be used with it.

For example: I've never seen written that;

- The warp shader's amount of warp is controlled by the 'displacement' value of the 'warper'...
- That, warp direction needs to be specified independently, via yet another shader(redirect)...
- Or, even, that tex coord's are required at all, for the most common TG2 shader, that would most likely be used here(the power fractal).

The above may, or may not, be completely true, like I say, I've never seen any actual instructions on the correct operation of the warp shader.

I'd like a warp shader node, that includes a built-in 'Get position from input-A/B', with 'Warp direction X/Y/Z' check-boxes and, its own 'warp amount' parameter. That would keep things all in the one, convenient node. And, it would work just like the node reference says it should! ;) :D

dandelO

* Sorry, best to also mention that;

If you're warping a power fractal in the above way, make sure that both its 'high' and 'low' colours are checked(even if one of them is black).
If you don't, you'll just get the 'funky colours and a noise pattern', that Roberts found above. ;)

Henry Blewer

I had to bookmark the site. The critics are raving!
http://flickr.com/photos/njeneb/
Forget Tuesday; It's just Monday spelled with a T

airflamesred

Great site DandelO - Terragen with a VIZ topping!

Dune

I had a great time checking out your site, Dandel0. Your creativity is virtually endless. Thanks.

---Dune

dandelO


Hannes

This is fantastic. A few days ago I wondered how an image map shader could be warped and right now I just read your solution. Thank you!!!!!!!!!!!!!!

Hetzen

Good investigations here DandelO. The Warp shader and Redirect have always seemed a liitle aloof in what they do. It's good to see you put in some leg work on these, because the documentation is, I'm afraid, pants, on two important shaders. Saying that, I've never needed to use a 'Get Position in Texture' to drive a PF before, I think you maybe mistaken on that front, but I'll hold my hands aloft if you proove me wrong (or a DJ kicks off on a belting tune).