Problem with Fake Stones Shader

Started by penboack, April 25, 2012, 08:40:17 AM

Previous topic - Next topic

penboack

 Hi Guys,

I have a problem and I was wondering if someone could help me with it.

I am having a problem texturing the stones produced by a Fake Stones Shader. Some of the Stones are not picking up the texture, instead they get the Base Colours. At first I thought that this was caused by the breakup shader that I was using to breakup the fake stone's distribution, so I disconnected it, but the problem persists now on whole stones rather than in the texture of a single stone, which was what happened when the Fractal Breakup shader was connected to the Fake Stones Shader's Distribution shader. Any thoughts on how to fix this?


Kevin F

Just had a quick play with this and removed the problem by switching off "vary density" in the fake stones shader.
You've got a lot of other shader connections in places and combination that I never use so I don't really know if this will do what you want. I stripped your file down to just the base layer connecting into the surface layer, with the stones as a child of this.
It was much easier to test then. I think you have to distinguish better between terrain shaders and "layer" surface shaders.
Hope this works for you.

dandelO

Try this. I deleted the multishader, I'm not sure it's doing what you expect it to. That is normally created inside an object to apply textures to different object shading domains, it has been replaced with the parts shader in recent versions.

Unchecking 'blend as stone density' fixed the texture problem. I initially thought it would have been another issue caused by slope/altitude key in the surface/distribution layers but it wasn't, in this case.

* The stone distribution is slightly different because of the change. [attachimg=1]

penboack

Thanks for your replies and the file.

I've done some more testing. The first thing I did was to reorganise the network so that the "Base colours shader" is connected to the "Surface layer shader" with the "Fake Stones shader" connected to the child input of the "Surface layer shader". The "vary density" setting is indeed the problem.

The reason I used the multi shader was that I had already set up some displacement, when I connected the displacement through the Surface Layer Shader it changed the result. I noticed that the "Surface Layer shader" > Displacement tab does not have some of the settings that you find on the "Power Fractal v3 shader" > Displacement tab, in particular roughness and spikes. It isn't clear to me whether I should be using Displacement on the "Surface Layer shader" > Displacement tab, or use a separate Power Fractal's displacement settings which, I understand, would need to be merged (somehow) with the output from the "Surface Layer shader".

Now I have two questions!
How would I connect more than one child shader to the surface layer shader?
Where do I find the Parts Shader, I can't seem to find it anywhere in the node palette?

Oshyan

Displacement controls in the Surface Layer are indeed not equivalent to a Power Fractal. If you want controls that are available in a Power Fractal, use that, or you can plug the output of the Power Fractal into the Displacement Function input of a Surface Layer if you just want the displacement from it. For multiple children, you stack them, one leading into the input of the next (nested children), keeping in mind that they will influence each other's coverage. It's easier to visualize with the Node List on the left in the Shaders layout.

I suspect you're misunderstanding the purpose of the Parts shader (as well as the multi shader). Both are for object UV mapping only, and shouldn't really be used outside of the context of imported objects. Parts shaders are created automatically when you import an object with associated UV maps. Because of the need to be associated with existing UV maps, they can't be created manually at this time.

Perhaps it would be easier to give specific advice on an approach if you start from a base explanation of what you're trying to achieve. It sounds like you want to mix multiple surface shaders? This can be achieved in a couple ways, depending on how you want them to mix and what shaders you're using. It's not that frequent that entirely separate shader networks need to be merged, but if you do need to do that (particularly if based on some mask), try a Merge Shader.

- Oshyan

Hetzen

Kevin F is correct. I've had a similar issue, and switching off Vary Density does solve the mapping issue when using masks. It looks like a bug to me.

Dune

Interesting observation about the density switch in stones. I never actually touched that setting, but if you move the slider and/or change the seed you see things shifting. Thanks guys.

penboack

Oshyan,

Thanks for your post. I did indeed misunderstand the purpose of the Parts shader (and multi shader), thanks for clarifying that. It is much clearer to me now how to setup the node network using the Surface Layer > Child layers input. Also, as soon as I connected a Power Fractal shader to the Layer Shader's > Child Input I was much closer to the result I am looking for in terms of trying to get the fake stones to look more stone like.

It does look as if there may be a bug relating to the "Fake Stones shader" > Density setting, or the use of Fractal Breakup via a Distribution shader to drive the density, that results in either some stones not receiving the texture, or patches on stones with no texture.

I have uploaded a project files with a restructured and simplified node network.