DS: Creating a slider on the Parameters tab that can ONLY have integer values (+follow-on stuff...)

Edit: Simple answer - it's easy to create a new integer, boolean, float, etc slider as explained in Richard's first response. What you can't do (and what I wanted to do) is change an existing float slider to an integer slider.

 

Links To Follow-On Stuff Posts In This Thread:
- Using ERC Freeze To Create Dependencies: Since I had to create new sliders, I than had to recreating the dependencies from my existing non-int sliders I ended up doing this using ERC Freeze, and working out that part starts here.
- Slaving A Slider From The SURFACES Tab To A Slider On The Parameters Tab: The first step was to set up proxies on the Parameters tab using someof the sample scripts, and then using ERC Freeze again to set up dependecies. Playing with all that starts here.

 

Original post begins here:

I've created a Poser prop PP2 that has two parameter dials which are restricted to integer values

When I load this prop PP2 into DAZ Studio the dials are displayed (by default) as percentages, which can easily be fixed from the 'Settings' cog of the slider. 

Once I've fixed that the 'Nudge' controls (the '-' and '+' at the ends of the slider) work as I want, i.e. integer steps (as used on the 'Shelf Number (1 to 6)' slider below).. However, if I drag the slider there's no such integer restriction (as shown on the 'Book Number (1 to 64)' slider below), and subsequent use of the 'Nudge' controls adds/subtracts 1.0 to/from whatever the value now happens to be. I can't see anything on the 'Parameter Settings' pane that would fix this.

So the question is:

Q: Is there a way to restrict a slider on the 'Parameters' tab to ONLY have integer values ?

 

Here's the definition of the dial from the PP2 for anybody who's familiar with that. It's fairly clear that the 'trackingScale' which sets the finest resolution that the Poser dial will work to is being used for the DS 'Nudge' controls. But it appears that the finest resolution of the DS slider is fixed, probably at 0.01 (1%).


I'm guessing that perhaps there's a parameter in the .DUF that isn't exposed on the Parameters tab ?

IntPoser.jpg
261 x 92 - 10K
DSpercent.jpg
300 x 494 - 54K
DSvalues.jpg
275 x 91 - 10K
pp2.jpg
331 x 400 - 37K
Post edited by 3dcheapskate on
«1

Comments

  • Well, you can create an Int slider (right-click on Parameters pane>Edit Mode, right-click>Create New Property, set the type (at the top) to Int, set options as needed - for soem reason the Max field can't be typed to, but for an integer it's easy enough to drag to set). So you may be better not creating the proeprty in Poser before export, but adding it to the imported prop in DS.

  • 3dcheapskate3dcheapskate Posts: 2,096

    Thanks Richard, I've now got my integer slider created. It obviously doesn't actually do anything yet, so I need to slave some other sliders to it. Probably need to use ERC Freeze as mentioned in the Anybody fancy doing a (freebie) DAZ Script version of Easypose ? thread ?

    And then I obviously need to save a DS-format file - Support Asset > Figure/Prop Asset  I think ?. (I was playing with DS4.8)

  • ERC Freeze or you can put the Parameters pane in Edit mode (again) and use drag-and-drop into the Property Hierarchy pane (you can right-click on a proerpty in the parameters pane and bring it up in the Property Hierarchy to speed things along).

  • 3dcheapskate3dcheapskate Posts: 2,096
    edited October 2018

    I realized that I needed to save as a Scene Subset in order to get the child magnet to save with the prop.

    I'm now having problems with setting up the ERC Freeze.. I can see how to do it, and I did it successfully before on the other thread. Here's what I'm trying to apply the ERC to (I already have my two new Int sliders added alongside the non-int ones that they're replacing:

     

    For shelf 6 the Mag Zone yTran has to be 121.92 (it was 0.0 for shelf 1), so I manually set this value. I set my new Int slider 'Shelf No' to 6, because when it's set to 6 I want Mag Zone yTran to be 121.92...

     

    ...and hit 'Accept':

    Now that's definitely gone wrong !

    trying.jpg
    1286 x 631 - 178K
    allgood.jpg
    823 x 696 - 129K
    haywire.jpg
    604 x 667 - 69K
    Post edited by 3dcheapskate on
  • 3dcheapskate3dcheapskate Posts: 2,096
    edited October 2018

    ...it appears that several other parameters of the magnet, Mag Base and Mag Zone have also been modified (e.g. Mag Zone 'Scale' is now 15000%)

     

    Manually setting parameters back to what they should be restores some semblance of order, and I can then use my new 'Shelf No' dial and the Mag Base moves vertically upward in 4 small steps (not 5 which is what I'd expect), each step being the same size, but too small.

    I probably need to sleep on this.

    Untitled.jpg
    878 x 602 - 101K
    Post edited by 3dcheapskate on
  • Hmm - I can see one issue, ERC Freeze is looking for offsets from the zero value - presumably you don't have that, 0 isn't the shelf 1 (or shelf 0 rather) position of the dForm, with a smooth interpolation to shalf 6. I think you will need to set this up manually, so you can add a constant to ERC DeltaAdd to place the dForm correctly for shelf 0 and then add scalar times shelf number to move the dForm down. You also need to be careful saving, as you've found, to preserve links between items that are not part of a figure.

  • 3dcheapskate3dcheapskate Posts: 2,096

    Thanks Richard, I'm glad you made sense of my rather garbled explanation ! That's correct, and it's the conclusion my subconcious came to while I slept. When I was setting up the magnet ERC in the Poser original I set the zero value for 'Shelf' to be one shelf-height below the bottom shelf, the deltaAdd value was the shelf-height, and after that was done I changed the minimum value of the master 'Shelf' dial from 0 to 1. 

    I'll also need to delete the original Poser Shelf/Book dials and the deltaAdds from them since they're still driving the magnet base yTran and xTran.

  • 3dcheapskate3dcheapskate Posts: 2,096
    edited October 2018

    I'm going rather off the original topic, but it seems sensible to continue the ERC Freeze stuff here rather than on my Easypose/ERC Freeze thread (from which I've just cross-linked back to this thread)

    ...ERC Freeze is looking for offsets from the zero value...

    One of things that really had me puzzled was the parameters  in the list that appears under 'Freeze Properties' on the 'ERC Freeze' pane. From your observation I now think that it is 'all parameters that have non-zero values, from all currently selected nodes in the Scene pane' - is that correct ? (what about scale values which are usually 100%?)

     

    Anyway, back to what I'm trying to do... and I'm definitely making good (but slow) progress! 

    I loaded the PP2 prop into DS4.9, edited the settings for the existing 'Shelf/Book Number' dials to NOT display as percent and NOT use limits, and then recorded the two values that I need to slave to two new integer dials:
    - Mag Base yTran values for 'Shelf Number' 0, min(1), and max (6): -24.384, 0.0, and 121.92 respectively (the latter number is 5 * 24.384 as expected)
    ​- Mag Base xTran values for 'Book Number' 0, min(1), and max (64): -2.964363, 0.0, and 186.7549 respectively (the latter number is 63 * 2.964363 as expected)

    I then edited a copy of the PP2 to remove the existing 'Shelf/Book Number' dials and the two depencies that they were driving, and loaded that PP2 into DS4.9. The magnet is now positioned exactly as I would expect, on shelf-height down and one book-width to the left of the bottom left book:

     

    So now I want to create a new integer dial for 'Shelf No', set up ERC Freeze so that I get linear interpolation between -24.384 (for 0) and 121.92 (for 6). It's a bit clearer to me now, but I need to think and play a bit because of that non-zero starting value, as Richard pointed out.

    And then similar for the new 'Book No' dial.

    ercfreeze.jpg
    348 x 472 - 62K
    noDials.jpg
    939 x 505 - 77K
    Post edited by 3dcheapskate on
  • 3dcheapskate3dcheapskate Posts: 2,096
    edited October 2018

    Okay, I've got it now. 

    1) Create the new integer slider in edit mode with Use Limits disabled (I got too confused trying to create it within the ERC Freeze)


    2) Set the new master dial and the slaved parameter to appropriate values - I want five steps of 24.384 to get from the bottom shelf to the top shelf.


    3) Do the ERC Freeze.

     

    Unfortunately DS seems to ignore the fact that I selected a single Freeze Parameter. So I then had to go through every parameter in the main UI Parameters pane and set them back to what they should be, leaving just the two that I'd intentionally modifies.

     

    Having done that it looks better. Noe if I change the 'Shelf Number' dial I get the correct step size, but 0 gives me the bottom shelf and 5 is the top. So I set 'Shelf Number' to zero and set the magnet-base yTran (which was zero) to -24.384. I then opened the Settings for the Shelf Number dial, left default=0, set value=1, min=1, max=6, and ticked 'Use Limits'. And it all worked correctly !

    Did a similar procedure for the 'Book Number' Int slider, and then saved as a Scene Subset DUF.

    Closed DS, reopened it, loaded the DUF, and it all works fine !

    ...except that I somehow ended up with the 'Pull Forwards' slider set to 1 (100%), so pushing the book back in (setting the slider to 0) pushes the book out the back.

    No matter, I'll do the whole procedure again from scratch... maybe later ! ;o)

     

    1 - Create Parm In Edit Mode.jpg
    715 x 624 - 57K
    2 Freeze Setup.jpg
    731 x 267 - 104K
    3 - Do The Freeze.jpg
    465 x 624 - 67K
    Post edited by 3dcheapskate on
  • 3dcheapskate3dcheapskate Posts: 2,096

    This "...DS seems to ignore the fact that I selected a single Freeze Parameter. So I then had to go through every parameter in the main UI Parameters pane and set them back to what they should be..." problem that I mentioned in the previous post is becoming a right PITA ! 

    angry

    I've got the Shelf Number and Book Number integer sliders working beatifully and saved to a Scene Subset DUF. Now I'm trying to do the easy bit and create a couple of 'Quick Fit' boolean parameters that set predefined values for x/y/zTranslate, Scale, xScale and a couple of other sliders. But after doing the ERC Freeze I have to manually correct all the parameters that DS has changed which it shouldn't have. And every time I've done that I've missed something and it's got screwed up, so I've had to start again. And again. And again.

    Maybe tomorrow...

  • Memorise the settings and they should not be reset after the ERC Freeze. Select the nodes, Edit>Object>Memeorise>Memorise Selected Node(s) I think.

  • Maybe I can help with that. Nice idea to select the row and the book number with the integer sliders. But I don't get why the DFormer (magnet) is necessary.

    Did you thought about using instances for the books? Also I don't get what the end result should look like. So I guess the books should tilt or fall to ground with the slider right?

    The very first thing I learned about ERC-Freeze is that it lists every property that is not at default value of every item in the scene. To define what should show up in the ERC Freeze list of Freeze Properties select the items you don't want to 'freeze' and Memorize those just as Richard suggested. There are some advantages to have different states of the properties on different items stored on the timeline keyframes before you use ERC Freeze and all that Memorize, Restore, Zero on Figures or Items. You could also uncheck the bottom options in ERC Freeze that say something about 'reset'. You can quickly reset a slider manualy to the default value by Alt+Click on them in the Parameters pane.

    Refereces that might help you:

    Information on ERC Freeze feature

    How to Customize Daz Studio - to speed up Workflow!? [WIP]

    especialy custom Menus to reach the actions to use more qickly:

  • 3dcheapskate3dcheapskate Posts: 2,096
    edited November 2018

    Richard: I'll try that - hopefully it'll work. 

    Syrus_Dante: If I was creating the thing specifically for DAZ Studio that'd probably be a far more sensible way to do it ! But I'm not - it's a Poser prop and I'm just trying to fix a couple of 'simple-to-fix', mildly irritating problems if it's used in DAZ Studio (i.e. Poser integer dials not being displayed as DS integer sliders). But as we all know, 'simple-to-fix' has a way of mutating into 'not-quite-as-simple-as-you-thought-Mwa!-Ha!-Ha!'... in this case I can't just change the sliders from float to integer, I have to create new sliders, which means that I then have to regenerate all the depencies for stuff the sliders drive - which is where I bumped into this ERC Freeze lark again.

    Regarding the end result - I needed some books, but nothing was available that did what I want, so I started playing. Here's the relevant post on the relevant DAZ Freebie forum thread about what this particular thing is intended to do. Basically it's just intended to tilt the book and pull it forward as you would when pulling a book out from a full bookshelf.

     

    Post edited by 3dcheapskate on
  • 3dcheapskate3dcheapskate Posts: 2,096
    edited November 2018

    All done. Many thanks Richard and Syrus_Dante for assistance and suggestions - I didn't need to use the Memorize in the end.

    The cause of my problems - when DAZ Studio imported the PP2 it seems to have set several 'Default' values to numbers that make absolutely no sense to me, bearing no relation to anything in the PP2 (even taking into account the Poser/DS unit differences). Not sure if this was due to a DS4.8 or DS4.9 (can't recall which I used to create the initial DUF) bug that's been fixed, or something totally logical that I just haven't worked out. But I couldn't care less now.

    Simply setting the offending 'Default' values to be the same as the 'Raw' values (which are the values currently set by the sliders before applying any deltadds, etc that are driven by other controls) prevented the spurious parameters from appearing under Freeze Properties on the ERC Freeze pane. Once I had just the correct parameters on the Freeze Properties list it was easy. As it should be !

     

    And here's a DS4.9 render with the correct book being pulled out from each bookcase:

    So I really need to do DS materials now.

     

    1-whyItShowsThese.jpg
    644 x 516 - 68K
    DS-native.jpg
    1000 x 1000 - 703K
    Post edited by 3dcheapskate on
  • Memorise is just setting the default value to the current value, so the end result would have been the same.

  • That makes sense.

    (I must've had some finger/brain trouble when I tried using Memorize because I still didn't get what I expected under 'Freeze Properties')

  • 3dcheapskate3dcheapskate Posts: 2,096
    edited July 12

    I've just posted this as a new thread on the DAZ Studio forum, but I think it might be better to also add it to this thread:

    New (But Related) Question: Is It Possible To Slave A Surfaces Slider To A Parameters Slider ?

    (i.e. can a slider on the Parameters tab control a slider on the Surfaces tab ?)

    Post edited by 3dcheapskate on
  • Richard HaseltineRichard Haseltine Posts: 56,588

    I've just posted this as a new thread on the DAZ Studio forum, but I think it might be better to also add it to this thread:

    New (But Related) Question: Is It Possible To Slave A Surfaces Slider To A Parameters Slider ?

    (i.e. can a slider on the Parameters tab control a slider on the Surfaces tab ?)

    Yes, but it isn't something that can be doen within the UI. it is possible with a script, I have done it on a few occasions, and could probably be set up automatically with a post-load script.

  • macleanmaclean Posts: 2,176
    edited July 12

    The scripts you need are here

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

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

    I did it for the light in a fridge in my Everyday Appliances pack. And I think maybe the gas stove too? I can't remember.

    Basically, you run the Create script and point it to the link script (which goes in the data folder and ships with the product if you're selling it). IIRC, you have to edit the Create script and change the channel name to whatever you're using. Like say, Base Color instead of the default Diffuse, or whatever. When you run Create, it will ask for a link and you need to paste in the path of the data folder. Mine was just 'EverydayAppliances/Refrigerator' - No need for my PA name, drive, letter, etc. The surface should appear in Parameters and will be linked to whatever property you're using. For example, I set the fridge door up with a Yrotate controller so that when it opens, it triggers an emissive surface which switches the light on inside the fridge. (This can only be seen in the Iray preview, so it's not strictly a necessary function. I just did it to see if I could - and it's sort of cool)

    That's all I can remember offhand, but I did make notes on this because I was pretty sure I'd use it again and forget what I'd done. so if you need a step by step, let me know.

    Post edited by maclean on
  • 3dcheapskate3dcheapskate Posts: 2,096
    edited July 13

    Thanks Richard/maclean, once again that's started some rusty bells clunking in the back of my head.

    So I'll give it a try and post back here with any further queries and/or results.

    Edit: Note to self: one of the rusty bells, from 2014 - "Can I automatically run a DSA script when I load a prop from a DUF/DSF file?"

    Post edited by 3dcheapskate on
  • 3dcheapskate3dcheapskate Posts: 2,096
    edited July 14

    Okay, I've run into my first problem.
    Note: I'm running DS4.8, and please bear in mind that I haven't really touched any DS script for years,so I'm very rusty ! I think the last DS scripts I wrote were DS4.5

    Around lines 467-479 of the Post_Load_Material_Proxy_Create.dsa example:

            // Get the list of surface names
            var aSurfaceNames = Object.keys( oSurfaceProperties );
            // Iterate over the surface names
            for( var i = 0; i < aSurfaceNames.length; i += 1 ){
                // Get the 'current' name
                sSurface = aSurfaceNames[ i ];
                // Find the material by name
                oMaterial = oShape.findMaterial( sSurface );
                // If we didn't find the material
                if( !oMaterial ){
                    // Next!!
                    continue;
                }

                ...etc...

    Running the script on a DS-created Sphere Primitive, no problem, but a puzzle. aSurfaceNames.length is 1, which seems correct. sSurface is 'undefined' (which puzzles me), but it gets the correct material (oMaterial.name = 'Default) - although it does the loop twice and finds it twice (another puzzle)

    Running the script on my prop (loaded from DUF) which has 2 materials, it doesn't find any materials. aSurfaceNames.length is 1, which seems correct. sSurface is 'undefined' again. But as I said it fails to find any materials.

    I tried looking at the online Object Index documentation, to dig into oMaterial = oShape.findMaterial( sSurface ) and find out why it's not finding my materials. But the DzShape (or shape_dz) page doesn't exist. The documentation still seems to be stuck at the DS4.5 (I think?) implementation, i.e. just before DzShape, etc were introduced.

    So I'm having to play guessing games.

    var aSurfaceNames = Object.keys( oSurfaceProperties ); returns "An array of names representing all of the given object's own enumerable properties." (it says here) - so I'm guessing from sSurface = aSurfaceNames[ i ]; that it's an array of strings ?

    So how is oMaterial = oShape.findMaterial( undefined ) working for the sphere ? But not for my prop ?

    Post edited by 3dcheapskate on
  • Richard HaseltineRichard Haseltine Posts: 56,588

    I don't think the post-load stuff will work in 4.8 anyway, though that shouldn't stop you from setting a link up by running the script manually even if it's true. I don't actually understand what that bit of code is doing - Object is the class name for the thing from which a lot of classes derive, not a single thing, but it's what Rob uses so presumably it's correct here.

  • 3dcheapskate3dcheapskate Posts: 2,096
    edited July 14

    I don't think the post-load stuff will work in 4.8 anyway, though that shouldn't stop you from setting a link up by running the script manually even if it's true. I don't actually understand what that bit of code is doing - Object is the class name for the thing from which a lot of classes derive, not a single thing, but it's what Rob uses so presumably it's correct here.

    Running a post-load script has worked since at least 2014, DS4.6, when Rob answered that Can I automatically run a DSA script when I load a prop from a DUF/DSF file? question, and I created a set of DS-native props that used it. (Just tried them again in DS4.8 to double-check, and they run the post-load script correctly)

    And if you don't understand that bit of code then that makes me feel slightly less stupid, but leaves me in the same predicament...

     

     

    Post edited by 3dcheapskate on
  • macleanmaclean Posts: 2,176

    In my copy of the script, those lines are from 481 - 493. The lines you're interested in are just before that; 464 - 474

        // Define the list of properties on the
        // target material to create a proxy for
            var oSurfaceProperties = {

            "Lock" : [
                "Cutout Opacity"
            ]
        };
        
        // Create a settings object for copying property attributes
        var oSettings = new DzPropertySettings();

    In the above example, I removed Diffuse, Ambient and whatever other default channels were there and replaced them with Cutout Opacity.

  • 3dcheapskate3dcheapskate Posts: 2,096

    Thanks maclean, simply changing those surface properties did the trick

    (I've attached an image mainly to remind myself)

     

    Now on to the next bit of the problem...

     

    step1- got it.jpg
    1797 x 696 - 154K
  • 3dcheapskate3dcheapskate Posts: 2,096
    edited July 18

    My texture map is a grid of 2 columns by 32 rows, and the Horizontal/Vertical Offsets must match this grid.I.e.

    - The Horizontal Offset value MUST be exactly divisible by 0.5 (or more specifically,either 0.0 or 0.5)

    - The Vertical Offset value MUST be exactly divisible by 0.03125 (or more specifically, 0.0, 0.03125, 0.0625, ...  , 0.9375, or 0.96875)

    I already have two integer* sliders on my parameters tab called 'COLUMN_0_OR_1' and 'ROW_0_TO_31', and I already have two slaved properties 'COL_MAT_PROXY' and 'ROW_MAT_PROXY' with the appropraite scaling factors(these were done in Poser and the PP2 prop was simply imported/loaded into DS.

     

    So the next part of this problem is to control the Horizontal Offset and Vertical Offset from the integer 'COLUMN_0_OR_1' and 'ROW_0_TO_32' integer sliders with the appropriate scaling factors, 0.5 and 0.03125 respectvely.

     

    *In the screenshot they're not actually integer sliders,but that's easy to fix now (after all that's what this threadwasoriginally about)

    specificvalues.jpg
    800 x 1153 - 152K
    scalingfactor.jpg
    550 x 339 - 29K
    Post edited by 3dcheapskate on
  • 3dcheapskate3dcheapskate Posts: 2,096
    edited July 18

    Obviously I don't read my own threads, even the ones I'm posting to !

    ERC Freeze (as mentioned by Richard earlier in this thread ) is probably the answer.
    *Create two new integer sliders and use ERC Freeze to slave the Horizontal/VerticalOffset proxies to them with the required scaling factors. Luckily that's what most of this thread was about.

    I would have preceded that sentence with "Simply", but if I say that it never is... wink

    Post edited by 3dcheapskate on
  • 3dcheapskate3dcheapskate Posts: 2,096
    edited July 18

    Okay, I've got it working !
    The following is just a reminder to myself which I'll tidy up as I repeat the process - I have to do this for 14 separate props.Not today.

    I'm using DS4.8

    Load my 2Mat_for_DS version of the PP2

    CREATE THE MATERIAL PROXIES
    Run 'post_load_material_proxy_create.dsa' (after editing the material / properties in the script)
    Apply one of the 64-book mapping textures to Covers > Diffuse

    CREATE A NEW INT SLIDER
    Parameters pane, right click anywhere below the list of parameters to get a pop-up, and tick 'Edit Mode'
    Right click again anywhere below the list of parameters to get a pop-up, clickthe last option 'Create New Parameter'
    On the new pop-up set 'Property Type' to 'Int',and ONLY change TWO things:
    - set Name to TEXTURE_ROW_0_TO_31 (label is set the same when you hit enter)
    - set 'Min'(near the bottom) to '0'. Forget about Maxfornow - we do that later because of problems here (can't type a value, using the slider caused problems with Raw). So default/value/min=0 and max/sensitivity=1

    - Edit2: To put the slider in a new (i.e. doesn't yet exist) group just type the group name, e.g.'Texture' or 'Texture/Book' into 'Path'
    Right click again anywhere below the list of parameters to get a pop-up, and UNtick 'Edit mode'.

    SET UP THE SLAVING
    Parameters pane, set General > TEXTURE_ROW_0_TO_31 to 1
    Parameters pane, set Surfaces > Covers-64BookMapping > Tiling > Vertical Offset to -0.03125
    (that should set up the slaving so incrementing the former causesthe latter to decrease by 0.03125

    From Menu,Windows >Panes/Tabs >Property Hierarchy
    Select TEXTURE_ROW_0_TO_31,Right click it and selct ERC Freeze.
    With luck 'Covers-64Bookmapping Vertical Offset Proxy (Vertical Offset)' will be in the list,with Raw value -0.03125 and default value 0 . Other parameters may also appear.Make sure that ONLY this oneis ticked,thenclick Accept

    Go backto the parameter tab andcheck values of 'General > TEXTURE_ROW_0_TO_31' (should be 1) and 'Surfaces > Covers-64BookMapping > Tiling > Vertical Offset'(should be -0.3125)
    Set 'General > TEXTURE_ROW_0_TO_31' to zero and check that 'Surfaces > Covers-64BookMapping > Tiling > Vertical Offset' has also changed to zero.

    FINALIZE THE SETTINGS
    On 'General > TEXTURE_ROW_0_TO_31' click the cog top-right, and Parameter Settings. Tick 'Use Limits' and then set 'Max' to 31.

    REPEAT FOR THE TEXTURE_COL_0_OR_1

    Edit3: Since I don't actually want the 'Surfaces > whatever > Horizonatl/Vertical Offset appearing onthe Parameterstab, select them, rgt-click > Hidden >Hide Selected Properties (How do I later UNhide them ? Rgt-click > Hidden >Unhide Selected Properties doesn't work because I can't SELECT hidden properties )

     

    Edit1: Running 'post_load_material_proxy_create.dsa' actually adds a post-load script but it doesn't show from Edit >Object >Element Data. So when I also added the post-load script manually it resulted in two calls to the script.
    N.B. Need to set up a post-load script (post_load_material_proxy_link_properties.dsa as per link in macleans post) to reestablish the proxies before saving
    From the menu, Edit >Object >Element Data
    - File Path = /data/Vendor Name/Test/Post_Load_Material_Proxy_Link_Properties.dsa
    - Name = whatever (Post Load Material Proxy Link Properties)

     


    File >Save As > Support Asset >Figure/Prop Asset and accept defaults (make sure vendor name and product are correctasthese are used as subfolders of 'Data')

     

    Close DS4.8

    Restart DS4.8, load newly created prop, and test

     

    Edit4: Trying to understand the setup of the post-load script I created one prop using the default 'post_load_material_proxy_create.dsa' (after editing the material / properties in the script); a second prop using that script but with the call to 'setLinkPropertiesPostLoad()' commented out;and a third as per the second but manually setting up the post-load script. The attached image shows the difference, and the extract below shows exactly the full lines:


                    "extra" : [
                        {
                            "type" : "item_post_load_file",
                            "name" : "Postload",
                            "file" : "/data/3DCheapskate/Books/Post_Load_Material_Proxy_Link_Properties.dsa"
                        }
                    ]


                    "extra" : [
                        {
                            "type" : "item_post_load_script",
                            "name" : "3DCheapskate__Books__Covers-64BookMapping__LinkPropertiesPostLoad",
                            "script" : "data/3DCheapskate/Books/Post_Load_Material_Proxy_Link_Properties.dsa",
                            "settings" : {
                                "vendor" : "3DCheapskate",
                                "product" : "Books",
                                "target" : "Covers-64BookMapping",
                                "properties" : {
                                    "type" : "settings",
                                    "value" : {
                                        "Horizontal Offset" : true,
                                        "Vertical Offset" : true
                                    }
                                }
                            }
                        }
                    ]

    post-loads.jpg
    1690 x 665 - 174K
    Post edited by 3dcheapskate on
  • 3dcheapskate3dcheapskate Posts: 2,096
    edited July 18

    While I'm letting my subconcious deal with that last post (and making edits when it tells me too) another thought struck me - I want to do iRay materials for this as well as the 3Delight ones. (By the way, are shaders derived from the iRay Uber shader redistributable ? Ref: Any Redistributable 3Delight/iRay Shaders Letting User Set UV Offsets For A Texture Image ?  )

    So the proxies (i.e. the Horizontal/Vertical Offset sliders on the Parameters tab) will be set up when the prop, with 3Delight materials, is loaded.

    But what will happen to the proxies and the linking when I apply an iRay material ?

    Just wondering at present...

    ...Edit: I just had a quick play. In the Iray Uber Base shader the offsets are under <surfaceName>/Geometry/Tiling, whereas DS Default has them under <surfaceName>/Tiling. So applying the Iray Uber Base shader breaks the links...

    Post edited by 3dcheapskate on
  • 3dcheapskate3dcheapskate Posts: 2,096
    edited July 19

    I then started wondering about editing the Iray Uber Base to move the offsets from <surfaceName>/Geometry/Tiling to <surfaceName>/Tiling.
    Simple - edit the DUF.

    But looking at the DUF, there's almost nothing in it...

    {
        "file_version" : "0.6.0.0",
        "asset_info" : {
            "id" : "/To%20Test%20Delete/DefaultD.duf",
            "type" : "preset_shader",
            "contributor" : {
                "author" : "RedHoodoo",
                "email" : "",
                "website" : ""
            },
            "revision" : "1.0",
            "modified" : "2014-07-18T03:45:16Z"
        },
        "material_library" : [
            {
                "id" : "Default",
                "extra" : [
                    {
                        "type" : "studio/material/uber_iray"
                    }
                ]
            }
        ],
        "scene" : {
            "materials" : [
                {
                    "url" : "#Default",
                    "extra" : [
                        {
                            "type" : "studio/material/uber_iray"
                        }
                    ]
                }
            ]
        }
    }

    (hopefully it's okay posting that here ? If not can somebody let me know and I'll remove it)

     

    Edit: So, Question: is there an easy way to move the offsets from <surfaceName>/Geometry/Tiling to <surfaceName>/Tiling ?

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