Planetside Software Forums

General => Terragen Discussion => Topic started by: slowandstupid on August 25, 2015, 10:09:05 PM

Title: Help blending painted shader border?
Post by: slowandstupid on August 25, 2015, 10:09:05 PM
Greetings. I am learning this through mostly trial and error and have been working on modeling a land from a game I play. Things are going well and I have a large portion of the land populated with objects. Well I have not been real happy with the peaks of my mountains, they just don't look grand enough. Enter me learning about Alpine fractals and Power fractals. I played with the alpine fractal and like the look it creates on the mountains but not the periphery of the land. I like how it looks untouched.

I have applied a painted shader to affect just the mountainous area. I like how that area looks with the fractal adjustment but as you can see in the image below I have a large discrepancy between the two areas. Is there a way I can blend the edge of my painted shader to prevent this huge jump and make the change gradual? I tried adjusting to the color of my brush to grey but it resulted in an area about half the height. I'd really need a gradient to be created at the edge and I don't know how. Any help you can provide is much appreciated.
Title: Re: Help blending painted shader border?
Post by: AP on August 25, 2015, 11:16:36 PM
Maybe adding a fractal warp shader after the painter shader might help but it seems using a simple shape shader with a soft color edge might work out better. The simple shape shader could be applied to the alpine shader mask. The soft color edge in the simple shape shader should blend nicely. Another way is using a surface layer using the altitudes to blend both fractals.
Title: Re: Help blending painted shader border?
Post by: slowandstupid on August 25, 2015, 11:57:00 PM
Hi and thanks for the suggestions. I have looked at the three you mentioned and maybe it's just me not knowing enough to do this correctly. I've not been able to see an adjustment. I've included the terrain nodes below. I attempted several iterations on the simple shape shader placing it both before and after the painted shader node and have made adjustments in pretty much everything. Unfortunately, I'm not seeing any changes to the terrain.
Title: Re: Help blending painted shader border?
Post by: AP on August 26, 2015, 01:32:55 AM
I will put something together for you and post the result soon.
Title: Re: Help blending painted shader border?
Post by: AP on August 26, 2015, 02:31:44 AM
Instead of using a painted shader, use a simple shape shader. While inside the simple shape shader under the color tab use the edge profile. Choose smooth step and alter the edge width. You should see a blending change between the alpine fractal shader and your image mask as long as it is aligned with your image map so make certain the type of shape is a circle and alter the size and position accordingly. If you want to alter the pattern of the simple shape shader you can add a fractal warp shader to it also but in this case it might not be needed.
Title: Re: Help blending painted shader border?
Post by: AP on August 26, 2015, 02:33:22 AM
Here is some experimentation that could be of use.
Title: Re: Help blending painted shader border?
Post by: Dune on August 26, 2015, 02:38:38 AM
Perhaps a color adjust shader (between the painted and alpine)  can help adjusting the edges of the painted shader. Or a bias shader (blue node), with a constant scalar of 0.2 or 0.7( or so).
BTW; the simple shape can be warped to shape a nice landform to be raised.
Title: Re: Help blending painted shader border?
Post by: mhaze on August 26, 2015, 04:01:54 AM
Here's an example of a warped simple shape
Title: Re: Help blending painted shader border?
Post by: slowandstupid on August 26, 2015, 07:17:22 AM
Ok, I took a look at both examples and have played around with the simple shape shader. I can get that to work in a general sense but I'm really trying to mask a complex shape. On the opposite side of the scene there are several valleys unhighlighted by my painting to keep them low. I am able to do the complex shape with the painted shader or can do the simple circle shape in the middle and see a good blend. Still can't figure out if there is a way to apply that smooth step edge profile to my more complex shape though. Adding both the painted shader with the simple shape shader does not do it.
Title: Re: Help blending painted shader border?
Post by: slowandstupid on August 26, 2015, 07:23:06 AM
Here's the other side of my terrain to see the more complex shape I am trying to adjust.

Title: Re: Help blending painted shader border?
Post by: Dune on August 26, 2015, 08:25:55 AM
How about mapping it out in greyscale images in Photoshop?
Title: Re: Help blending painted shader border?
Post by: slowandstupid on August 26, 2015, 09:04:17 AM
Is it possible to extract the painted shader into photoshop to do this or would I need to make something new from photoshop?
Title: Re: Help blending painted shader border?
Post by: Dune on August 26, 2015, 10:02:27 AM
It's possible to extract that map, but you'd have to render from the top down and without any displacement, with just the painted shader as color input of a surface shader. Easier to paint in Photoshop from the start (IMHO), and if you need it exact, make a crude topdown render from your terrain, import in PS, and draw your mask on another layer in white, add a layer in between and make that black, merge layers and save as greyscale tif. Measure out how big it should be to fit over the existing terrain and set those measures in the image map shader, and locate over terrain.

But, just tested it, I don't see the problem. Check this out. If you're painted shader has soft edges the masking will go well.
Title: Re: Help blending painted shader border?
Post by: slowandstupid on August 26, 2015, 11:25:05 AM
Will check these out tonight. I may need to redo the painted shader and see if I can improve the edges.
Title: Re: Help blending painted shader border?
Post by: Dune on August 26, 2015, 12:23:00 PM
I like your alias, btw. I hope you're not proving yourself right  ;)
Title: Re: Help blending painted shader border?
Post by: Matt on August 26, 2015, 05:39:10 PM
It should be possible to paint soft edges. If you set the 'flow' amount low, successive paint strokes should only add a small value so you can gradually build up to full white only where you want the full mask. Keep the 'falloff' at 1 so each stroke also its own soft edge.

Matt
Title: Re: Help blending painted shader border?
Post by: AP on August 26, 2015, 07:51:16 PM
So let me see if i have this correct, the higher the falloff the more soft the edges become?
Title: Re: Help blending painted shader border?
Post by: slowandstupid on August 26, 2015, 10:12:29 PM
Tonight I worked through the suggestions. I tried a new paint layer with the soft edges. It resulted in a stepped pattern up to the highest (white) layer but not a smooth transition. I have made a a new image in photoshop from a topdown screenshot. I was able to select the white in the paint shader with the magic wand tool and feathered the edges on a black background. This his resulted in a smooth transition. The gradient has changed the look of the terrain somewhat but after adjusting some of the sliders on the alpine fractal I am happy with what I have. Thanks!
Title: Re: Help blending painted shader border?
Post by: Matt on August 27, 2015, 03:22:17 AM
Quote from: Chris on August 26, 2015, 07:51:16 PM
So let me see if i have this correct, the higher the falloff the more soft the edges become?

Yes, that's right. When the preview is in painting mode, the dashed circle represents the outermost edge of the brush, and the inner circle - if there is one - represents the area where the brush is fully applied. The falloff region is between the two circles. When 'brush falloff' is at 1 (which it is by default), you don't see the inner circle because it shrinks to nothing, and the falloff region is the whole brush. I'm not sure if I'm explaining it very well.

http://planetside.co.uk/wiki/index.php?title=Painted_Shader

Matt
Title: Re: Help blending painted shader border?
Post by: AP on August 27, 2015, 04:19:17 AM
Yes, that makes perfect sense. Similar to photoshop brush setting for hardness.