Forum Groups
  All forums
    Help & Feedback
      Work in progress
      Finished Art
      Non-Max related

Featured Threads
  Indespensible MaxScripts, Plugins and 3rd Party Tools
(18 replies)
(500 replies)
  The allmighty FREE Resources Thread !
(17 replies)
  The Life of a Sea Turtle - Tutorial by mrgrotey
(146 replies)
  So what are you working on? =)
(4998 replies)
  Maxforums member photo gallery index
(114 replies)
  Maxforums Member Tutorials
(89 replies)
  spam alert!!!
(4608 replies)
  three cheers to maxforums...
(220 replies)
  101 Things you didnt know in Max...
(197 replies)
  A Face tutorial from MDB101 :D
(95 replies) Members Gallery
(516 replies)
(634 replies)
  Dub's Maxscript Tutorial Index
(119 replies)

Maxunderground news unavailable

First page  Go to the previous page   [01]  [02]  [03]  [04]  [05]  [06]  [07]  [08]  Go to the next page  Last page
Dub's Maxscript Tutorial Index
show user profile  Dub.
Try keeping a bitarray that records if a set of dupes have already been recorded. You can then just check the bitarray before recording any future occurances.

Look up bitarrays in the maxscript manual if you are not sure what they are.

They are basically similar to arrays except each index holds a single bit toggled either true or false.

Sorry I don't have max right here so I won't post any code in case it has bugs.

read 3528 times
9/17/2009 4:43:26 AM (last edit: 9/17/2009 4:44:14 AM)
show user profile  Garp
Sorry for the sloppy counting :/

This one should be fine:

TheName = "TheBox"
c = 0
sC = selection.count

for i = 1 to sC - 1 do
sN = selection[i].name
for j = i + 1 to sC do if selection[j].name == sN do
selection[j].name = uniquename TheName
c += 1

if c != 0 do messageBox ((c as string) + " objects renamed.")

Look for uniquename in the reference. It's pretty useful.

read 3511 times
9/17/2009 6:23:59 AM (last edit: 9/17/2009 6:26:23 AM)
show user profile  wazzee
Works like a charm garp. Thanks a million.

I have finished what i wanted to do. Here's the script with due credits to garp.

-- Script Name: Duplicate Name Finder

-- Author: Aditya Karanjkar, Navaneeth Ramamurthy and Patrice Garret.

-- Creation Date: 17/09/2009

-- Last update Date: 18/09/2009

-- Description: - Checks all geometry in scene for duplicate object names
- Auto renames such objects appropriately.
- Also checks for spaces in the names and replaces them with underscores.

--Renames the objects with a prefix "Rename"
Rename = "Rename"

c = 0

--Count of the total selection collected in a array
selectioncount = selection.count

For i = 1 to selectioncount - 1 do
sN= selection[i].name
for j = i + 1 to selectioncount do
if selection[j].name == sN do
selection[j].name = uniquename Rename
c += 1


If c != 0 do messageBox ((c as string) + " objects renamed.")

--Check for spaces in object names and replace them with underscores.

renobj=0 --no of renamed objects
sprep=0 --no of spaces replaced by underscores
For i = 1 to selectioncount do
renflag=0 --rename flag
sN =selection[i].name
for j = 1 to sN.count do (

if sN[j] == " "
sN[j] = "_"
renflag=1 --this object was renamed. set flag to 1
sprep+=1 --a space was replaced by underscore


if renflag==1
do renobj+=1 --this object was renamed. increment renobj

messageBox((renobj as string)+" objects renamed.")
messageBox((sprep as string)+" spaces were replaced by underscores.")

-- end of script

read 3397 times
9/25/2009 2:31:47 AM (last edit: 9/25/2009 6:24:13 PM)
show user profile  Dub.
nice scripting!

Glad you've found the tut's handy. Maxscript is pretty easy to learn once you get started. It was the difficulty of getting started that I wanted to help people with.

read 3391 times
9/25/2009 3:33:18 AM (last edit: 9/25/2009 3:33:18 AM)
show user profile  wazzee
thanks to you too.
Amazing how a thread created in 2006 never fails to surprise with active participation.
will keep in touch.

read 3375 times
9/25/2009 6:17:34 PM (last edit: 9/25/2009 6:17:34 PM)
show user profile  urgaffel
I posted some scripts I wrote here:

And the scripting tutorials helped me get in to scripting! Thank you Dubbie :)

read 3364 times
9/25/2009 7:01:36 PM (last edit: 9/25/2009 7:01:36 PM)
show user profile  wazzee
Nice little tools for every user. Thanks for sharing urgaffel.(can i call you Peter instead?! :P)
I'll try to visit often.:)
read 3280 times
10/1/2009 5:47:57 AM (last edit: 10/1/2009 5:47:57 AM)
show user profile  wazzee
I'm back!
Coming straight to the point, I recently got a spec sheet which required me to model a building.
Low poly and should use three texture pages.
Sounds good. But there was this one catchy line that read --
" 5ft x 5ft should use 512 pixels " !
I am guessing thats the pixel ratio of some sort, yeah?
I mean, of what i understand, 5ftx5ft should have ~512x512 pixels.
Is there any way i can check for the ratio on an object with the user specified inputs and highlight/select the faces which does not fall in the ratio for the user?
I know the pixel ratio is of atmost importance considering the importance given to textures as the model is of low poly.

I have noticed some textured models displayed here as well, where the ratio is off the charts.
This might help everyone.

Please do guide if there is already a script doing this.
Looking forward to your help guys.
read 3183 times
10/7/2009 6:08:55 AM (last edit: 10/7/2009 6:11:16 AM)
show user profile  wazzee
Can anyone throw light on the above post? Please do oblige.
read 3121 times
10/11/2009 8:28:07 AM (last edit: 10/11/2009 8:28:07 AM)
show user profile  urgaffel
Check out

read 3108 times
10/11/2009 9:46:12 AM (last edit: 10/11/2009 9:46:12 AM)
show user profile  mrgrotey
There is an option in the material editor (in each slot i.e. diffuse) called 'real world scale' which lets you give the texture sheet a real world size when applied to a model that has been modelled to scale. so stick the texture sheet in teg diffuse slot, check the box and say its 5ftx5ft

read 3107 times
10/11/2009 9:50:04 AM (last edit: 10/11/2009 9:50:53 AM)
show user profile  wazzee
Thanks urgaffel! The tools are quite amazing.Just the thing i was looking for.

mrgrotey, Could you throw more light on the subject and explain how 3dsmax works and calculates to a layman in a general term? i apologize for my lack of know how on this matter. But keeping in mind i was planning to write a script to do this for me.

Thanks so much for the quick reply.
read 3095 times
10/11/2009 3:12:10 PM (last edit: 10/12/2009 1:33:40 AM)
show user profile  parkerfamily
i don't suppose the genius dub could do a 6th tutorial on how to add, edit and remove modifiers in maxscript? i've figured out a bit more in maxscript and even the visual maxscript editor after doing your 5 tuts, but cannot for the life of me find the commands to add modifiers and then edit them. i could really use help with this.

edit: AHA! i finally found the page in maxscript help that's exactly what i needed. many others could benefit from a tutorial still, but go to maxscript help>learning maxscript>manipulating the box - first steps in maxscript>more box transformations
read 2928 times
10/21/2009 8:09:55 PM (last edit: 10/21/2009 8:38:50 PM)
show user profile  Dub.
Now you've got the idea Parker. :) the maxscript manual is your friend. I write pages of maxscript each month but still refer to the maxscript manual all the time.

I was thinking of doing a tut on how to understand the maxscript manual. To new people, it can be confusing sometimes. I know I didn't have a clue what it meant sometimes when I was starting.

read 2910 times
10/22/2009 2:30:03 AM (last edit: 10/22/2009 2:30:44 AM)
show user profile  vishesh
Big thanks to you DUB for writing these awesome tuts. i do learn a lot from them. keep up the good work !!!

I also started playing with MaxScript. i am stuck somewhere, i hope any one here can help me :-

My scene has 20 spheres. they are hidden. all i want is to unhide one sphere and then render and it should be saved too...... this should go on for all 20 spheres.

this is the script what i wrote --->

myColl = $Sphere* -- putting all spheres in my collection
myArray = myColl as array -- converting collection to array

For i = 1 to myArray.count do
Unhide myArray[i] -- unhide sphere
Render frame:i outputfile:("E:\Practice\MaxScript\Sphere.jpg")


The problems i am facing are :-

1. It is opening 20 VFB's. why it can't just open one VFB and then keep rendering the furthur images in the same VFB.

2. it is not saving files as sphere001.jpg..... sphere002.jpg......... sphere003.jpg.
it is just saving only one image as sphere.jpg

any help is appreciated to solve these probelms.

Cheers !!!

"Passion is the flame that burns forever."
read 2633 times
11/9/2009 8:08:52 AM (last edit: 11/9/2009 8:08:52 AM)
First page  Go to the previous page   [01]  [02]  [03]  [04]  [05]  [06]  [07]  [08]  Go to the next page  Last page
#Maxforums IRC
Open chat window