WTUT Decal - Will's Iray Decal tutorial

Oso3DOso3D Posts: 14,963

So here we go. Iray Decals, like a number of things, are way less hard than folks imagine.

First, make a figure (or whatever) and... add a decal. Note that decals only show up in NVIDIA viewport mode, and also they cannot have displacement (well, you can put displacement, it just doesn't do anything)

(screenshots link to somewhat larger screenshots, if you want to look more closely)

 

 

I like to set the decal to some bright obvious color, like green, so I can place it as desired.

 

Next, move it to the middle of the figure and increase scale so it covers the entire figure.


 

You'll notice it only covers the front. There's a parameter for that! You can have the decal projecting from the front, back, or both front and back. Also, front and back are different material zones. I don't usually do much with that, but you do want 'front and back' to cover the entire thing.


 

Now go into surfaces and give it a shader of your choosing. By default, the projection type is Planar. What this means is that essentially the texture map is 'projected' toward the object. Whatever pixel is on your shader that hits part of the figure, that's what it's colored by. You can think of planar projection like a spotlight with a gel. Whatever image is on the gel is projected onto the figure.

There are other projection types, like cubic (which is a good go-to type for most regular objects), spherical, cylindrical (which is a decent objection for human figures), and a few modified versions of those.

Here's the figure with the default planar projection of stone tile.

 

You can also rotate the direction of the projection. One trick is to arrange the angle of the projection to be the same as the direction the camera is looking from. This will make the texture map look 'perfect' from the camera's viewpoint, with little distortion. Mind you, it can be tricky to work out the camera angle.

Here's the same figure with spherical projection that's been rotated a bit.

 

Another limitation of Iray Decals is that you can't control what material zones or body zones they fall under. If you don't want the decal to be on someone's head, you have to carefully scale and move the decal... or remove the head. In this case, playing around with statues, I noticed a big problem with eyelashes.

 

Thankfully, there are some ways to shape the figure to minimize eyelashes. With Genesis, you want to reduce eyelash length (I found it necessary to reduce it more than the limits normally let you). With Genesis 2, 'Eyelashes Hide 01 and 02' will remove the eyelashes.

Also, for fun, I hid the eyes -- visibility DOES affect decals.

The mouth is open, and you can see the projection affects EVERYTHING.

 

 

So there you have it. Decals are a fun and not very hard way to add projection shading to Iray. Objects lacking UV maps, or with bad seam issues, no problem! It's not perfect, of course, and you can get distortion problems at times.

I also suggest that if you are going to rely on bump maps (since decals lack displacement) that you make sure to get a good normal map -- it can make a huge difference in enhancing the surface.

 

Well, hope you enjoyed my first tutorial. I plan on labeling all my tutorials with the WTUT comment, for easy forum searching. You can find this tutotial quickly by searching the forum for "WTUT Decal".

Feel free to ask questions.

Post edited by Oso3D on
«1

Comments

  • JeremyDJeremyD Posts: 265

    Very nice! Going to try this when I get home. 

    In my limited knowledge on this, is there a huge difference between this and Geo Shells? 

  • Oso3DOso3D Posts: 14,963
    Very different. Geoshells are essentially an extra copy of your object. It maps the same as the object, and you can do cool stuff where geoshell and root object surfaces interact. Decals basically override the underlying surface, redefine it. I'll have to write up a geoshell tutorial ...
  • ChoholeChohole Posts: 33,604

    Tutorials are usually put in the program forum appropriate to the content, or in Tech help forum.  You can change the forum yourself by editing your first post and selecting a new forum from the Categry drop down list.

  • L'AdairL'Adair Posts: 9,479
    Very different. Geoshells are essentially an extra copy of your object. It maps the same as the object, and you can do cool stuff where geoshell and root object surfaces interact. Decals basically override the underlying surface, redefine it. I'll have to write up a geoshell tutorial ...

    Thank you, Will. I've been curious to try this since the first time I heard you talking about decals, but didn't know where to start. That, and having lots of other things demanding priorities, lol.

    I just finished following your tutorial.

    Because JeremyD asked about Geoshells, it got me thinking... even though I've only just figured out how to use the Geometry Tool and Settings, and that barely... couldn't you create a geoshell then use the geometry tool to remove things you don't want the decal on and apply the decal to the shell?

    I'm probably getting way ahead of myself, but without having tested my theory, it seems like that would be a good way to remove the eyes and eyelashes from the decal's effects...

    And you know I'm really looking forward to your geoshell tutorial, especially if it covers the geometry tool at the same time!
    heart

  • Oso3DOso3D Posts: 14,963
    edited March 2016
    You apparently can't put an Iray decal on a geoshell, which is unfortunate. (It was one of the first things I thought of trying, because geoshells have great control of surface visibility ) But yeah, geometry tool should work.
    Post edited by Oso3D on
  • L'AdairL'Adair Posts: 9,479
    You apparently can't put an Iray decal on a geoshell, which is unfortunate. (It was one of the first things I thought of trying, because geoshells have great control of surface visibility ) But yeah, geometry tool should work.

    That's a shame... Maybe using a geoshell for the parts you want to treat differently? For example, geoshell all the parts of the eyes, then apply a marble shader to get that statue-eye look, while at the same time using cutout opacity to remove the eyes from the decal...

  • Oso3DOso3D Posts: 14,963
    I did a decal based skin. I ended up putting the eyes/teeth/fingernails on a geoshell and hiding the eyes/jaws on the base figure. So the eyeless/jawless base figure had skin sprayed on it, then eyes and other bits showed in the gaps.
  • Oso3DOso3D Posts: 14,963

    For reference, here's the skin test.

    It's a tiling skin color/bump/normal. I added as much detail as I could as HD morphs.

  • MarshianMarshian Posts: 1,462

    Very cool Will! Thanks for posting this. There are some great ideas to explore.

  • JerifeJerife Posts: 272
    edited March 2016

    Thanks a lot Will! yes  What happens when you move the figure? Decal projection follows the figure? Or the texture moves as the figure moves? If I move the arm down the "glove" disappears

      

     

    SEstatuas 02 blend.jpg
    3708 x 3000 - 2M
    Post edited by Jerife on
  • nonesuch00nonesuch00 Posts: 18,032

    pretty cool

  • Oso3DOso3D Posts: 14,963
    edited March 2016

    The projection is based on the object's XYZ, so, yeah, if you move body parts around the coverage changes. Again, think of it like a spotlight on the object; you can make the spotlight bigger or smaller, but if someone sticks their hand up enough it's 'outside' the light.

    I'll note that it's also possible to set the projection based on world XYZ, which might offer some weird/interesting possibilities for coordinated but separate objects.

     

    Post edited by Oso3D on
  • Oso3DOso3D Posts: 14,963

    Apparently I missed something really obvious, which is that Cutout will act as a transparency showing the underlying object. And, I think, you can layer this, so you can have multiple decal levels.

    Duh. This is potentially VERY USEFUL for things like surface wetness, adding rust or other scattered items on an object, and so on.

    I'll show some examples when I can.

     

  • Oso3DOso3D Posts: 14,963
    edited March 2016

    Now, mind you, decals are essentially INTENDED to be used this way, as the ability to add details to objects without needing LIE.

    But you can do weirder things, particularly if you keep cutout value low.

    Here's a simple case of 'rust in metal.' You might also be able to do tattoos, makeup, and other stuff, but keep in mind that decal cutout acts as a switch between levels -- the cutout level will govern the mix of shaders.

    Geoshells, on the other hand, create an actual layer, which can interact in complex ways. For example, if you have a translucent geoshell on top of an object, it will act very much like something smeared over a physical surface.

    Note that this example would look better if I had made a normal map to help define the edges of the rust. It only has a bump map.

     

    Decal example.png
    1080 x 1080 - 1M
    Post edited by Oso3D on
  • Oso3DOso3D Posts: 14,963
    edited March 2016

    Oh, yet another last minute addition...

    Iray decals do not have displacement. HOWEVER, the underlying surface's displacement applies fully.

    Basically, decals are like you've spray painted the surface.

    Post edited by Oso3D on
  • Silas3DSilas3D Posts: 561
    edited December 2016

    Do you have to have an NVidia GPU for this to work? If I add a decal to an object in my scene, Iray never kicks in. if I delete the decal or hide it in the scene tab then the render kicks in, I've tried interactive and photreal modes :( I'm on an iMac so have an AMD GPU.

    Post edited by Silas3D on
  • GreybroGreybro Posts: 2,493

    Bookmarking for later consumption! Thanks for posting.

     

  • nonesuch00nonesuch00 Posts: 18,032
    tigerste said:

    Do you have to have an NVidia GPU for this to work? If I add a decal to an object in my scene, Iray never kicks in. if I delete the decal or hide it in the scene tab then the render kicks in, I've tried interactive and photreal modes :( I'm on an iMac so have an AMD GPU.

    No, you don't need an nVidia Vidio card for it to work. It does take paitence during the render process or you made a mistake setting it up.

  • Silas3DSilas3D Posts: 561

    No, you don't need an nVidia Vidio card for it to work. It does take paitence during the render process or you made a mistake setting it up.

    It's not showing in the viewport at all - it just stays in shaded mode, as it does prior to Iray kicking in - almost like its taking longer for Iray to kick in, but the progress bar in bottom right corner stops loading and it never kicks in.

  • nonesuch00nonesuch00 Posts: 18,032
    tigerste said:

    No, you don't need an nVidia Vidio card for it to work. It does take paitence during the render process or you made a mistake setting it up.

    It's not showing in the viewport at all - it just stays in shaded mode, as it does prior to Iray kicking in - almost like its taking longer for Iray to kick in, but the progress bar in bottom right corner stops loading and it never kicks in.

    I'm 12 hours into a CPU render so I can't try it out what you are doing but based on my experience with DAZ Studio, i.e. when it starts behaving strangely and not doiing things it should, I exit DAZ Studio and restart it, before restarting though I sometimes check that DAZ Studio has actually exited - just because it doesn't have a windows visible doesn't mean it's not running, paricularly when you have started and stopped iRay renders many times in one DAZ Studio started session.

  • Oso3DOso3D Posts: 14,963

    What nonesuch said. I haven't had that problem.

  • Silas3DSilas3D Posts: 561

    I've worked in IT for more than a decade so know only too well how the "turn it off and on again" rule sometimes works and sometimes doesn't, sadly on this occasion it doesn't! ;)

  • nonesuch00nonesuch00 Posts: 18,032
    tigerste said:

    I've worked in IT for more than a decade so know only too well how the "turn it off and on again" rule sometimes works and sometimes doesn't, sadly on this occasion it doesn't! ;)

    Sorry, then really in such cases as a former programmer and systems administrator I always tried to duplicate all the conditions of the example you are basing your troublesome decal off of. You can't duplicate the HW Will has so easily but the DAZ Studio part of it should be easy to duplicate.

  • Oso3DOso3D Posts: 14,963
    edited December 2016

    Amusingly, we just had a service guy to fix the ice maker on our fridge.

     

    And the resolution was turning it off and on again.

    (Like, literally. He left an hour ago, and the computer control somehow wasn't working properly, unplugged it, replugged it, checked a setting, fixed)

     

    Post edited by Oso3D on
  • nonesuch00nonesuch00 Posts: 18,032
    edited December 2016

    Amusingly, we just had a service guy to fix the ice maker on our fridge.

     

    And the resolution was turning it off and on again.

    (Like, literally. He left an hour ago, and the computer control somehow wasn't working properly, unplugged it, replugged it, checked a setting, fixed)

     

    Oh, I bought a 1994 Dodge Ram 1500 Short Bed as the 1st vehicle I bought brand new from the lot and those years were some of the 1st years they started getting fancy with using computers to control cars and add air  bags & all that such. Literally, sometimes I would turn the car on and the computer would not start the oil pump and other things and the only way I'd know is if I coincidently tried to roll down the electric windows because they wouldn't work then either. I told the dealer and Chrysler multiple times about their programmers had screwed up but they wouldn't listen. Eventually, of course no surprise, I started the car and and the oil pump wasn't started, I didn't notice, and then I drove it long enough to blow up the engine. I had to pay $4500 out of pocket for a design defect that was of course 100% Chrysler's.

    Needless to say it's not a surprise to me that Detroit has turned into a car manufacturing ghost town, and the Chrysler and several other businesses have went bankrupt & gotten bailed out of their bankruptcy, although for that case, every American was stuck for the bill not just myself.

    Computer programming has improved much though in cars. In computer graphics & UIs too although they have a long way to go. What's really grown by leaps & bounds is automated testing suites for SW products and systems.

    Post edited by nonesuch00 on
  • JD_MortalJD_Mortal Posts: 758
    edited December 2016

    TIP: You can set decals to use UV Mapping, then it will simply match the same UV you set it to, like skin. (Great for keeping hairy spots, freckle spots, eyebrows, makeup, dirty spots and wet spots where you originally place them, on any model. Without messing with the original models textures/surfaces, or limiting yourself to one model.)

    Post edited by JD_Mortal on
  • Silas3DSilas3D Posts: 561

    Again, the problem isn't the positioning of the decal, its the fact that Iray isn't kicking in - see attached screenshots.

    I'm probably doing something wrong, so please tell me if I am hehe!

     

    Screen Shot 2016-12-09 at 07.35.56.png
    1280 x 720 - 579K
    Screen Shot 2016-12-09 at 07.36.13.png
    1280 x 720 - 562K
    Screen Shot 2016-12-09 at 07.36.37.png
    1280 x 720 - 254K
  • mjc1016mjc1016 Posts: 15,001

    Are you actually hitting render?

  • Oso3DOso3D Posts: 14,963

    Did you put a surface on the iray decal that's different than the underlying surface? Like, make one blue and one white...

    I mean, you could be putting a white decal on a white sphere, I can't tell from those screenshots.

     

  • Silas3DSilas3D Posts: 561

    That's irrelevant Will, as the render isn't even starting ;0)

Sign In or Register to comment.