Tagged 'General Scripting'

Rotation control

Hi.
I want to control the Speed of a rotating object like helicopter blades.
I know the right way is animate that but is there anyway to control the Speed of rotation with a parameter?.
I tried the multiplier curve and also the rotation expression like ( parameter*S or NT or F) both method lead to a problem. The rotation reverse when I set the parameter to zero .
Because both of them control the value of rotation not the timing of rotation.
How control the timing of animation?
Thanks
For more information please watch this video
https://youtu.be/u2I5gVwYSig?si=kUfl1YQd-GqMVpMY

Implement mesh in maxscript where every face has its own color

I would like to implement a mesh in maxsript where every face has its own color value, absolutely not related to any vertex colors. If I select a face the coresponding color value should be shown and it should be posible to edit it. If faces are deleted or added the coresponding color values should be also deleted or added.
First I was thinking of a scripted plugin which extends editable mesh, but as far I read extending editable mesh doesnt really work.

Gradient ramp map blur and blur_offset value set

Hello,

I am trying to all scene gradient ramp map blur value = 1 and blur_offset value = 0
but getting error
can anyone correct the script

THANKS

(
fn gradientBlur class:Gradient_Ramp =
(
	if selection.count != 0 do
	(
	node = getClassInstances class
	if node.count > 0 do
		for map in node do
			map.coords.blur = 1.0
	)
	(
	node = getClassInstances class
	if node.count > 0 do
		for map in node do
			map.coords.Blur_Offset = 0
	)
)
gradientBlur()
)

Grab Viewport in 8K

There was a script that allowed taking screenshots at a resolution higher than the screen resolution, but it is no longer available, and the download link is not working anymore.

Would it be possible to recreate this script for Max 2024 and later versions?

Lets keep it simple - no UI, simply 8K resolution (7680×4320px), not including viewport menus, statistics, or other overlays.

Thank you very much!

TV screen object

Hello.
I need a script that would create a new object, the screen based on the size of the diagonal and the thickness of the frame and depth of the object, the ratio of 16x9 or 16:10. or 4:3.
For example, I enter a diagonal of 55" and a frame of 1cm and a depth of 4cm.
And the script creates a rectangle 1218mm x 685mm, adds 1cm thickness to it and adds 4cm volume.
How can this be done?

glTF material - change values for all selected materials or default settings

I have 877 materials in a very large file and I'm testing some software that uses glTF materials. According to the documentation, when there is no texture map in the roughness slot it's default value is 0 (mirror-like). If a texture is added it switches to a value of 1. The problem is that using the scene converter sets all the material's roughness to 0, so everything is shiny by default, which is stupid. Is there a way to switch that value to 1 for all selected materials at the same time? Or is there a way to change the default to 1 when converting to glTF instead of 0?

Distributing group instancies

Hello. I'm making a script which should distribute a group of objects by the polygons of another object. But I'm getting an issue. All the objects in the group are placed at the same point, while I would like them to behave like a single object.

Is there a way to fix it somehow? 

   -- Event handler for the "Distribute" button click
    on distributeButton pressed do
    (
        local targetObject = getNodeByName(addPlaceOnObjectButton.text)
        if targetObject != undefined do
        (

Add functions to the script SimonScripts-VrayColorCorrect_V1

Hi, I try to add functions to this script (https://www.scriptspot.com/3ds-max/scripts/vraymtl-color-correction), but it doesn't work, help pls
....
local createColorCorrection = on
local matDiffArr = #()
local matTransArr = #()
local matBumpArr = #()
local matglossArr = #()
local matIllumArr = #()
local matOpacArr = #()
local trans = TranslcencyCheckbox.checked
local diff = DiffuseCheckbox.checked
local bump = BumpCheckbox.checked
local gloss = GlossinessCheckbox.checked
local selfillum = SelfIllumChekbox.checked

Floating Smoothing Group Menu For Mesh Objects

Hello,

Is it even possible to have a floating smoothing group menu that works for Editable Mesh Objects? I know poly is generally the king of smoothing, but I was hoping someone had discovered a way to get a nice floating Smoothing groups menu that works on Editable Mesh Objects.

rotation based on position change

Hi everybody,

I need help developing a rotation script driven by an object translation.
it's similar to the degtorad expressions "degToRad(360*(Ypos/(2*pi*Radius)))" but what I need is a "rotation script" to convert the vector calculated from the object translation into rotation and I'm very bad dealing with rotations in Maxscript.

Thanks in advance
Hani Tiby

Syndicate content