Redshift UV Randomizer with OSL and Maya | Fix Texture Tiling

Поделиться
HTML-код
  • Опубликовано: 4 июл 2024
  • A partial solution for breaking up UV tiling in Redshift. Currently, this method does not work well with displacement. V-Ray has the UVW Randomizer with stochastic tiling, Arnold has cell randomization on their Triplanar node, but Redshift currently has no built-in method. With OSL, we can randomize the UVs via a Voronoi noise I made with extra noise along the borders/edges of each cell. This also works with normal map rotation.
    Download the OSL files here: github.com/CGStirk/OSL
    Project files available on Patreon: / cgstirk
    00:00 Intro
    02:48 Basic idea
    06:12 Redshift OSL
    09:35 Distorted Voronoi 3D Noise OSL settings
    17:34 UV Placement OSL
    19:52 Randomizing the UVs
    26:20 Normal map problem
    27:57 Normal Rotation Fix OSL
    30:41 Displacement problem
    34:49 Mitigating the displacement issue
    35:30 Alternative solutions but with disadvantages
    36:23 Outro
    Join the Discord server! / discord
    Portfolio: lindenstirk.com/
    Artstation: www.artstation.com/cgstirk
    Patreon: / cgstirk
    #redshift #osl #maya
  • КиноКино

Комментарии • 58

  • @CGStirk
    @CGStirk  2 года назад +1

    Important Notes:
    -There is a part at 21:00 where I remap the rotation from 0-1 to 1-360. This should be remapped to 0-360. Don't know what I was thinking.
    -I said I don't know why there's an issue with displacement, but it's obviously due to the hard edges from cell borders and noise, and because different heights of the texture are randomly rotated.
    -I should point out that Arnold's cell feature on the aiTriplanar node does not work with normal maps. The method in Redshift that I show in this tutorial does work with normal maps. If you want to use this with RS Triplanar, see this post I replied to: redshift.maxon.net/topic/27788/uvw-randomizer-node-for-random-offset-rotation-tiling-textures-per-mesh-faces/24?_=1651155908370

  • @0zaidi
    @0zaidi Год назад +1

    thank you for this, i just got into redshift from octane and I missed the chaos node in octane, for the displacement i used the hashed mode instead of simplex and it worked fine for what I needed, life saver!

    • @CGStirk
      @CGStirk  Год назад

      Glad it helped you out

  • @CGStirk
    @CGStirk  Год назад

    Update: Fixed again as of v3.5.16
    Looks like they broke OSL again for Maya... I guess there's not much choice but to use OSL bitmap loaders for now.

  • @kieartist
    @kieartist 2 года назад +2

    great man :D i waiting this for along time :)

    • @CGStirk
      @CGStirk  2 года назад

      Thank you! Working two jobs has made posting very hard, but I'm trying to fix that going forward!

  • @twotamatos
    @twotamatos 6 месяцев назад +1

    U taught me 2 things I am having to go to art school and they are forcing me to learn Maya even thoe I use C4D it’s so good to know redshift carry’s over n works for different softwares, but yeah nodes are super complex when u first start out but this is a great tutorial man helps so so much this will really help improve my textures it’s nice I can follow along and 9/10 things are just interchangeable variables I can get behind n understand so cheers! This is really gonna up my game with textures to look as good as Pixar or any triple A game thanks!

    • @CGStirk
      @CGStirk  6 месяцев назад

      A coworker uses C4D, and we often discuss the similarities between Maya and C4D. Glad it helped!

    • @twotamatos
      @twotamatos 6 месяцев назад +1

      @@CGStirk it feels kinda counter productive to go backwards so it’s cool they have a lot of similarities, so hopefully I can skip along if they are one in the same, and I know there are just as good renderers like octane and Arnold but just knowing redshift can carry over and uses the same nodes I believe is a big bonus too

  • @nikailakleinsorge3747
    @nikailakleinsorge3747 2 года назад +1

    Yay!!! 👏🏻👏🏻🥳Finally a new video!! Keep up the good work! 🤩💯~ ❤️ #1 fan 😍😘

    • @CGStirk
      @CGStirk  2 года назад +1

      Thank you! According to RUclips, you give the most hearts 💜

    • @nikailakleinsorge3747
      @nikailakleinsorge3747 2 года назад +1

      @@CGStirk Yay! RUclips goals!! 💯👍🏻

  • @cgside
    @cgside Год назад +1

    Hey, awesome video. Very informative. :) Wondering how did you get the .mtd and ae files for the "textureNoTile" you show in the minute 01:03. I found the github page for the shaders but no extra files for the maya interface. Thanks

    • @CGStirk
      @CGStirk  Год назад +1

      Thanks! That's just the RS OSL interface, so no other files are needed. Every OSL works like that and you can add slider controls inside the OSL code.

    • @cgside
      @cgside Год назад +2

      @@CGStirk Oh, that's why I couldn't recreate the interface in Arnold. No matter what I do can't create a checkbox or a dropdown menu (optionMenuGrp) with Arnold. Need to investigate. Thanks a lot

    • @CGStirk
      @CGStirk  Год назад +2

      @@cgside Yeah, both Arnold and V-Ray's OSL implementation in the attribute editor sucks in comparison since they don't observe the ui tags in the code.

  • @jso19801980
    @jso19801980 Год назад +1

    I'm using a window parallax OSL for maya redshift and i want to make variations by loading different window textures but duplicating the OSL node doesn't work as changing textures on One node updates all the others with the same texture essentially having an instanced OSL node across the scene, do you think this is a bug similar to the renaming issue

    • @CGStirk
      @CGStirk  Год назад

      It sounds like when you duplicate the OSL node, you're actually instancing it. How are you duplicating it? If you create a brand new OSL node and load in the OSL file, is the behavior the same? It might be easier to see your graph. I have an Discord server linked in the description if you'd like to post screenshots.

  • @MrCowyedeater
    @MrCowyedeater Год назад +1

    This has been a lifesaver! a shame about the displacement not working, I'm wondering if it would be possible to generate a soft mask along the border of each voronoi cell which could be used to mask out the sudden cliff edge drop in the displacement where one cell meets another?

    • @CGStirk
      @CGStirk  Год назад

      Thanks! Now that I know what I'm doing in OSL land, there are a few solutions. One is the mask like you said, but it requires the texture to be loaded via an OSL bitmap loader, which is what I wanted to avoid. I need to redo this shader to do that at least.

    • @MrCowyedeater
      @MrCowyedeater 3 дня назад

      I have an idea and it is the same as this video: use a Maxon noise set to Cell Voronoi for the inner cells, and then mask the borders of those cells with Voronoi 3 set to the same seed. The only issue is that it also rotates the normals, and seems to create artefacts when using a bump map, but I think this could be the right idea for getting displacement to work perhaps?
      ruclips.net/video/Gc80VyVCvOc/видео.html&t

  • @dky3d
    @dky3d Год назад +2

    Man, was really hoping for the displacement to work ☹ Any luck with workarounds???

    • @CGStirk
      @CGStirk  Год назад

      No, this method doesn't work for displacement because the noise creates too many tiny dots and there's no way to step a gradient around the edges around the cells with this approach as far as I'm aware.

  • @scifiworld6462
    @scifiworld6462 11 месяцев назад +1

    Sir I could not find redshift osl node and same as Maxon noise node ? Is this not available in older version of redshift ? Which version of redshift are u using ?

    • @CGStirk
      @CGStirk  11 месяцев назад

      This was done on v.3.5, but it's been so long that I don't remember the exact version.

    • @scifiworld6462
      @scifiworld6462 11 месяцев назад +1

      @@CGStirk sir is there any other way to make such a large scale texture for ground , I heard that substance designer could make it , sir do u anything know about it ?

    • @CGStirk
      @CGStirk  11 месяцев назад

      @@scifiworld6462 You can blend multiple textures or materials together to make the ground seem less uniform. This is the traditional approach. Substance Designer is great at making the textures, but it's not going to solve the issue of repeated tiling.

    • @scifiworld6462
      @scifiworld6462 11 месяцев назад +1

      @@CGStirk sir do u have any video related to it ? or u know any other channel,s video for making big seamless texture using blend texture in redshift ?

    • @CGStirk
      @CGStirk  11 месяцев назад

      @@scifiworld6462 No, but I would suggest googling how to do it with V-Ray or Arnold or some other renderer and find the equivalent in RS. Not sure what version of RS you're on and what nodes are available.

  • @MauroSanna
    @MauroSanna 2 года назад +1

    Regarding the displacement (though I am not a Redshift user, so I might be saying something silly here): maybe you could try using Maya's procedural Cloud 3D Texture, instead of the voronoy noise?
    It comes with blending embedded, and I pretty decent level of customization. I don't know, it might not even work with Redshift, but it could be worth a try.

    • @CGStirk
      @CGStirk  2 года назад +1

      The most important consideration is that only solid color values can be used because those values are piped into the UV rotation. If there is any gradient at all, the texture will look swirly. That's why a noise with solid cells is required.

    • @MauroSanna
      @MauroSanna 2 года назад +1

      @@CGStirk
      I see.
      So, I guess, not even playing with the ratio and the transparency range would work.
      I hope you will be able to come up with a nice solution then 🙂

    • @CGStirk
      @CGStirk  2 года назад +1

      The only way would be to crush the values so much that there are only black and white values, but the same issue will happen with displacement and there'd only be two values for offset, scale, and rotation to use.

    • @MauroSanna
      @MauroSanna 2 года назад +1

      @@CGStirk
      ...or Maxon comes up with a good triplanar implementation for Redshift. I can't believe that nobody have been missing such a useful feature.

    • @CGStirk
      @CGStirk  2 года назад +1

      @@MauroSanna Their triplanar is fine and you can use this node with it. Actually this one is better than Arnold's which has no way of correcting the normals with their "cell" feature.

  • @betofukuji187
    @betofukuji187 2 года назад +1

    is there a way to make it compatible with cinema 4d version?

    • @CGStirk
      @CGStirk  2 года назад

      Yes, this is compatible with C4D. You don't have to use the UV Placement OSL with C4D though.

  • @nikolaykirkov
    @nikolaykirkov 2 года назад +1

    For the displacement - is there a way to blur the borders in that cell OSL?

    • @CGStirk
      @CGStirk  2 года назад

      Not in this OSL. I played around with blurring, but any amount of blur leads to swirling. See this part at 34:31

    • @nikolaykirkov
      @nikolaykirkov 2 года назад +1

      @@CGStirk Maybe a blur after the texture is uv remaped so right before pluging it into the displacement node? And the blur to be applied only to the borders? Something like that :D

    • @nikolaykirkov
      @nikolaykirkov 2 года назад +1

      Because if you blur it before the UV remap you get swirls, if you blur the entire displ it will not work... so we need only blur on the borders after the texture is randomized

    • @CGStirk
      @CGStirk  2 года назад

      ​@@nikolaykirkov Yep, I also tried something similar with mixed results. Not sure how to just get the edges of the cells though via OSL so it could be automatic. I really want to know how Arnold and V-Ray do it with their randomizers because theirs are smooth.

    • @nikolaykirkov
      @nikolaykirkov 2 года назад +1

      @@CGStirk Have you tried reaching out to Saul - he is a regular in fb group - redshift render community. Otherwise I tried hi randomizer, doesn't seems to work as good as yours, thank you for sharing!

  • @patrickdettelbach
    @patrickdettelbach Год назад +1

    I cant get the UVPlacement2D Node to work.
    Redshift always gives back:
    // Warning: [Redshift] OSL node 'UVPlacement2D' not found in the shader kernel! Material will be invalidated
    This error occurs with text as well as with file as the source.
    Any idea how to fix this?
    Using:
    Maya 2023
    Redshift 3.5.15 (latest)
    latest NVidia Studio Driver

    • @CGStirk
      @CGStirk  Год назад

      Argh. I stopped using RS because they continually break OSL with Maya. I have access at work and will check the latest version next week.

    • @CGStirk
      @CGStirk  Год назад +1

      I get "Unable to represent the Maya connection OSL_UVPlacement2D.outUV1 to map_color.uCoord with an RS shader node. The source plug could be a closure so connections to it aren't allowed." That's a more serious error. Idk why they keep removing functionality. I'll see if it still works in C4D.

    • @patrickdettelbach
      @patrickdettelbach Год назад +1

      Hi, thanks for checking, stupid that they do not support this anymore.
      Works in RS 3.5.12 so Im using that for now. I personally dont use C4D but thanks a lot anyway :)

    • @CGStirk
      @CGStirk  Год назад +1

      No problem. Still working on it. I will be filling a bug report and will let you know what they say.

    • @CGStirk
      @CGStirk  Год назад

      This is fixed as of v3.5.16

  • @gtatak9805
    @gtatak9805 2 года назад

    Unreal engine cg set Remove green screen actor and looks like a real

    • @CGStirk
      @CGStirk  2 года назад

      There are tutorials on this already.

    • @gtatak9805
      @gtatak9805 2 года назад

      @@CGStirk after effects camera tracking and Maya cg car compositing VFX tutorial

    • @CGStirk
      @CGStirk  2 года назад

      @@gtatak9805 I know you want your car tutorial. I need a good free car model that is fully UV'd and textured before I couldn't think about it.

    • @gtatak9805
      @gtatak9805 2 года назад +2

      @@CGStirk yes please make tutorial