Multiple Tiling Shader?

Design Anvil - Razor42Design Anvil - Razor42 Posts: 1,237
edited December 1969 in Technical Help (nuts n bolts)

Anyone know if a multiple tiling shader exists or could be made?

What I mean is.
Two Diffuse image inputs with individual opacity masks and with separate tiling controls.

Hmm, not sure how clear that sounds maybe an example would help.

Okay lets say a plane placed as a wall for a room.
The first input would be the surface settings for a tiled wallpaper with 30x30 tiles of a little rose pattern.
I would like to then make a separate setting for a tear in the wall paper, this would need to overlay the wallpaper pattern and be a 1x1 tile.
So two images with opacity and tiling in one shader?

I know I can achieve this effect by using to planes with opacity settings and positioning it slightly in front of the wall papered plane.

Of course with individual setting for ambience,displacement, etc would be ideal. :D

Comments

  • patience55patience55 Posts: 7,006
    edited December 1969

    Razor 42 said:
    Anyone know if a multiple tiling shader exists or could be made?

    What I mean is.
    Two Diffuse image inputs with individual opacity masks and with separate tiling controls.

    Hmm, not sure how clear that sounds maybe an example would help.

    Okay lets say a plane placed as a wall for a room.
    The first input would be the surface settings for a tiled wallpaper with 30x30 tiles of a little rose pattern.
    I would like to then make a separate setting for a tear in the wall paper, this would need to overlay the wallpaper pattern and be a 1x1 tile.
    So two images with opacity and tiling in one shader?

    I know I can achieve this effect by using to planes with opacity settings and positioning it slightly in front of the wall papered plane.

    Of course with individual setting for ambience,displacement, etc would be ideal. :D

    Well I've not come across one.

    If this is just for one project, wouldn't it be easier to just make one large image and put a tear in it? Or make the wall to have 2 shading domains so that most of it has the patterned print and the tear is placed on the separate Shading Domain?

    The little rose pattern tile could be tiled in an image editor on a large canvas to make the large image.

  • MarieahMarieah Posts: 518
    edited December 1969

    I expect you could do this using Uber Surface 2, which lets you create two layered shaders.

  • mjc1016mjc1016 Posts: 15,001
    edited December 1969

    Take a look at this...

    http://www.sharecg.com/v/66637/gallery/21/DAZ-Studio/DAZ-Studio-Shader-For-S.E.Asian-Shields

    I haven't looked at it in a while, so I can't remember if the tiling brick is connected or not.

  • Design Anvil - Razor42Design Anvil - Razor42 Posts: 1,237
    edited December 1969

    Thanks for the replies. I was really looking for something I can redistribute included in a product.

    The main reason I was looking for this setup was to avoid including large texture maps. In the wall example it could allow mix and matching, so for a large amount of tiled wall papers textures, you could apply over the top of each the cracks, tears, dirt, etc. While taking up only a small amount of resource space.

    I'll check out Uber Surface 2 but I have a feeling using it in a commercial capacity may be difficult.

    Thanks for the replies though, I guess I was just trying to gauge whether a shader was possible/difficult to create to do this.

  • Design Anvil - Razor42Design Anvil - Razor42 Posts: 1,237
    edited December 1969

    Wow, that shield shader is of the hook!
    From the images it doesn't look like it has multi tiling capability but its close to what I was looking for.
    Thanks for the link!

  • Design Anvil - Razor42Design Anvil - Razor42 Posts: 1,237
    edited December 1969

    Actually I have just downloaded it and it does seem to hold multiple layer tiling functionality for two of its layers.
    I'm gonna pull it apart for a bit and see whats going on in it.
    Of course I wouldn't commercially use any of it without permission.
    Thanks again for the link mjc!

  • Design Anvil - Razor42Design Anvil - Razor42 Posts: 1,237
    edited December 1969

    It looks like the tiling doesn't work or has been disconnected.
    There are layered textures with an adjustable mask. But the tiling bars seem to have no effect.
    Very interesting though.

  • mjc1016mjc1016 Posts: 15,001
    edited March 2013

    Basically, you would use the technique in 3dcheapskate's shader to get your layers, but add two tiling bricks...one for each layer.

    Say the rose wall paper is the 'base' and the tear is 'overlay'. Use 1 tiler on the base...you'd would also feed the output of that one to the displacement bricks. Then a second tiler would be fed to the 'overlay' and the 'mask'.

    Like this...

    017.png
    833 x 765 - 63K
    wallpaper.jpg
    1000 x 800 - 533K
    Post edited by mjc1016 on
  • Design Anvil - Razor42Design Anvil - Razor42 Posts: 1,237
    edited March 2013

    Thanks mjc, I'm down with the theory, its just putting it to practice now that I'm having issues. :)

    Could you post an image of where the two tiler bricks would need to go. I've tried a few things but can't get it to work. I'm not really sure what I'm doing with Shader mixer...

    The picture you have is exactly what I'm looking for!

    Ahh, nvm thanks! Just seen the edit!

    Post edited by Design Anvil - Razor42 on
  • mjc1016mjc1016 Posts: 15,001
    edited December 1969

    And the output of the mix brick goes to the Diffuse Color on the DS Material brick...

    The third image brick (the one at the top is basically for a transparency map of the overlay layer...

  • Design Anvil - Razor42Design Anvil - Razor42 Posts: 1,237
    edited December 1969

    Thanks mate! I've got it working thanks to your directions.

  • 3dcheapskate3dcheapskate Posts: 2,719
    edited December 1969

    Razor 42 - glad you managed to get it working - hopefully you got it to do everything you needed?
    mjc1016 - thanks for suggesting my shader, and for helping solve the issue.

    I've had a PM asking about including tiling in the DS shield shader, and I found this thread while doing a bit of Googling trying to get back into the DS shader mindset. Maybe it's time to revisit the Simple Dual Material Shader and take it out of beta?

    (I think I've also got a lead on combining layer normal maps over on the Developer Discussion forum)

  • 3dcheapskate3dcheapskate Posts: 2,719
    edited August 2013

    Okay, just had a quick play with the 'TMS(full).dbm' (from the DAZ Studio Shader For S.E.Asian Shields) and added a tiler brick into each layer like mjc1016 said. Connected the S/T outputs to the S/T inputs of every brick in that layer that has an image option (i.e. bump, displacement, diffuse colour, diffuse strength, glossiness, specular colour, specular strength, and reflection strength).

    The original TMS (Full) shader network is shown in the middle image of the third picture on the ShareCG page (see link previous paragraph). The first image below shows the extra three nodes I've added to that network in orange - one tiler node for each of the three layers.

    Second image shows the surfaces tab in DS 4.5 when this shader is applied - the parameters for each tiler appear under the appropriate layer (you need to edit the path for each variable in ShaderMixer to get that to work if you want to make the mods yourself).

    Third image shows a DS4.5 render with the same image applied to the diffuse colour of each layer but different tiling values on each layer. Base layer is red, mid is green, top is blue.

    If anybody's interested I can upload the modified shader to the usual places?

    TMS(full)tiling.jpg
    556 x 555 - 104K
    TMStiling_Surfaces.jpg
    518 x 387 - 44K
    TMStiling_NWchange.jpg
    600 x 152 - 48K
    Post edited by 3dcheapskate on
  • Design Anvil - Razor42Design Anvil - Razor42 Posts: 1,237
    edited December 1969

    This looks awesome, I did get it to work when I was playing around last time.
    The main idea I was after was adding peeling wall paper,cracks and such to a pre tiled wall paper, this looks like it would do that perfect.
    I'm sure there are plenty of other applications to. :)
    Has the share cg file been updated with the tilers added? Or were you planning something else for it?

  • 3dcheapskate3dcheapskate Posts: 2,719
    edited August 2013

    I was originally just playing with general ideas for getting a shiny gold paint on a rough stone/wood surface. The original DS dual material beta was just an experiment to see which parameters could be set up on a per-layer basis. The ShieldTMS was basically tidying up and cutting out the bits I didn't need for my specific requirement (tiling being one of the bits I didn't need).

    But seeing this thread and mjc's torn wallpaper example render - far more possibilities than I'd been thinking of!

    None of the ShareCG/Renderosity shader have been updated since the original upload because they did exactly what I wanted them too!

    But I think it's worth revisiting them now - I'll be uploading anything I come up with the ShareCG/Renderosity as freebies, no restrictions on use.

    I could upload as-is, but I'd prefer to do a bit of tidying up first. maybe add back in some of the other stuff I took out?

    Post edited by 3dcheapskate on
  • Design Anvil - Razor42Design Anvil - Razor42 Posts: 1,237
    edited December 1969

    Sounds good :D Nice work by the way! Can't think of anything else off hand, but I'll let you know if anything comes to mind.

  • Takeo.KenseiTakeo.Kensei Posts: 1,303
    edited December 1969

    You asked for a double tiling system and mcj gave you the solution, but wouldn't it be better to use the same tiling so that all textures are the same size and UV?
    I don't know that you do for a project and don't know what you really need, but I just question the utility of a double tiling

  • Design Anvil - Razor42Design Anvil - Razor42 Posts: 1,237
    edited December 1969

    Ibeing able to set the tiling indepently allows say the wallpaper to be 10x10 on a wall. While the crack is only 1x1. Sure you could make the wallpaper a single file of 10x10 but you lose resolution over a large surface or have to use large files.

  • 3dcheapskate3dcheapskate Posts: 2,719
    edited August 2013

    You asked for a double tiling system and mcj gave you the solution, but wouldn't it be better to use the same tiling so that all textures are the same size and UV?
    I don't know that you do for a project and don't know what you really need, but I just question the utility of a double tiling

    For Razor 42's specific purpose different tiling settings for each layer are part of the requirement, and I can see the logic behind it.

    However, for other uses of a multi-layer shader it might indeed be preferable to have the same tiling values for all layers. (Although the main case I can see for this would be when you have a non-trivial UV map and want the tiling values for all layers to be '1' - i.e. untiled). It's possible to give both options in a single shader but that would make the user interface a bit messy. Perhaps it would be better to do two separate versions of the generic shader, one with 'per-layer tiling' and the other with 'whole-surface tiling'?

    (Just to play devil's advocate: personally I can see a use for four separate tiling bricks per layer, one each for bump/displacement/diffuse/specular channels - but that just becomes ridiculously complicated!)

    Post edited by 3dcheapskate on
  • Eustace ScrubbEustace Scrubb Posts: 2,698
    edited December 1969

    In my Mephistopolis shader (http://www.daz3d.com/forums/discussion/22652/P120/), I've set up a single tiling tree for all textures except Opacity: the opacity maps are still calculated on a single-tile pattern because they're more likely to be mapped for the base mesh: and if you tile the opacity, what's that give you? Lace doilies!

  • 3dcheapskate3dcheapskate Posts: 2,719
    edited August 2013

    Tiling versions of the DMS(full) and TMS(full) shaders from the S.E.Asian Shield Shader uploaded to ShareCG (N.B. DAZ Brick Material .dbm format ONLY, so you'll need ShaderMixer to use them). Single-tiler-for-everything and tiler-per-layer-plus-mask-tiler versions. Dual layer and triple layer versions. DS4 and DS3 versions (the latter purely the DS4 versions opened in DS3A, untangled, and saved again). Any problems/suggestions let me know.


    P.S. That Mephistopolis shader looks fantastic! Tiling in camera-space?

    Post edited by 3dcheapskate on
Sign In or Register to comment.