This originally started over here http://www.planetside.co.uk/forums/index.php?topic=14494.0 ,
but I thought it would be easier to find later on in its own thread.
I have set up some examples to show the differences of some possible ways to combine
SimpleShapeShaders (from here on refered to as SSS).
In all examples the nodes are connected to a surface layer that is between the base colour and
the planet node,so all of this is happening after the compute terrain.
First time I decided to use an Add colour instead of a merge shader was when I noticed that:
[attachimg=1]
I hope you can see the difference.
The SSSs are connected to a surface layer,because I wanted to try several things like color
matching displacement and luminosity and so on.
While I was playing with symmetrical patterns i've tested lots of combinations and found some
other interesting variations,which can be seen in the next post.
Here they are :
[attachimg=1]
[attachimg=2]
So depending on what you want to achieve some ways might be better than others
sometimes.
Feel free to ask questions or contribute stuff.
Hi J Meyer,
I was about to post a question on this topic today myself, though I was using bitmaps for color purposes, not SSS or displacement. Perhaps someone can answer the combined topic question:
If you add color (from powerfractals, grayscale bitmaps, etc.) it appears that the final color can be above white. This would make sense if TG2 allows greater than 1 values for grayscale, and hence there is a clamp function.
However, is it the default processing of TG2 to allow over 1 (pure white) if you add color together? For example, Photoshop does not do this, but automatically clamps at 1 (pure white) unless you're using 32-bit images.
In the situation when the "over-1 white" appeared, I was adding two 8-bit grayscale bitmaps together, not 32-bit.
When I added two grayscale bitmaps together, the overlapping white areas turned "whiter" than white. Was this over-1 white value considered to be luminous then?
It was necessary to add a "Clamp 0 1 Color" node after the Add Color node. Then the white bitmap added to the white bitmap stayed at white. I'm just wondering if adding a "Clamp 01 color" node should be the standard workflow or if this was a unique case.
Similarly, if I subtract color (black minus black) or multiply color from grayscale bitmaps, should I also be using a Clamp 01 Color node? I noticed the above-white issue because it looked luminous, but I'm not sure if a "darker-than-black" color would be blatantly visible yet may still mess up certain functions.
I'm primarily asking this when using grayscale bitmaps as Blender shaders.
Thanks,
-Matt
Good idea to make a new thread, Jochen. Here's a conditional addition. Don't know if it's any use... perhaps to make star-like debris patterns radiating from an impact?
Great thread
Hi,
I must say I could improve the way the Shape Shader handles being stacked and such. For the next version I'll add the option of applying high and low colours as several other shaders have.
Matt might be better answering Matt's questions, if you see what I mean, but I will venture an opinion. I don't think you could call colour values greater than 1 luminous. However it is true that TG2 generally doesn't put bounds on the colour values. In a general sense it gives greater flexibility and precision if you allow values outside the 0..1 range. My own inclination would be to not worry about the colour values when I'm doing things like combining masks until I got to stage where it actually mattered. That stage will depend on what you're doing. For example if I was doing something with function nodes where I wanted the colour to be within the 0..1 range I would do all the mask combining and then clamp the colour before the next part of the function.
My assumption is that any node which requires colours to be in the 0..1 range would clamp the values. Other nodes may not clamp values because they can work with colour values outside that range although perhaps it might not give the results you were expecting. In that case, if I knew that the results I wanted were dependent or easier to understand/work with in the 0..1 range then I would clamp the colour. Typically masks are easier to understand if they're clamped to 0..1.
I'm not sure if that clears anything up but there you go!
Regards,
Jo
FlynnAD - like Jo I think Matt would probably be best to answer your questions.
Haven't tried to combine image maps like that before,so can't be of
much help here,I'm afraid.Maybe the examples in this thread can give
you a basis for your own experiments,though.
Dune - I've gotta try that one.Thanks for contributing.
Jo - " I must say I could improve the way the Shape Shader handles being stacked and such.
For the next version I'll add the option of applying high and low colours as several other
shaders have. "
I'm agog.
Dune's conditional will work if the input is greater than or equal to the check value. This should maintain the greyscale ramp at intersections, rather than say adding two values of 0.5 which equals 1.
Meanwhile I've tested Dune's suggestion with the same settings I've used for the
other ones and it seems to give the same result as the add colour + clamp0 1 method.
If you put a wider gradient on your simple shape, you should see the difference in the greys.
Add to Clamp 0 1 is on the left, Conditional Greater/Equal is on the right. Notice how the gradient mitres into the inset corners on the right hand image.
Cool,thanks Jon!
Never tried it that big,but should have obviously.
my query re: SSS is how do you keep the textures from invading. I do a street for example and at the cross street I need the texture at 90 degrees to the first but one, but one always takes precedence and one street is textured wrong....any ideas....I had this working before my old computers got stolen but all the files went out the window with the computers...sadly...I back up more now....
Depends what your textures are Bobby. If you want textures to curve around an object, you need to understand uvw mapping, and how to break up flat planes to fit your shape. If you have an overall concrete texture, then you just need to mask where you want it.
so the SSS is in effect a terrain and needs a mask of some sort (i use paint shaders)...remembered havin' success with them and SSSs....thanks.....
No, the SSS isn't a terrain. It's primarily a mask. If you take a stretched SSS and transform (rotate by 90 degrees), use a add color, and perhaps clamp 0-1, you have a cross. Which you can texture as you wish. If you want to use a texture that is unilateral, you'd have to texture first and then transform, or warp for that matter.
The only problem is still that a texture can't be warped in such a way that the Z direction follows the X direction. We would need a transform shader that doesn't transform the shader by itself in a set manner (50 degrees, or something) but by something else (a formula or another shader).
but but but...why, when you add a Surface shader and assign it to SSS 1 and then make an unconnected to it opposite oriented SSS [see attached]...I just used test colours to illustrate my point, the 2nd on over rules the 1st one
here is one using 3 SSSs and 3 paint shaders...the only way I can male this work as just assigning to SSS 1, SSS 2, and SSS 3 result in the last one applied (3rd) ruling the stack..4th tex for the ground, constrained with a Distribution shader for height only
Sorry I wasn't sure what you were asking from my last post. An SSS essentially creates a black and white shape, with an optional fall off to black at it's edges. There is a displacement tab which uses that B&W information to displace. Now if you want to use an SSS (I'm not sure this is the correct acronym as it generally means Sub Surface Scattering in other 3D apps), feed the B&W shape into the blending input of a surface layer. This means what ever happens in the surface layer, it will only work in the area defined by white from the SS. That includes surface colour and child attributes etc. If you want to layer several SSs, like in your last image, without them influencing each other (atm, you are layering one after the other, so one colour overlays another), you will need to add and subtract these shapes to create your intended areas of influence. Which is what this thread is about. This is why it's generally a good idea to use the blending input on a Surface Layer, because this will then act as a stencil for your effect, on the main input.
Quote from: Hetzen on May 10, 2012, 09:19:29 AM
. If you want to layer several SSs, like in your last image, without them influencing each other (atm, you are layering one after the other, so one colour overlays another), you will need to add and subtract these shapes to create your intended areas of influence. Which is what this thread is about. This is why it's generally a good idea to use the blending input on a Surface Layer, because this will then act as a stencil for your effect, on the main input.
this is where I get confused. What am I doing wrong?..Dunno how to attach the .tgd as well so I'll add to another post
here's the .tgd
You had one shape feeding another, so you were stacking the shapes through each other (see first post of thread), which meant the mask on your yellow surface layer was a combination of all three shapes defining it's blending area.
More...
Or...
thanks for the test answers...hee hee heee...tres funny...off to look at how dumb I am now...
apparently really dumb...how do I get the displacement as well as the Surface shader...in a stack..no particular reason for the stack except it demonstrates to me what I want to figure out...
Here you go - lots of variation in here to play with.
still not getting it...if the SSShader is in the surfaces stack how the heck do you get it to displace? I've only got that to work from the Terrain tab....
Hi Bobby,
Turn on "Apply displacement" in the Displacement tab and make sure you're using a reasonable Displacement amplitude. I've just tried this using a Simple Shape Shader in the shaders project view created with the Add Layer button and it works fine.
Regards,
Jo
You can also stick the SSshader's output into the displacement input of a surface layer, or use it to blend a PF (no displ necessary) and stick that into the same, or use it to blend a PF with displacement and stick that into the child input, or into another surface shader in between the SimpleSS and the child input if you want it's coverage decreased or blended again by something else............
test previous post wouldn't connect test
Quote from: bobbystahr on May 13, 2012, 05:40:10 AM
test previous post wouldn't connect test
Sigh, I'm going to have to ask someone to make this work for me. I just can't wrangle my brain around it somehow.
Here's the .tgd that has me stumped...just replace all the image maps with brick image maps of your own, likewise with the ground...I'll be eternally grateful as this is ruining my Terragen time....pic with atmo off for clarity.
peace and gratitude
Quote from: bobbystahr on May 13, 2012, 05:42:02 AM
Quote from: bobbystahr on May 13, 2012, 05:40:10 AM
test previous post wouldn't connect test
Sigh, I'm going to have to ask someone to make this work for me. I just can't wrangle my brain around it somehow.
Here's the .tgd that has me stumped...just replace all the image maps with brick image maps of your own, likewise with the ground...I'll be eternally grateful as this is ruining my Terragen time....pic with atmo off for clarity.
peace and gratitude
Quote from: bobbystahr on May 13, 2012, 05:42:39 AM
Quote from: bobbystahr on May 13, 2012, 05:42:02 AM
Quote from: bobbystahr on May 13, 2012, 05:40:10 AM
test previous post wouldn't connect test
Sigh, I'm going to have to ask someone to make this work for me. I just can't wrangle my brain around it somehow.
Here's the .tgd that has me stumped...just replace all the image maps with brick image maps of your own, likewise with the ground...I'll be eternally grateful as this is ruining my Terragen time....pic with atmo off for clarity.
peace and gratitude
Sorry, that's the only way I could get the attachments to load....strange...I tried 4 times before with just a hang on connecting.
no takers after 2 weeks so I guess it's un-doable...sigh....
What are the practical uses of this. I have been trying to imagine what I could do with this but cant think of too much. Granted I'm pretty sleepy, but still.
Quote from: TheBadger on May 29, 2012, 12:05:58 PM
What are the practical uses of this. I have been trying to imagine what I could do with this but cant think of too much. Granted I'm pretty sleepy, but still.
While I can't really think of a global use for this.
I myself like sculpting with SimpleSSs and would like to be able to control the textures because I, as a colourblind soul, am pressed to use image maps who's colours are known to me...and I haven't really had a lot of success...I'm trying to assess whether or not to abandon this Quixotic Quest
I haven't had time to look into it, Bobby. But I think you need to set it up differently; use each SSS with both displacement and its color map after an initial compute terrain (if you need one) as input to a surface layer (child and perhaps blend), and see where that goes.
Quote from: Dune on May 30, 2012, 02:46:00 AM
I haven't had time to look into it, Bobby. But I think you need to set it up differently; use each SSS with both displacement and its color map after an initial compute terrain (if you need one) as input to a surface layer (child and perhaps blend), and see where that goes.
I'll give that a try later...back in music mode mostly the last few weeks. Just finished my solo cd...just me and my axe....
Ah, you're online... I just wanted to add a little experiment for you. maybe it helps a bit. Good luck. Nice to hear of your music, you actually brought out a cd? Great!
Quote from: Dune on May 30, 2012, 03:26:08 AM
Ah, you're online... I just wanted to add a little experiment for you. maybe it helps a bit. Good luck. Nice to hear of your music, you actually brought out a cd? Great!
I'll give that a try, was just crashing when your post came in and didn't see it till now...10:30 A M in Canuckistan....thanks for you efforts on my behalf....will be posting a link for mp3's of the tunes soonish for my
out of town friends to dl...will spam here and all my other 3D stops with that in early July....
Just for the record: tested your file yesterday evening and
all that was necessary(beside loading images)was to crank
up the displ values 2 or 3 times. ;)
Quote from: j meyer on May 30, 2012, 12:40:54 PM
Just for the record: tested your file yesterday evening and
all that was necessary(beside loading images)was to crank
up the displ values 2 or 3 times. ;)
the original file?....could you save the .tgd and post/send it....I am totally at sea on this and would like it to work...thanks in advance...off to rehearsal for another
friend's cd release....they're all gonna owe me come time for mine, hee hee hee
Sorry Bobby,but I deleted anything right after checking it out.
Just download/take your newSSStest_0001 file open it and go
to all surface layers displacement tabs and inrease the values.
Nothing more to it,really.
Happy jammin',J.
Quote from: j meyer on May 31, 2012, 10:26:28 AM
Sorry Bobby,but I deleted anything right after checking it out.
Just download/take your newSSStest_0001 file open it and go
to all surface layers displacement tabs and inrease the values.
Nothing more to it,really.
Happy jammin',J.
Thanks man...off to give that a try....
here's a bit of what you CAN do, but it does require a fair bit of Paint shader work. I have included the .tgd but you will have to replace the image maps with what you have on your computer......The water in the circular structure uses image maps to control the density and colour ...
Something new to play with :) Masking roads over large areas has always been difficult with image masks
A line/polyline would be handy as well, but here's a quick demo of using a SSS purely as a mask.
One SSS, edge width = 1/2 shape width giving a symmetrical gradient from 0 - 1. The rest is done with colour adjust shaders and add/subtract functions.
Ben...a while back someone posted a clip file on making wiggles in a road with SSS's...might have been dandel0 or Dune....
I'll have a look... it can't be that hard ;)
hee hee hee...wiggles IN the road nor ON the road...LOL.....
The recipe for wiggles i remember can be found here
http://www.planetside.co.uk/forums/index.php?topic=11859.msg120122#msg120122
yup...'twas dandel0...nope Dune...this is waht I was thinking of....
http://www.planetside.co.uk/forums/index.php?topic=13392.msg132117#msg132117
Both excellent topics, thanks. What I'd ideally like to do is to trace over the real world positions of roads using an image overlay as a template. In my older work I did this in Photoshop at an affective resolution of 5m per pixel but this limits the size of the area you can cover and how close you can get to the road before it falls apart.
Quote from: bigben on July 03, 2012, 05:44:04 PM
Both excellent topics, thanks. What I'd ideally like to do is to trace over the real world positions of roads using an image overlay as a template. In my older work I did this in Photoshop at an affective resolution of 5m per pixel but this limits the size of the area you can cover and how close you can get to the road before it falls apart.
yeah, tried a bit of that as well but the resolution was only really good for extreme distance shots. You could add realism I found by once you had your terrain mapped, in top view you could paint wind breaks to drop trees on. this one worked not bad, masked roads and all...
SUCCESS
Well I figured it out...I've posted the .tgd and will post the images next post...a bit of a D'oh moment as you'll see....I'll let the curious explore....
Here's the images
hello, painted shader by the simple shape shader.
very nice, but not what I was striving to and finally achieved. My goal was to independently texture each Simple Shape shader (SSs henceforth) with no texture bleeding or leaking into adjacent SSs layers. A bit of a complex/roundabout but I sussed it except for displacement which seems to bleed everywhere...only the very top SSs can have displacement it seems....my guess is that the SSs ers become in fact when displaced in the terrain editor, elements of the terrain and share a lot more than I'd like....
Hi Bobby
A couple of suggestions.
Use TIFFs instead of JPEGs if you want to use images for masks.
Make the image just black and white (but you'll have to save it as greyscale to import) 025 has a couple of shades of grey as well.
In the colour tab of the image node, turn off smooth interpolation. This will be one cause of "bleeding"
The colour adjust node is your friend. Have a look at the attachment
Quote from: bigben on July 08, 2012, 05:37:29 PM
Hi Bobby
A couple of suggestions.
Use TIFFs instead of JPEGs if you want to use images for masks.
Make the image just black and white (but you'll have to save it as greyscale to import) 025 has a couple of shades of grey as well.
In the colour tab of the image node, turn off smooth interpolation. This will be one cause of "bleeding"
The colour adjust node is your friend. Have a look at the attachment
Got that Ben, wasn't really going for quality yet, just compatible images to mask with...I've
been using .png but will try the larger file size tifs.
Thanks for the Colour Tab tip...hadn't thought of that...any idea how to deal with
isolating the displacements...that's the last rung on this ladder I'm climbing...Off to check yer .tgd...thanks....
PNG will work OK too. It's the jpeg compression artifacts that cause problems with jpg image masks. LZW compressed TIFFs work fin and for masks are pretty small files as well.
In some cases you may want to leave Smooth Interpolation on as it will smooth out the blockiness of a low resolution image. You can then increase the sharpness of the mask by using a colour adjust node with identical values for black/white limits. This is quite a useful technique when you're pushing the resolution limitations of a mask image.
I'll have a play with your TGD tonight.
[edit] Here, try these files. Converted the JPG masks to TIFF (they're smaller with LZW compression). I split the simple shapes out of the direct connection to the compute terrain node to use them for both displacement functions and masks. I prefer to use the blending shader rather than coverage for masking like this and and restructured to remove some of the redundant masking. Hope this makes sense (and is what you were trying to achieve ;) ).[/edit]
The other thing that should've hit me when I made that demo tgd is that my tiled terrain sets are built with a bunch of functions that produce a mask that is effectively the same as an SSS rectangle with a beveled edge. This will make them a whole lot simpler to set up with much less clutter. :)
Quote from: bigben on July 09, 2012, 04:41:04 AM
The other thing that should've hit me when I made that demo tgd is that my tiled terrain sets are built with a bunch of functions that produce a mask that is effectively the same as an SSS rectangle with a beveled edge. This will make them a whole lot simpler to set up with much less clutter. :)
I found the demo quite interesting but going in another direction than I'm actually heading. My original intent was to build/model using the SSs as my base models. As I am colour blind I pretty much use image maps for most of my texturing and the info re: mapping is a good to know, but when it comes to the procedural functions I really need a layman's glossary to even begin to comprehend what most do as they have quite 'technical math/scientific' names in most cases and as I have a very basic Grade 10 "Shop Math" as my maths education and I never got much above basic arithmetics and the names mean nada to me till I google them, and then wind up even more confused. So I stay away till a light goes on. At 64 , even tho an exploring type retired hippie, my learning is quite slow and don't seem to grasp concepts my
youngers who benefited from a proper math education and the soak up like Slurpies on a hot summer day.
We crossed paths in posting :) ... just added some files to the post above. Feel free to ask any questions. The colour adjust shaders after the SSS nodes effectively turn everything inside the SSS white so they can be used as a mask regardless of what you change the bevel width to
Just a couple of other things to note.
When I converted your mask images I did a levels adjustment as the black wasn't completely black. This would have caused some slight "leaking" of textures in your result. If you're only after a black and white mask you could always use an image map followed by a colour adjust set at 0.5, 0.5 as a default setup (I usually do).
And in this arrangement, the displacement in the SSS node doesn't do anything. I just left it as it was, but you don't need to set it if your using it as a displacement function on another node.
Quote from: bigben on July 09, 2012, 07:36:49 AM
Just a couple of other things to note.
When I converted your mask images I did a levels adjustment as the black wasn't completely black. This would have caused some slight "leaking" of textures in your result. If you're only after a black and white mask you could always use an image map followed by a colour adjust set at 0.5, 0.5 as a default setup (I usually do).
And in this arrangement, the displacement in the SSS node doesn't do anything. I just left it as it was, but you don't need to set it if your using it as a displacement function on another node.
Great info...will play around later today after I get done with my cd mixing (recording a solo cd of my songs) this morning...thanks for all the input as I'm often totally
"at sea" when it comes to using functions and I'd dearly love to grok them better....