Is there a way to soften the edge of the source input for a blend shader? I'm using a fake stone as it's own mask into a surface layer and the problem I'm having is that where the stone meets the underlaying surface there's a very sharp cutoff. I'm thinking this is happening because the the fake stone itself has a very sharp falloff around it's edges so I was thinking that some sort of blur or something between the output of the fake stone and the blend shader input on the surface layer would alleviate this issue.
Is there such a thing?
Thanks
Greg
Not that I know of but I'm sure someone can work some magic with the blue nodes. We could do with a blur node a grow and shrink white/black for masks
No, there is not. I have wished many times there was a blur mechanism... The only option I see is using a different setup for your stones, based on soft edges. There are several ways, but here's one: http://www.planetside.co.uk/forums/index.php/topic,15345.0.html (http://www.planetside.co.uk/forums/index.php/topic,15345.0.html)
Or use a perlin fractal for stones distribution and blender for the surface layer, which is simpler, but maybe inadequate.
Hi Greg,
As said before it's not possible to blur/soften the edges of the fake stones' pattern.
However, there may be other approaches possibles, but before we can go into them I'd like to know what you're trying to achieve?
Blending fake stones as its own mask sounds a bit "double" to me and I'm not sure what you're trying and why?
There are other ways of completely restricting displacements and shading to the fake stones shader.
Cheers,
Martin
Hi,
This sort of thing comes up quite often but I should point out that it can be difficult and/or slow to blur procedurally generated masks and patterns. To blur a procedural mask would mean you'd have to sample a number of point surrounding the point being evaluated. Let's say you had 8 samples, which probably wouldn't give very accurate results. That means you'd increase the computation time for the shader by 8 times. That's the reason that there aren't ways to blur this kind of thing. The same sort of issues apply to shrinking and expanding a mask.
I'm not sure any CG apps support blurring procedural textures. A quick search seemed to back that up. It's certainly not common.
It's easy to do this for image/bitmap based masks but procedural masks are another thing altogether.
Regards,
Jo
Hi Dune, I'd forgotten efflux's work worth exploring I suspect. Surely can't be that hard Jo, PS does it with selections easily enough. It could be localized/selected with position coordinates and an area size and based on expanding /shrinking a choice of black or white areas.
World-Machine does blur their procedurals, but it's completely different as the procedurals are first rasterized into heightfields and then will be blurred.
So essentially it's not procedural blur.
Perhaps we can rasterize the procedural texture locally and then perform blur?
This definitely has limits to its usefulness of course, but I'm just trying to think out loud along here of course.
You can achieve something towards this by plugging your Power Fractal into a Surface layer's or Distribution layer's child slot and changing the "Fuzzy zone softness". It's set to a default of "1", lower values make the power fractal sharper, higher make it softer. Not a perfect solution I know.
Richard
Just a thought. I use the preview windows a lot. You can center an area of interest, see images of fake stones extracted using displacement to vector node. and then enlarge it . IF you could render at a higher resolution and then have some means of outputting the image as a .bmp you would have a useful mask that could be modified in PS or other image editing program. This must be possible and should be easy to implement.
As you can see from the images there is not enough resolution to make them useful and you would have use print screen to extract them to PS. But maybe this could be the way to do it.
Of course one could first rasterize the procedurals at a *finite resolution*, and then blur. This would be more efficient than trying to blur the procedurals somehow, as Jo indicated. But it would mean working at a finite resolution, and depending on the detail level needed and the area covered, this could really be a "big data" problem. It's not out of the question, but as Jo mentioned, there's a reason that "blurred procedurals" are not a commonly available thing.
Probably the best approach in this case if the original request is still desired, would be to work on exporting the rock mask into a raster image format (top-down render with black/white color masking perhaps?), then blur that, and use an Image Map Shader with the blurred image to blend, instead of the fake stones output itself.
- Oshyan
Yes that would be an approach Oshyan and you're right about the limits of resolution for rasterizing.
It would be nice to know where he wants to use it for though.
I have the feeling he's intending to use it to mask displacement and shading to his rocks, for example, and you don't need any kind of mask for that.
Yes, I certainly agree T-U. Often times we get caught up in approaching things a certain way, and it's helpful to step back and get some perspective about the end goal rather than a specific method. Sometimes there are simpler ways to do things. :)
- Oshyan
Thanks for all the replies everyone. What I'm trying to achieve is restriction of the surface layer properties to just the fake stones after I've run them through a few displacements. I've got a surface shader that I like but it's everywhere on the terrain. I want to limit it to just the fake stones I've built up and displaced so to do that I've used the fake stone source as a blend shader mask on the surface layer. It nicely restricts the shader to just the fake stones but it has a nasty side effect of also abruptly cutting off the surface shader and fake stone displacement at the fake stone's boarder. What I want is more gradual falloff. Thinking like a compositor in Nuke, I'd make an edge matte and blur it, but I don't see the tools in TG to do that. Or maybe I'm just approaching this incorrectly.
I also thought of just applying the shader to the stones before I add them to the terrain but the shader still wanted to put itself everywhere, not just on the stones.
Thanks again
Greg
Yessss there you go!
The trick is to use smoothing in the surface layer where you put your fake stones on.
I'll explain briefly:
Make a couple (if you wish) of fake stones layers and merge them with merge shaders which are set to "highest" blending mode.
This will prevent your stones from being placed on each other.
The output of your single or multiple fake stones goes into the child layer input port of a surface layer.
In that surface layer disable the diffuse colour, because that will now be provided by the fake stones.
In the smoothing tab enable smoothing.
Smoothing "reverts" the surface layers' displacement and shading it receives from the shaders above it in the network up to the first compute terrain it meets.
If you don't do this then the fake stones will inherit the displacements as well as the shading and vice versa.
Now add a lambert shader or surface layer to your fake stones surface shader input and give it a fancy colour and you'll notice it's exclusively applied to your fake stone(s).
The same accounts for displacements.
Ok, I think I figured this out using a different technique. I'll post a pick of what I did later but what id like to know now is how does one layer up displacemts on fake stones? I put a voronoi displacer into the fake stone shader input which gave a nice look. Now I want to continue to add more displacemts on top of that.
What's the best way?
Thanks again
Greg
Quote from: gregtee on February 20, 2013, 03:32:26 AM
Ok, I think I figured this out using a different technique. I'll post a pick of what I did later but what id like to know now is how does one layer up displacemts on fake stones? I put a voronoi displacer into the fake stone shader input which gave a nice look. Now I want to continue to add more displacemts on top of that.
What's the best way?
Thanks again
Greg
I found it's generally best to compose all desired displacements in color space first, then run the result through a single displacement shader.
Colour space gives you a bit more control and more expected results, so that's a good option indeed.
It's easier to build a noise function when you know that what you see in the preview is all in 0-1 colour range.
What I mostly try to do is first use a powerfractal which has feature size rougly 1/3 to 1/2 the size of the fake stone you're displacing.
Set the displacement factor similar or a bit smaller to the feature size.
Use 6-8 noise octaves (this means adjust smallest scale accordingly).
Then duplicate the fractal, change the seed and divide scale settings by 3 or 4. Do the same for the displacement factor.
Repeat this so you have a 3rd fractal.
The advantage over working in colour space exclusively is that you can apply colour along with the displacement which will perfectly match the displaced geometry.
The disadvantage here is that controlling the displacement spikes can be a bit tricky.
Quote from: gregtee on February 20, 2013, 03:32:26 AM
Ok, I think I figured this out using a different technique. I'll post a pick of what I did later but what id like to know now is how does one layer up displacemts on fake stones? I put a voronoi displacer into the fake stone shader input which gave a nice look. Now I want to continue to add more displacemts on top of that.
What's the best way?
You can chain your displacement shaders one after another in the usual way - through the "input node" plug on each shader - and then the last node plugs into the fake stones shader input.
Matt
Quote from: Tangled-Universe on February 20, 2013, 04:02:53 AM
...
The disadvantage here is that controlling the displacement spikes can be a bit tricky.
I found this to be the opposite. I get spikes often when combining displacement. When I compose it in color space, I have so many options on how I want one pattern to mix with another. Often I can simply add color, or multiply it. Or a combination, or merge color in ever so slightly... which usually saves me from having to deal with spikes. But perhaps it depends on the situation.
Hmmm...we have different experience then, although I reckon I sometimes run into the issues you describe.
As I said it's true that working colour space exclusively that these problems can be avoided more easily.
What works for me is to examine what each PF does 1 by 1 and then start adding them up in the way Matt explained.
The displacement roughness and spike limit are useful for limiting weird spikes and controlling the "opacity" of the displacement.
If your deriving displacement from colour values then taking the Colour roughness in the colour tab down to 1 or lower helps with unruly spikes. Also of course Displacement roughness and spike limit.
Richard
Quote from: cyphyr on February 20, 2013, 06:05:59 AM
If your deriving displacement from colour values then taking the Colour roughness in the colour tab down to 1 or lower helps with unruly spikes. Also of course Displacement roughness and spike limit.
Richard
Yes you're right about the colour roughness (this skews the fractal towards the smallest scale).
However, displacement roughness and spike limit only apply when displacing using a PF.
If you displace using colour-space then you displace using a displacement shader (input port on shaders) which does not offer roughness or spike limit parameters. The substitute of these parameters in colour-space are PF high/low colour + contrast/offset/roughness.
When you displace with a PF the colour settings of that PF do not influence the displacement.
The colour will only match the displacement and you can only control the colour appearance using the high/low colour + contrast/offset/roughness.
Great thread so far.
Another question. I see that there are Boolean operators available. Can these be used to cut out geo from fake stones using fractals as the negative space? It seems one could make some interesting volcanic type formations of this was possible.
Basically what I'm trying to do is create a coral reef. I've found a lot of great reference on line and as always, god is in the details. Many of these underwater formations were formed from god knows how long it took for stuff to build up and layer itself over and over on top of older growth and over time it starts to look very craggily and rugged with lots of interesting outcroppings and holes all over the place.
I've got something that's a good base but its far from realistic at this point, but it occurred to me that what I needed in addition to more detailed displacemts was some negative space cut into the rock formations. Can the Booleans do this?
Thanks again, very helpful thread.
Greg
Basically the answer is 'no'. You can't boolean cut the way you propose it. TG's surfaces aren't volumetric in the sense that you could cut away a volume with fractals.
The planet object is a hollow sphere of which you push and pull the surfaces with displacements.
There are probably ways to fake/mimic the effect you're looking for, so a more precise description and example of what you want would be helpful.
but you can displace inwards, which, depending on the use case and the execution, can look like a cut :)
Quote from: FrankB on February 20, 2013, 11:33:45 AM
but you can displace inwards, which, depending on the use case and the execution, can look like a cut :)
Yup, not a 'but', but an example of faking/mimicing it :P
"Boolean" in this case means in the logic sense, not the modern 3D geometric sense, i.e. true/false: http://en.wikipedia.org/wiki/Boolean
Terragen does not currently support boolean geometry operations, e.g. add, subtract.
- Oshyan