Can the Painted shader be used on an object?
Yes,that's possible (or at least it was a while ago when I tested this).
Iirc there is an example by Mr.Lamppost to be found somewhere here
on the forums.
Quote from: j meyer on June 15, 2013, 02:04:25 PM
Yes,that's possible (or at least it was a while ago when I tested this).
Iirc there is an example by Mr.Lamppost to be found somewhere here
on the forums.
Thanks. I tried a surface shader with painted shader attached to the color function of the object component; but, that didn't work. Will search the threads by Mr. L.
Found the thread here: http://www.planetside.co.uk/forums/index.php/topic,5471.msg56752.html#msg56752
But tried what was explained and that didn't work either. Maybe a view of the nodes set up would be easier for me to understand.
I don't know if it works on imported stuff like trees (I imagine it does), but on a plane at least it does. Displaced the offset of the surface shader here.
EDIT: Tried it on the roof of an imported building, which worked, but on the trunk of a tree it didn't. The painted shader should possibly be set to 3D instead of Y.
Thanks Ulco. I'll give this a try ...looks very interesting. Will be gone most of the day; but, will be experimenting later tonight.
Hi,
There is a painted shader guide here:
http://www.planetside.co.uk/wiki/index.php?title=Painted_Shader_Guide
You can't paint on imported objects because the painted shader keys off polygons generated in the preview by the renderer. Imported objects are not drawn in the preview using the renderer, they are drawn directly using OpenGL, so there is no generated polygon information for it to use. If you try to paint on an imported object the paint strokes are going to end up located on "generated" scene elements behind the object.
I'm not sure how Ulco was about to paint on the roof of an imported building.
You can paint on some of the built-in objects. On the guide page there is an example project showing painting on a plane to control the shape of a cloud layer. If you wanted to paint on something you could use those objects to approximate the shape of the built in object and paint on them, then use the painted shader in 3D mode. The guide I linked to explains a bit more about what's going on there. To quickly sum up, the paint strokes are actually made up of 3D spheres so the stroke is effectively volumetric and can fill space.
Regards,
Jo
Thank you Jo for your explanation, I will read through the link.
Of course you can paint on imported objects,you just have to put a TG-plane or
sphere at the objects location and then paint on that.And then disable it for rendering.
[attachimg=2]
Sorry Bob I didn't get to answer yesterday.The attached image below shows the settings
used and the nodes.(Ignore the reflective shader)
If you have questions feel free to ask.
While on the subject of painted shaders.....
I was wondering if it would make sense to have a painted shader curve tool -- just draw a thin closed curve around an area and then select "fill"? I could really see using a graphics tablet on a top view to quickly make painted shader masks. Trying to fill large or intricate areas now is a pain, especially with a slow preview.
j meyer, thank you for your response to this issue. My goal is to apply the painted shader to tree which has partially dead wood. Currently, I'm working with Walli's 'Bristlecone Pine' which displays a orange/gray color. I wanted to paint silvery/gray stripes on certain areas depicting dead wood.
I will try applying your set up here and see if I can obtain those results. I may have further questions. Thanks again, I appreciate this very much.
First question j meyer: Is your node set up applied to the model's trunk shader; or, is it all applied separately for the plane?
It's applied to the trunk shader.
The plane is there just to make the painting visible in the preview.
Quote from: j meyer on June 17, 2013, 01:10:23 PM
It's applied to the trunk shader.
The plane is there just to make the painting visible in the preview.
OK j, I will have a go at it. Hopefully I won't have more questions after coming up with positive results. Will be back soon.
I'm lost (and dense), maybe you can have a look. Attached is a .tgd.
I'll take a look,but it may take a while,things are on another computer.
Quote from: j meyer on June 17, 2013, 01:58:14 PM
I'll take a look,but it may take a while,things are on another computer.
Thank you J, I appreciate this very much.
I've connected the nodes and set the parameters required.Tested it before with my
copy of the tree to be sure that it works.
You should set the brush size to something smaller than 0.1 though,maybe 0.05 or so.
In short:start TG,load the TGD,let the preview finish and pause it,then start the
painted shader and paint.Stop the painted shader,disable the plane and render.
That should work.
Good luck,J.
Thank you very much J, I'm grateful for what you've done here. Will have something to show later today.
One more question J: How did you open another iteration of the objects part shader? I tried by adding another .tgo of the object in order to get the object 'part'; but, that didn't work.
Also tried making a clip file of your four nodes and placed them into my set up - this didn't work either.
I tried the Bristlecone painted shader, but TG crashed as soon as I hit wireframe, so I replaced with a simpler tree. The principle is very simple; take a painted shader, make the brush as small as is needed (just as Jochen said), place a plane at the place of where you want your paintwork to appear, but don't forget to adjust the painted shader orientation, in this case Z (so, facing North).
Pause, paint, disable plane, and then inside the tree nodes, add another surface layer between parts shader and default shader, and blend this by the painted shader. Or attach the painted shader to color input or whatever of the default shader. There are other possibilities of course. No need for another parts shader.
Hope you can figure it out now.
I didn't open a second parts shader anywhere as far as I'm aware.
Don't know which 4 nodes you mean,but I guess default sh,surface layer,painted sh and
parts shader.If so the double parts shader might have caused problems,but that's just
a guess.It would have been sufficient to copy only the surface layer and the painted
shader and put them between the default shader and the parts shader in your set up
in cases like this I think.
I agree with what Ulco wrote.
Ulco, I followed exactly what you have explained; and, it didn't work. As you've said, maybe it is the model complexity that had something to do with it. However, when I use the .tgd made by j meyer here on the thread, it works. But, when I try to duplicate it, it doesn't work even though everything seems to be correct in the set up.
See my response below to j meyer.
Quote from: j meyer on June 18, 2013, 10:42:19 AM
I didn't open a second parts shader anywhere as far as I'm aware.
Don't know which 4 nodes you mean,but I guess default sh,surface layer,painted sh and
parts shader.If so the double parts shader might have caused problems,but that's just
a guess.It would have been sufficient to copy only the surface layer and the painted
shader and put them between the default shader and the parts shader in your set up
in cases like this I think.
I agree with what Ulco wrote.
Hi Jochen, Have a look at the .tgd file you posted here and you will see the four nodes (on top) that I'm referring to. You will also note that below, there is a duplicate of the trunk shader (default shader) and the part shader. That is why I asked you how did you create the 'part shader'. The good thing is, your .tgd file works; I am able to paint on the tree trunk. When I try to duplicate your set up (exactly) on a new file, it does not work ...strange.
Strange. You're probably best off to set it up anew every time. Here's another simple setup. Should work if you add one of your trees, and add the surface layer as shown, and blend to the painted shader by right click.
Strange indeed.Ulcos suggestion to set it up anew maybe the solution here.
As for the second parts shader: the model has two trunk shaders,the first one
is for the yellowish diffuse map and the second is for the pieces of bark if my
memory serves me right.
Thank you both, Ulco and Jochen. I will get this sorted out and accomplish my goal one way or another.
Thanks Ulco for the .tgd. and your suggestions. I will try this set up.
Jochen, you are right. the second part for the Bristlecone is different. Thanks again for all your input.
Hi,
I admire your tenacity, but I should point out that this really wasn't what the painted shader was designed for :-).
Regards,
Jo
Quote from: jo on June 18, 2013, 07:14:14 PM
Hi,
I admire your tenacity, but I should point out that this really wasn't what the painted shader was designed for :-).
Regards,
Jo
Well then Jo, why not make it so?
We do have some plans to expand the capabilities of the painted shader, although they're a ways down the track.
Regards,
Jo