Main Menu

Recent posts

#1
Materials / Re: Scripting_Create a batch M...
Last post by DT - March 07, 2023, 08:51:04 AM
Yes, this is possible.  I only know enough about Python to be dangerous.  Using the following functions may provide you with what you want.


https://media.keyshot.com/scripting/headless_doc/11.0/index.html

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. *

#2
General discussion / Re: Automatic template not add...
Last post by DT - February 13, 2023, 05:49:05 PM
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.
#3
Textures / Re: UV Unwrap Keyshot v9.3.14
Last post by DT - February 13, 2023, 10:42:23 AM
Hi Mads,

Sometimes CAD needs to be built with the UVs in mind.  I wish there was an easy solution because most CAD is built differently and you may not have built it nor have the ability to adjust the CAD. 

In the screenshot note the surface that was built with an extrude appears best.
#4
Support Archive / Re: re-importing large files a...
Last post by Erik Williams - November 30, 2022, 12:33:19 AM
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 support@luxion.com.
Address this to Erik Williams. I'll take a look as soon as possible to see if we can ID the issue.

#5
General discussion / Discuss KeyShot on KeyShot Lum...
Last post by KeyShot Mod - October 27, 2022, 12:42:21 PM
This board has moved! The new KeyShot Luminaries community is now live where you can discuss KeyShot, share your visuals and much, much more! Login with your KeyShot Cloud Account or join today!

Login or Join
#6
Amazing Shots / Share your Amazing Shots on Ke...
Last post by KeyShot Mod - October 27, 2022, 12:37:37 PM
The 'Amazing Shots' board has moved! The new KeyShot Luminaries community is now live where you can share your KeyShot visuals and much, much more! Login with your KeyShot Cloud Account or join today!

Login or Join

Visit Amazing Shots on the KeyShot Luminaries community
#7
Amazing Shots / Re: GTR Nismo
Last post by wipdesigns - October 27, 2022, 05:55:34 AM
Great job on shading the paint and the rear lights are amazing!

Where did you acquire the model, looks great!
#8
Materials / Re: Realistic skin material
Last post by luis.alcala86 - October 26, 2022, 07:31:05 PM
Will,

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.
#9
General discussion / Re: Failed to update the queue...
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 ;).
#10
Materials / Scripting_Create a batch Mater...
Last post by twinch - October 26, 2022, 11:21:24 AM
Hello everyone

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.

Is this even possible?

Thanks