Is saving a 'remove LIE' preset possible?

Hey everyone, I am wokringon some free makeup LIE presets for genesis 8 female and have tried to create a preset that removes all current LIE layers so the user can remove the LIE makeup easily before applying a new one.. It doesn't seem possible using the LIE preset menu. Is it? Or is it possible to create a script to do this?

 

Thanks

Comments

  • As far as I know the only ways, other than a custom script, are Undo or reapplying the base materials.

  • ZaiZai Posts: 289

    Bear with me as this will be a bit long...

    I'm sort of in the same boat here. I'm trying to save some presets that use the LIE editor, but they stack up when changing from one preset to another. Also, because the LIE set up relies on a base diffuse (in my case), when I apply a subsequent preset, it changes the base diffuse back to the original. I will explain...

    I have an object which has presets to change the base diffuse to different colors on ONE material zone, say a purse strap. The original object loads with an all black preset IE...an all black purse with a black strap. You can change it to a bunch of other colors. If you wanted to change the strap ONLY to red, you slect the object, then the mat zone and click the preset and it uses the red strap diffuse on JUST the strap material zone. That all works fine and now you have a black purse with a red strap. So far we haven't gone into any LIE applications, just changing a regular diffuse.

    The next preset lets you add a LIE graphic...a pattern with a mask. So let's say we want to add a colored flame pattern to the strap. I am using a gradient color layer, with a mask for the shape of the pattern. The color layer in the LIE is a gradient jpeg and the mask applied to it in LIE is just an alpha of the flame shapes. This is so you can use the same alpha but use different colors. 

    Here's where it has a problem. Say you apply the red strap preset. It turns the strap red. Then you add the pink flame preset. It applies fine, the FIRST time. Now say you change your mind and want a yellow flame for the pattern but still want to keep the red strap base, so you click the yellow flame preset. When you do that, it wipes the red diffuse back to the original black. It ALSO adds the new preset layers to the existing LIE set up. It may not really show since it lays right over top of the first LIE preset, but it's there. Now you have a black strap, but with 2 layers of LIE over it, the pink AND the yellow. Not at all what you wanted. The red is gone and you have doubled up the flames, which may or may not render nicely and will be slower because it's adding another LIE layer. And the more you apply presets, the more LIE layers it builds up.

    This is where the remove or reset comes in. That seems to be the only way to change the design if you change your mind. You must apply the base materials again and start over. I can easily do a remove "fake" by just making the all black set up a duplicate and calling it "Remove/Reset". But that's sorta tedious to the end user. 

    I found 2 ways to avoid the LIE stacking.

    One is to control/command (PC/Mac) click the preset of the pattern LIE preset. That will bring up a small dialog in Studio called the Material Preset Load Options, which lets you choose to remove or replace the LIE set up. With this you can choose to replace all or just the selected surfaces and you can replace or stack the LIE images. It doesn't always work as expected because it TOO, wipes out the red strap selection, no matter how I set it.

    I thought this might be because of the way I saved the LIE pattern presets. They might have included the black strap. So I tried to uncheck the base diffuse during the preset save. There seems to be no way to save a LIE WITHOUT a base diffuse. That sorta makes sense since it needs something to work against in the temp file where it stores the images it's going to combine for the  LIE preset.  Someone did suggest in another post that you can simply uncheck the base diffuse (even though it leaves it in there) in the LIE when saving the settings but it doesn't seem to work. Either way, using the control/command click...All this does is get rid of the stacking problem but it doesn't do what we want with regard to the diffuse color map persisting (the red strap application). 

    The second way is to save the LIE setup as a SHADER preset, even though it's not. This seems to avoid the stacking issue and does a perfect replace of the LIE without the need for the dialog above. But it too reverts back to the black original strap diffuse. Again, thinking I must have saved the preset with the original diffuse I tried to eliminate it so it ONLY does the LIE stuff. It's not possible that I can see because you have to have a diffuse for a LIE to exist at all.

    THAT being explored....

    I moved on to possibly creating a script, hoping that the script would allow me to just change out values for the LIE and avoid the diffuse deal altogether. Because I suck at scripting (meaning..I haven't ever done Daz scripting, but I have hacked around some JS code and HTML) I didn't know where to start. I did find Rob's LIE backdrop script which looked promising, but I'm not sure how to go about changing it, OR if it will accomplish the skipping of changing the diffuse (the red/black strap issue), while only affecting the LIE. The problem with Rob's script is that I personally don't know what call to use instead of getBackdrop to target the material zone on my object. Do I do it via ID, tags...what? Do I have to make sure it's on the proper object first, THEN do the ID or tag? And...if I do that, then what if you have more than one of that object in the scene? Will it affect both? I've seen a lot of references to DZTexture, etc. but don't know which one to use or how or in what order.

    I've been banging my head against this for like 3 days and in the end I may have to revert to the basic reset because it may just not be possible. I thought maybe the script would avoid some of the missing options in the LIE or the dialog, but having a hard time getting started. Using a script would also let me just modify text files and make creating the presets quick and easy since I already know the paths and images. I'm also avoiding using just an overlay diffuse because it can't be seen in the viewport and people don't like that. It seems a lot of this is also affected by the temp images of the LIE as well. 

    Anyone who wants to chime it would be appreciated and I hope the exploration I've done helps the OP's question if applicable. It seems a lot of people struggle with the LIE this way.

    And please Richard....you always go out of your way to help so don't feel you have to solve it all! :)


     




     

     

     

  • Another option, at least for iray, would be to use diffuse Overlay for the flame (or whatever) pattern - that way presets that change the base colour can skip the Diffuse Overlay, and vice-versa. That doesn't work for 3delight, though there are layered shaders for it (not sure which are Merchant Resources, though). You could, of course, create custom shaders which would layer together just the properties you wanted.

  • retrodevilretrodevil Posts: 75

    Thanks guys, I was afraid it wouldn't be straight forward LOL.

    @Zai Where can I find Robs Backdrop script and would that work in my situation of just removing the LIE, ready for a new one? If so I may just point people in that direction on my download page. :D

  • ZaiZai Posts: 289

    Here you go....

    http://docs.daz3d.com/doku.php/public/software/dazstudio/4/referenceguide/scripting/api_reference/samples/images/create_layered_image_backdrop/start
     

    But I don't think it has a function for just remove. It's more of a replace. 

     

  • retrodevilretrodevil Posts: 75

    Cool thanks :D

  • AbnerKAbnerK Posts: 718

    There is a cheat. Either save a png file with a tiny dot in one corner (I didn't try making it totally blank) use that as your image and use the Replace option or you can change the opacity of the layer to zero and save that as your preset used with the Replace option. It seems to work. 

Sign In or Register to comment.