Making Iray Shaders {not presets}

Catherine3678abCatherine3678ab Posts: 8,394

Okay ... the forums are for questions and when it comes to making Iray Shaders, yes I have a few ;-)

Was told to use the MDL bricks, so like okay.

If one "imports from scene" from a basic new cube, one sees quite a lot of wires! I understand the concept is to plug in each brick to another and somehow one is also going to connect to the object for display.

So pacing this back big time, since none of the "previews" seem to render any results whatsoever, hopefully somebody or bodies have time to walk us through the process for to start making, let's say a very basic beginner Iray Shader.

The first 3 on the list are for what please?

 

001.png
1596 x 833 - 119K
002.png
1596 x 833 - 233K
Post edited by Catherine3678ab on

Comments

  • Sven DullahSven Dullah Posts: 7,621

    Ok so I'm only familiar with RSL so can't help much with building Iray shaders, sorry:) Anyways, you might want to check out the link to get a basic understanding of MDL shaders: https://raytracing-docs.nvidia.com/mdl/introduction/index.html#mdl_introduction#

    You do know you can zoom in to see in more detail how bricks are connected? To see the result of your work you need to apply the shader to some object in the scene (lower right corner of the SM tab) and render.

  • Ok so I'm only familiar with RSL so can't help much with building Iray shaders, sorry:) Anyways, you might want to check out the link to get a basic understanding of MDL shaders: https://raytracing-docs.nvidia.com/mdl/introduction/index.html#mdl_introduction#

    You do know you can zoom in to see in more detail how bricks are connected? To see the result of your work you need to apply the shader to some object in the scene (lower right corner of the SM tab) and render.

    Oh yes, made a few RSL shaders a few years back so I know about the zooming, "applying" and then yes, one can render the object in the viewport. It's all those little preview renders which appear to be doing absolutely nothing so far.

    I'll check out the link, thanks.

  • hohoho ... right, well the good news is that we do not have to make the bricks no more than we have to make our cars. Koodos to the geniuses who did make those bricks.

    Now, what we would like to know is how to use these bricks, how to drive the car.

    Over the years I've noticed a few vocals expressing that they do not like tutorials that just tell them what to do rather than provide 300 ways to Sunday on how to do things plus the explanations for why and how everything works. If they ever opened up Hexagon and spent the time required to discover precisely which combination of buttons work, and which never did/do, they would have their answers. Not into wasting time on how to not do things 300 ways to Sunday. However for those who love explanations for how everything works, please, NVidia has a beautiful website there PLUS they have it in a .pdf for download. The links are on this page: http://mdlhandbook.com/index.html

    Scanning through, we learn a few rather interesting tidbits of information.

    c probably indicates color

    f probably indicates floater

    bsdf probably indicates Bidirectional scattering distribution function

    Being the owner of a poodle, one knows how it is they can be "perturbed" ... so finding this description of a bump map was amusing:

    Bump mapping: perturbing a surface normal

    My paraphrase from one of their quotes, [surely put there for people like me]:

    The brain of a sheep weighs about 130 grams, and if a dinosaur whose brain is only about 70 grams [or 2.5 ounces] is headed your way, run, nothing is going to stop it.

    This next quote reminded me for some reason of the shopping carts here ;-)

    "Rotation of direction of anisotropy, where 1 equals 360 degrees"

    {in case this information helps anyone}  "A value of bsdf_measurement is used as the argument for the measurement parameter of the BSDF measured_bsdf"

    Illustrated on their site are how the various "layers" can affect the rendered appearance of objects.

    So far I'm going with the thoughts that "layers" = "bricks" ... one has a base brick, then adds layers to said brick, to achieve the desired appearance when rendered on an object.

    So then: Which brick would that be that we add first? Screengrabs are welcome.

     

     

     

  • BejaymacBejaymac Posts: 1,897

    First off, stay away from "Import from Scene", most of the shaders we use were not made in the SM, and simply wont Import, some however are tied to an algorithm that tries to recreate the shader out of SM bricks, and the one tied to the default surface shader hasn't worked right since before the prelaunch betas of DS3, so no telling what your going to get trying to import a far more complicated shader like Iray Uber.

    I'm quite adept at using the SM with RSL, but the MDL setup scares me, it's complicated as hell, but to get you started, https://www.daz3d.com/forums/discussion/242936/an-iray-shader-mixer-cookbook/p1 , it's a thread that shows some of the basics.

  • Catherine3678abCatherine3678ab Posts: 8,394
    edited October 2019
    Bejaymac said:

    First off, stay away from "Import from Scene", most of the shaders we use were not made in the SM, and simply wont Import, some however are tied to an algorithm that tries to recreate the shader out of SM bricks, and the one tied to the default surface shader hasn't worked right since before the prelaunch betas of DS3, so no telling what your going to get trying to import a far more complicated shader like Iray Uber.

    I'm quite adept at using the SM with RSL, but the MDL setup scares me, it's complicated as hell, but to get you started, https://www.daz3d.com/forums/discussion/242936/an-iray-shader-mixer-cookbook/p1 , it's a thread that shows some of the basics.

    Thank you, advice much appreciated. Will check out the link.

    ... and we have noted from said link that yes, no the preview popup tabs are useless for Iray. sigh.

    Post edited by Catherine3678ab on
  • BejaymacBejaymac Posts: 1,897

    If you want a basic no frills shader to mess about with then make sure the Iray render engine is selected, open the SM, go File > New Shader, select Material, give it a name if you want to, then click Accept.

    It's a basic Iray shader kind of similar to the default surface shader for 3DL(missing a few settings though), just watch out though, many of the bricks used in it have had their names changed from the ones in the Brickyard, so figuring out which is which is a bit of a pain.

  • Yes thank you. Read through that cookbook page ... wow ... one thing he/she/they found though as a crashing bug, I dunno, took one look at it and figured I saw something he/she/they missed, not that it should have caused a crash but it certainly might have confused D/S. Used to Hexagon, anything that confuses Hexie cases a crash.

  • Catherine3678abCatherine3678ab Posts: 8,394
    edited October 2019
    Bejaymac said:

    If you want a basic no frills shader to mess about with then make sure the Iray render engine is selected, open the SM, go File > New Shader, select Material, give it a name if you want to, then click Accept.

    It's a basic Iray shader kind of similar to the default surface shader for 3DL(missing a few settings though), just watch out though, many of the bricks used in it have had their names changed from the ones in the Brickyard, so figuring out which is which is a bit of a pain.

    Awesome, yes, nice collection there. Figured out how to change a few names ... long ways to go lol ...

    So, we started over ...

    Step 1: is yes, be sure that the Render Engine is set to Iray.

    Step 2: create a cube or something for to receive the Shaders and be rendered in the little window.

    Step 3: Make a New Shader ...

     

     

    22.png
    1196 x 775 - 182K
    023 the base.png
    1493 x 676 - 162K
    Post edited by Catherine3678ab on
  • Catherine3678abCatherine3678ab Posts: 8,394
    edited October 2019

    A rather daunting task it appears ... however we insist to at least become more familiar with how this process works ... and cherish those sales on Shaders, yes!

    Quite accidentally {although that seems to be how many people achieve something with these bricks} - twice now - I've succeeded in making the target vanish. Not sure how well received a shader to make things vanish would be so not likely to be released lol ...

    Now the Parameters Brick is a "one only" item, so the default brick needs to be removed in order to load a basic blank Parameters Brick. One 'draws' wires then from the 'auto' bulb over to anything else on the left side of bricks. Sometimes nothing happens and that's okay. It is though, how items get added to the Parameters Brick [which will be showing then on the Parameters Tab]. There's quite the tiler available, although on the invisible brick not truly of much value.

    Tomorrow is another day ;-)

     

    003 the invisible shader.png
    1127 x 782 - 84K
    004 use the Auto Add to add to the user parameters.png
    811 x 744 - 143K
    Post edited by Catherine3678ab on
  • Catherine3678abCatherine3678ab Posts: 8,394
    edited November 2019

    Hay we're making headway! Shaders => Shader Presets => Mat files :-)

    Question ['cause I'm not good at reading American legalize] ... those NiVidia .mdl shaders that are free for folk to download from their website, are we allowed to make AND SHARE D/S shaders made from/with them?

    .................

    edit to add {just in case anybody is interested} - am also waiting/hoping for an answer from the Company ;-)

    ......................

    edit to add: Got my answer! :-)

     

    Post edited by Catherine3678ab on
  • Catherine3678abCatherine3678ab Posts: 8,394
    edited November 2019

    Fish floundering around on table out of water ... hehehe ... a tutorial is posted if anybody is interested, wants a good laugh ... whatever. My tutorial Pose.

     

    .....................

    adding link here for one of those pages that explains things without telling you how to do anything.

    Documentation Page

    Apparently there is also a rather expensive tutorial in the store. I've spent my $ in the sales already so that's not happening. However I mention it 'cause somebody else might like to buy it and then provide some nice easy to follow picture tutorials. For free of course.

    Going by the lack of comprehensible materials, this is one field in Daz Studio that could use all the help it can muster. The dear people that do the math, are geniuses ... but the people who are using the end products, just need to know WHERE to find the brick(s) and HOW to get them working. ST goes absolutely nowhere. So why do any of the bricks have ST.

    P means pointer, but that can change. So can some of the other letters. Cute. F does not always fit into F. BUT if it doesn't and one changes something from variable to what was it now, uniform or something THEN it might fit into a slot it did not as a variable. This makes sense I'm sure ... but not to me. Maybe somebody could colour code the bricks. Red goes to Green goes to Yellow, etc. So one could then grab a brick of each colour and then make the spaghetti connections.

    Please, in the next edition of Daz Studio, "come down to Earth" and make this brickyard easier to use. tia

    Post edited by Catherine3678ab on
  • Okay ... trying to work out some details from the innards of files ...

    this:  color ( 0.4995059f , 0.1011451f , 0.006039216f)  for example is supposed to be a color. D/S colour gadgets have nothing with "f" and a conversion chart I did not find on the 'Net ... so is there one somewhere? There are several colors that I would like to convert.

    tia

  • BejaymacBejaymac Posts: 1,897

    Ignore the "f" and multiply each number by 255 to get a rough convertion.

    There are a number of different color systems available to a computer, Studio's color picker uses 0 to 255 which gives it access to 16 million colors, but internally it uses another color system (0.0 to 1.0 and every decimal place inbetween) that gives it access to a couple of billion colors, Poser is exactly the same, check any Material setting and you will find similar numbers in there.

  • Bejaymac said:

    Ignore the "f" and multiply each number by 255 to get a rough convertion.

    There are a number of different color systems available to a computer, Studio's color picker uses 0 to 255 which gives it access to 16 million colors, but internally it uses another color system (0.0 to 1.0 and every decimal place inbetween) that gives it access to a couple of billion colors, Poser is exactly the same, check any Material setting and you will find similar numbers in there.

    Thank you, today's project ;-)

  • Catherine3678abCatherine3678ab Posts: 8,394
    edited February 2021

    nm

    Post edited by Catherine3678ab on
  • I've been out of the loop for a long while and am slowly making my way back.  I chanced upon this thread while searching how to use geo shells effectively  but this shader making is infinitely appealing to me as years ago I made textures for Poser. 

    DS is definitely more involved and harder for me to grasp. I cannot express how helpful I have found all this information. 

    Now to start implementing seems like a great adventure which I hope we can share. :) I do have a lot of catching up to do before I can share anything worthwhile I am sure but definitely up for the challenge!

  • Catherine3678abCatherine3678ab Posts: 8,394
    edited November 2019

    I've been out of the loop for a long while and am slowly making my way back.  I chanced upon this thread while searching how to use geo shells effectively  but this shader making is infinitely appealing to me as years ago I made textures for Poser. 

    DS is definitely more involved and harder for me to grasp. I cannot express how helpful I have found all this information. 

    Now to start implementing seems like a great adventure which I hope we can share. :) I do have a lot of catching up to do before I can share anything worthwhile I am sure but definitely up for the challenge!

    Welcome back! Yes there is a learning curve and that first large "spaghetti page of coloured wires" can be rather overwhelming which is why I washed it down to a few bricks at a time. Any brick that is "RSL" only we cannot use ... and to watch some of the bricks that have both options, some options are for "RSL" only.

    Avoid RSL.png
    284 x 409 - 16K
    Post edited by Catherine3678ab on
Sign In or Register to comment.