Simple shape shader woes!

Started by cyphyr, October 28, 2010, 07:50:55 PM

Previous topic - Next topic

cyphyr

I can use a re-direct shader to distort a simple shape shaders displacement but how can I get the colour to distort as well?
As you can see from the VERY simple example below the simple shape shader maintains its colour in a streight line even though the displacement is distorted.
Both colour and displacement have the same settings.
I have a feeling that there may be a blue function solution but I cant see where I'd add the "get" function.
I've tried adding "compute terrain's" and re-creating the "Re-direct" shader group below the last Compute terrain all to no avail.
Is this doable or am I once again yapping up the wrong tree?!
:)
cheers
Richard
www.richardfraservfx.com
https://www.facebook.com/RichardFraserVFX/
/|\

Ryzen 9 5950X OC@4Ghz, 64Gb (TG4 benchmark 4:13)

cyphyr

24 hours and no interest or answer :(
Is this just a dumb question and I've missed some point that's been covered many times. If so I cant find it.
Sorry, feeling sorry for myself stuck in London looking after ailing parents
Richard
www.richardfraservfx.com
https://www.facebook.com/RichardFraserVFX/
/|\

Ryzen 9 5950X OC@4Ghz, 64Gb (TG4 benchmark 4:13)

dandelO

Sorry, Richard. I downloaded this first and played with it for about an hour looking for a workaround, I should've came back.

No luck yet, the redirect shader seems to only accept/output displacement data. I think that you'd need to separate the colour and displacement functions, I tried using simple shapes after compute terrain, scalar to colour, other things too, to no avail.

It's curious that you can redirect X/Z colour from other colour shaders and image maps etc. but not from a redirected simple shape. I think maybe if the simple shape shader had a coordinate system(like a painted shader does, you can't redirect a 'final position' paint shader but, you can redirect a 'position in terrain/texture' one) then, maybe it'd be possible without a separate colour/displacement workaround.

Sorry for not getting back to this thread afterwards, if I come up with anything I'll be sure to let you know my findings, such as they may be...

dandelO

I think I might have answered the question in my reply, when I think about it from a distance, and I think you're probably right, that you'll need a blue solution(scalar to colour, position in texture) for this. I'll try again tomorrow...

cyphyr

Thanks :)
Probably time I got over myself lol
and went to bed!
Richard
www.richardfraservfx.com
https://www.facebook.com/RichardFraserVFX/
/|\

Ryzen 9 5950X OC@4Ghz, 64Gb (TG4 benchmark 4:13)

Oshyan

Sorry for not responding. Truth is I don't really know the answer. But I think you and dandelO might be on the right track, if it's possible, with a "get position" and maybe some type conversion...

- Oshyan

dandelO

Quote from: cyphyr on October 29, 2010, 08:40:08 PM
Thanks :)
Probably time I got over myself lol
and went to bed!
Richard

Not at all! The night is young! ;)

Dune

What if you feed the information into the blend input of a surface shader and use that as a mask...

Goms

I think the solution is not to use the simple shape shader, as it uses a final position (which is the explanation for the problem imho).
Instead i would use something like this (important: get position in texture):



Quote from: FrankB
you're never going to finish this image ;-)

cyphyr

Thankyou everyone and especialy Goms  ;D
I think this will be the final piece for my the world project. I really wanted a river running through it but not a streight ditch, a propper bendy river.
Apologies for my peve earlier  :-[
better now
Richard
www.richardfraservfx.com
https://www.facebook.com/RichardFraserVFX/
/|\

Ryzen 9 5950X OC@4Ghz, 64Gb (TG4 benchmark 4:13)

Goms

welcome ,)

in this case add a square scalar behind the clamp 0 scalar. this will give you a smoother "beach".
Quote from: FrankB
you're never going to finish this image ;-)

Henry Blewer

I did not have a clue where to even start with this one.
http://flickr.com/photos/njeneb/
Forget Tuesday; It's just Monday spelled with a T

Goms

hm. shall i write some basic "how to use functions"-tutorial? would need some time as i suffer from a small work-overflow atm, but may be useful...
i did a lot with functions the lasts months. and even if there was no usable finished render as output, i think i got a pretty good idea about how to use them.
Quote from: FrankB
you're never going to finish this image ;-)

Henry Blewer

I struggle with them. I do not know the formulas they are based on. I can write functions, then call them...

I think a tutorial would be HUGE. 8) A great help for many.
http://flickr.com/photos/njeneb/
Forget Tuesday; It's just Monday spelled with a T

dandelO

Quote from: Goms on October 30, 2010, 03:18:52 AM
I think the solution is not to use the simple shape shader, as it uses a final position (which is the explanation for the problem imho).
Instead i would use something like this (important: get position in texture):

I knew it would be something like this. As soon as I read back what I wrote about some things that didn't work, it struck me. :D
Cheers, Goms!