importMaterials(...) Imports materials from MTL file into material library. Note: It is required that resource libraries are loaded once per session - the operation blocks while loading. file = MTL File path to import materials from. * folder = The existing sub material library folder to add the materials to, i.e. 'Glass/Basic' (default = '.', which is the root materials folder).
getLibraryTextures(...) Gets all textures of the library. Note: It is required that resource libraries are loaded once per session - the operation blocks while loading. filter = Filter by relative path in library, e.g. 'Textures/Wood'.
find(...) Find nodes in the subtree of this node by searching part names and material names. If no names or materials are given then it will find everything. name = Part name to search for (string/tuple/list). mat = Material name to search for (string/tuple/list). all = Match all part names or all material names (default = false). types = Filter results to match types (int/tuple/list) which can be the following the values: lux.NODE_TYPE_GROUP, lux.NODE_TYPE_OBJECT, lux.NODE_TYPE_ANIMATION, lux.NODE_TYPE_MODEL_SET, and lux.NODE_TYPE_MODEL default = all types). depth = The amount of levels to go down the tree. A value of 1 means to only match the direct children of this node etc. (default = -1 = all)
setObjectMaterial(...) Applies a material to an object in the scene. mat = Material name to apply. * obj = Object ID to apply to. *
setMaterial(...) Set material of a node. If applying to a group then it will apply to all sub nodes. mat = The name of the material or multi-material to apply. It can also be an instance of lux.MultiMaterial.
setValue(...) Set concrete value of shader parameter. Cannot be called on pure parameters. value = The supported input types depend on the shader parameter type. *
applyMaterialMapping(...) Applies a material mapping. dict = Dictionary of object IDs to material names. *
Creating templates does take time but ultimately worth it. I recently had a similar Assembly with 100s of parts and it took me about an hour to make both the Part and Material templates for the assembly.
An easy/fast way to manually create a template start with dragging the Parent Assembly from the model set over to the template window and mouse release over "Default" and it should automatically add the parts or materials. Also if you know the material names then start typing them and KS will auto-fill the name.
Is KeyShot already open when you run into this issue and does this happen when pressing 'Render' with the plugin as well? There are a few things I can check. First I would need a copy of your dxdiag file. Also if you could open your Event Viewer and send us all entries from around the time the system locks up, especially anything associated with KeyShot.
How to create a DxDiag log
Press the Windows Key + R Enter "DxDiag" and run the command Press 'Save all information' and save the file in an easy to find location
In Event Viewer, go to Custom Views -> Administrative Events and look for all Errors around the time KeyShot locks up. Copy the entries and send them as text files to firstname.lastname@example.org. Address this to Erik Williams. I'll take a look as soon as possible to see if we can ID the issue.
Well you are the master of disaster jajaja. I agree with you brotha. I do like the medium translucent a bit more. The body, i believe, will be ok as I will be simulating garments from CLO on it. Love the help I have received here. I will push forward and see what else I can achieve in Keyshot. Thank you again for the assistance.
Last post by fizion - October 26, 2022, 01:30:15 PM
I wonder if it has to do with Keyshot or with Windows. I've also all kinds of weird things with network shares with Windows 11. Not sure what you are using but for example, if I pin a network location to quick access I can access it from the explorer but not with a right click on the explorer icon in the taskbar (will say the location doesn't exist).
But not sure what Windows you are using I just have quite some applications that have issues with network drives, Substance Painter is another one, could be a feature though .
Last post by twinch - October 26, 2022, 11:21:24 AM
I am working on a large project where I need to create a material that is derived from existing texture files. I don't have any experience with Keyshot Scripting/python so I'm kind of shooting in the dark here.
The importer would need to create a material from the cloth default material, grab a texture in a folder and place in the diffuse channel, change the UV scaling to DPI and use the dpi of the texture image and then save the file as the same name as the texture name in the same folder.