PDA

View Full Version : [Supplies] Custom Scripts and Other Stuff - Requests and Downloads


Mr. Bluesummers-3DT
16-03-2009, 04:41 AM
Hello everyone,

This thread contains some of the scripts I've written or found that will help our troops in the field during the dominance war.

=================================================
I've gone ahead and rewritten Neil Blevin's old "Wire Jumble" script into a new, more robust utility called "Wire Jumble". You'll find it's now a trivial task to get wires spread over your characters, and it's the first (hopefully of many) utility contributions from your local Supplies coordinator.

I'll keep my ear to the ground if I find any other good scripts or utilities that'll help the war effort.

Download the Wire Bundle Script here. (http://www.mrbluesummers.com/Downloads/Mar09/WireBundle_0.82.zip)
Learn how to use Wire Bundle with this week's Monday Movie. (http://www.mrbluesummers.com/?p=874)

Let me know if you find any errors, or if you think it's worth expanding this script to do other cool things (like more "orderly" bundles).
http://www.mrbluesummers.com/external/demo.jpg
=================================================

This one was called "Weld TexVert" and it added a tool to your unwrap UVW window that let you interactively weld UVW verts in the same way you'd weld them in editable poly. Kind of a nice little feature for when you're working on UVWs. You can find it in the UnwrapUVW modifier's "edit" window under "Tools>Weld Selected...". Ordinarily you'd have to try to weld the verts, and if you didn't like the threshold, you'd have to go Options>Preferences>Weld threshold every time.

You can download the 3dsMax plug-in here. (http://www.mrbluesummers.com/?p=876)

http://www.MrBluesummers.com/External/Mar09/WeldTexVert_Demo.jpg

=================================================


Cheers,
--Mr. B

Sathe
16-03-2009, 05:02 AM
Thank you, i use the old one all the time, Hopeful your Rework fixes some of the problems i have encountered in the past :)

drGrim
16-03-2009, 05:13 AM
i cant view the video. it says 'This is a private video..'. not sure if its just me tho. i'll try again later.. or just google it

DJdude
16-03-2009, 05:14 AM
What is it? I can't watch the video. It says that it's a private video.

Mr. Bluesummers-3DT
16-03-2009, 05:44 AM
Video repaired! Sorry about that; I keep the Monday Movies private until I get all the details worked out. Guess I forgot to send this one public!

Skulburn
16-03-2009, 09:41 AM
So, if ive figured this out correctly... This creates wires, as in electric/power cables. Or when you say wires, are you refering to something else? If its the first (cables) then i love you :D

ASTUS
16-03-2009, 12:07 PM
Anything for maya?

kravo
16-03-2009, 12:17 PM
Anything for maya?

check out highend3d.com, there are many usefull scripts.
This one could be particularly usefull:
http://www.highend3d.com/maya/downloads/mel_scripts/modeling/curve_tools/FB-Wire-Jumbler-4639.html
shouldn´t we create a sub-thread for maya users? :smug:

Perversonality
16-03-2009, 12:19 PM
Nice one :) Doubt I will use it myself, but you never know

Mr. Bluesummers-3DT
16-03-2009, 03:32 PM
So, if ive figured this out correctly... This creates wires, as in electric/power cables. Or when you say wires, are you refering to something else? If its the first (cables) then i love you :D

It's the first one- it creates randomized cables via a spline or objects to follow. I love you too. :haha:

MonteCristo
16-03-2009, 04:00 PM
Just watched the movies. Very clear and well-presented. You are good at these Mr GBS. :)

BTW, guys, you should enable thread thumbs for the DW4 threads.

dhin
16-03-2009, 04:08 PM
Yes I was wondering why they weren't showing up. I thought it might have been done as a bandwidth saver or something, but I still want it.

also cool stuff, I may have to play with it.

Sathe
16-03-2009, 04:28 PM
Maybe the lack of thumbs is to keep it clean and organised...i don't mind it this way

Mr. Bluesummers-3DT
17-03-2009, 04:08 AM
As a matter of fact, there are a number of scripts I wrote back when I was vying for a position as a technical artist/internal tools lackey. I bet they'd really help the war effort!

This one was called "Weld TexVert" and it added a tool to your unwrap UVW window that let you interactively weld UVW verts in the same way you'd weld them in editable poly. Kind of a nice little feature for when you're working on UVWs. Ordinarily you'd have to try to weld the verts, and if you didn't like the threshold, you'd have to go Options>Preferences>Weld threshold every time.

You can download the 3dsMax plug-in here. (http://www.mrbluesummers.com/?p=876)
http://www.MrBluesummers.com/External/Mar09/WeldTexVert_Demo.jpg

Mr. Bluesummers-3DT
18-03-2009, 07:24 PM
Hmm; no love for weld tex vert? I'll see if I can brush off the dust from some of these other scripts (and finish others). I've got:
1. "Chew Edges" - A script that "muddies up" the edges of turbosmoothed objects.
2. "Max Packer" - A script that sizes UVW clusters based on occlusion and area.
3. "Ultibolt" - Procedural nut, bolt, and nail creator.

Any ideas you guys have for scripts you need, let me know!

grindill
18-03-2009, 08:26 PM
Hey. BlueSummers, these are a great help. I just wanted to let you know that your work is definietly appreciated. And not just for the war. I used the Ultibolt for a project I had to do a while ago and it worked great. Only later did the client then want threads modeled onto the bolts. :wall: So, I had to write my own little script that made threaded shanks. Not nearly as elegant or versatile as yours, but it got the job done. Basically it created a plane, skewed it, bent it into a tube, extruded the edge loops into threads and then sliced off the overskewed top and bottom. It wasn't interactive at all so you needed to know exactly what you needed before you punched in the numbers, but it got the job done. Just wanted to thank you for the idea that got it started.

DJdude
18-03-2009, 08:48 PM
ya. I got that bolt script a while ago and I use it all the time.

Novian
18-03-2009, 09:09 PM
Nice, the Max Packer - scales based on area thats the one I want! :)

Cheers~

Mr. Bluesummers-3DT
18-03-2009, 09:23 PM
I'm glad you guys enjoyed that one; maybe I'll get it up here as well. I meant to make Ultibolt support threads (and interactive), but the polycount was so high for that feature that it really would've wrecked the viewport. :haha:

Mr. Bluesummers-3DT
18-03-2009, 09:31 PM
Briefly, regarding MaxPacker, that code is...wow. I just opened it and it's a very orderly presentation of...just the worst kind of code. Lots of checks if windows are open- that kind of thing. I'll hopefully have this thing repackaged by the end of the weekend, but it's going to be my top priority.

Astaroth
21-03-2009, 01:57 PM
Really great script BlueSummers
i'd have a request if it's possible, and if you have time, is it possible to add a button in the editable poly that divide the selected edge, just like the one in the editable spline?

Mr. Bluesummers-3DT
21-03-2009, 03:50 PM
Hrm...Yes and No. That script is definitely possible, but adding it directly to the editable poly window is much harder. Would you be satisfied with a Macroscript (toolbar item, menubar item, quad menu item, or keyboard shortcut)?

Mr. Bluesummers-3DT
21-03-2009, 05:34 PM
OK! Bad news/good news time!

The bad news is, the insert vertex function in the PolyOp construct inserts only one vertex at a time, and that disrupts the edge selection every time. This means it's a tremendous pain to insert more than one vertex into an edge at any time. I'm really really sorry, but this would take all day.

On the bright side, I can think of a really easy work around:
1. Select the target edge (or ring of edges)
2. Use the "Connect" tool and use those settings to alter position/frequency of verts.
3. Use the "Remove" tool to remove the resultant edges.

You'll be left with the verts you wanted (See Image Below).

Mr. Bluesummers-3DT
21-03-2009, 05:48 PM
Is that going to be enough, Astaroth?

Astaroth
21-03-2009, 06:16 PM
thanks for the reply BlueSummer, the "connect way" is the one i usually use, and it works fine, i asked for that script only because when you are turning all the mesh to quad, having a button that do it in an instant is really good, expecially when you need an L workaround
but as you have said, it would be a great pain to script it, so it doesn't matter
thank you so much ^^

Mr. Bluesummers-3DT
21-03-2009, 08:46 PM
You're very welcome!

For those who were asking about my old MaxPacker, I've come to the conclusion that it's not all that useful. Here's how it worked; see if you can figure out what the trouble is before you read the next paragraph:

For each UVW Cluster
Get Ranking (usually from least occluded to most occluded)

Size the UVW clusters accordingly

Use 3dsMax Pack UVWs to pack the clusters together again (normalizing them).


Do you see the problem? The issue is that when the sizes are normalized and packed, there's no consideration taken for maximum usage of UVW space. If one cluster is super important (and therefore large), the final solution might be less UVW space efficient than a less theoretically correct, but more efficient texture sheet.

This image shows you what I mean. The left side is the undisturbed procedural unwrapping of a teapot. The right side shows 3 clusters scaled up because they're "more important". The left, more normalized UVW layout has ~21,900 unused pixels. The right, more disturbed UVW layout has ~25,000.

I believe this logic holds true in general- a more granular, homogeneous UVW clustering leads to a more efficient use of texture space. MaxPacker doesn't take this into account and it leads to a less efficient solution. UVW packing should be done by hand because then you can blend the importance and visibility of a cluster with efficient use of UVW texture space.

Sadness. :xx:

Pickman
24-03-2009, 05:31 AM
So you're saying there's no magic button to solve all my UVW packing woes?:cry: Darn, just once I wish there was a magic button. Is it too much too ask? Oh well, thanks for at least trying.
Guess we'll just have to watch your awesome "Monday Movie" series, and be glad we have that. ;)

toxicspit
24-03-2009, 10:24 PM
doing things by hand.. thats why humans are cool!!! otherwise robots would do everything. I always tweak my automatic unwraps by hand, because there are always pieces that end up being too big for the importance they occupy on screen. I hate seeing ambient/occlusion maps that are only done automatically.. you lose around 50% texture space if you don't tweak it manually and shrink the things that are really far away or barely seen. Don't be lazy... there's no free lunch.

BiG ToE-3DT
24-03-2009, 11:11 PM
will wire bundle work in Max 9? It loads up, no problem, but, I select the object I want the wires to "bundle" around, then hit create, nothing happens.

back to the 5 liter challenge for me.

edit: think I may have figured it out while watching you video. I selected an object, a single object, instead of a few objects. Lack of fluids will do that to a person.

Mr. Bluesummers-3DT
24-03-2009, 11:13 PM
Well...I guess I'm not saying that it's impossible to get elegant, procedural UVW unwrapping. IMHO there are two flavors of automatic unwrapping;

1. "Ideal Procedural" like you see out of Zbrush. This is where the whole object is boiled down into 32x32 little undistorted squares. The layout isn't human readable and you can't edit it outside of a 3d-painting program, but in all other ways it's perfect. Full UVW space utilization and minimized distortion. Area is taken into consideration when sizing clusters.

2. "Practical Procedural" like you see out of very high-end UVW layout programs or by hand. We can pack it intelligently, but the slicing and sizing are usually done by hand.

Mr. Bluesummers-3DT
24-03-2009, 11:14 PM
Wire Bundle for Max 9? I think I remember using some APIs that aren't...legacy friendly.

Did you try using the "follow a spline" functionality?

BiG ToE-3DT
24-03-2009, 11:28 PM
yeah, just made me a spilne and tried it that way. Hit create, and got some foul script lanuage tossed at me. But it's cool. This spline does some cool toss mixed with the bend modi.

Mr. Bluesummers-3DT
25-03-2009, 05:54 PM
Toe; can you post a screenshot of the error? I bet it'll help tremendously! :)

Pickman
25-03-2009, 10:07 PM
Sweet I got a script idea.
Is it possible to enable edge cloning (shift drag) with local transforms? That is to say say it maintains the normal of the parent edge during the clone. Now if you try it, the transform goes all screwy. I assume because it then tries to change to the coordinates of the new edge, as opposed to keeping the coordinate plane of the old one. I use these features, both local transforms and edge cloning quite a bit, so it would be nice if they would work together.

Rock on Mr.Bluesummers. :)

Mr. Bluesummers-3DT
26-03-2009, 12:16 AM
Is it possible to enable edge cloning (shift drag) with local transforms?

Very good question! I'm exploring this now, and take a look at the image I'm attaching.

This is most unusual. Let me come up with a few more test cases. Maybe we ought to file a bug-report with Autodesk...

http://www.MrBluesummers.com/external/mar09/Problem.gif

Mr. Bluesummers-3DT
26-03-2009, 12:24 AM
Good God! This tool is worse than I thought.
Yah, we'll want to file a bug report for this. It's clearly broken and very reproducible.

Mr. Bluesummers-3DT
26-03-2009, 12:55 AM
Posted a bug on the area forums. You can check it out here:
http://area.autodesk.com/index.php/forums/viewthread/24622/

BiG ToE-3DT
26-03-2009, 01:42 AM
ok, screengrabbed:
http://i55.photobucket.com/albums/g129/DJBiGToE/error.jpg
also, saved out the text incase you want to see it.

Pickman
26-03-2009, 01:54 AM
Guess we'll have to wait for 2010 for that one. Sure will be sweet when it works. Can think of all sorts of uses for it.
It actually worked the first time for you? Wow, lucky shift drag there. I've had it completely reverse the normal on me before.

Xzifer
26-03-2009, 02:16 AM
Hey guys

I'm loving that Wire bundle plugin do you know if there is anything like that for Cinema 4D at all ?

Cheers Xzifer

Mr. Bluesummers-3DT
26-03-2009, 03:41 AM
Rockin Toe; what's the error text say?

Also, is your spline an open spline object with only a single line?

Mr. Bluesummers-3DT
26-03-2009, 03:42 AM
Hey guys

I'm loving that Wire bundle plugin do you know if there is anything like that for Cinema 4D at all ?

Cheers Xzifer

Tragically, not that I know of. However, if someone around here knows the C4D scripting language, I'd be happy to provide pseudo-code as a guide.

Mr. Bluesummers-3DT
26-03-2009, 03:43 AM
Guess we'll have to wait for 2010 for that one. Sure will be sweet when it works. Can think of all sorts of uses for it.
It actually worked the first time for you? Wow, lucky shift drag there. I've had it completely reverse the normal on me before.

Super downer, I know. But unfortunately, this is too serious and too deep for me to fix with scripting. Scripted tools are good for tackling repetitive or multi-step operations. There's only so much we can do in fixing things inherently wrong with max.

Did I at least define the problem accurately? I'll try to keep the pressure on to see this fixed.

Pickman
26-03-2009, 04:05 AM
Well thanks again for trying. Ok lets try this again.

Script idea:
Ultimate Detach-detached objects maintain the parents stack.
For example if I detach the horns from my model they still have symmetry and turbosmooth(at 2 iterations with isoline). It'll save time if i don't have to re-apply those. And if it would work with skin, physique, or both then it would be very usefull I'm sure.

BiG ToE-3DT
26-03-2009, 04:06 AM
Rockin Toe; what's the error text say?

Also, is your spline an open spline object with only a single line?

the hilighted text says

"for i = 1 to NumKnots PathSpline do"

for the spilne, it was a line with a viewport thickness added, that was all.

Mr. Bluesummers-3DT
26-03-2009, 04:23 AM
What does the error code in the little pink box in the lower left say?

poopipe
26-03-2009, 10:25 PM
dear Santa,
I would like a script that splits edges according to it's UV pelt boundaries/those blue seams you can put in manually (whatever they're called) for christmas please.

I've been good honest

love from poo

Mr. Bluesummers-3DT
27-03-2009, 05:41 AM
Juicy one, my little Poopie. Does it have to be the pelt seams, or can it be just UVW clusters? Let me look into this one and get back to you...

Mr. Bluesummers-3DT
27-03-2009, 05:44 AM
Well thanks again for trying. Ok lets try this again.

Script idea:
Ultimate Detach-detached objects maintain the parents stack.
For example if I detach the horns from my model they still have symmetry and turbosmooth(at 2 iterations with isoline). It'll save time if i don't have to re-apply those. And if it would work with skin, physique, or both then it would be very usefull I'm sure.

I'm thinking about this one too. How would this go beyond replicating the parent's modifier stack in the detatched objects? Are there special procedures that need to happen? How much time will this save?

As far as skin/physique goes, getting things to sync back up with detached objects could be pretty wicked depending on how dirty the detachment process is. This requires a little MXS researching...

poopipe
28-03-2009, 07:45 PM
for the UVs either works for me, they amount to the same thing anyway


for that detach one...
From my experience skin will probably work out fine even if you dont bake the vertex weights before reattaching - detaching won't cause any problems, Physique will almost certainly give you a lot of grief because it's rubbish, unwraps are generally fine with this sort of behaviour and any topologically independent modifier should be fine.

The thing is, while it's an interesting technical challenge it does beg the question "why bother?". almost everything you'd want it to do can be achieved manually in a couple of clicks - if the script were running off a toolbar it probably wouldn't save you anything.

no offence meant pickman - it just seems a little unnecessary

Mr. Bluesummers-3DT
28-03-2009, 09:56 PM
Ugh; the pelt seam conversion to edge selection is all kinds of broken. It appears in the viewport, but for all scripting purposes, this function is a total lie. I'll get back to you Poopipe.

poopipe
28-03-2009, 09:59 PM
that probably explains why the seams don't persist through unwrap modifiers - it could well be a dead end.

I'd go with the UV clusters then :D

Mr. Bluesummers-3DT
28-03-2009, 10:07 PM
Here're the two ways I see your proposal working, Poopster:
1. Get the edge selection from the pelt seams via

$.modifiers[#unwrap_uvw].getPeltSelectedSeams()

and then convert that into a geometry edge selection, and then use the split tool.
>> Problem: The edge seam bit array returned by this function is wrong. The edge IDs returned aren't like what the rest of the UVW modifier or object are expecting. It comes off garbled.

2. Use the built-in conversion from pelt seam to edge selection:

$.modifiers[#unwrap_uvw].unwrap5.peltSeamToEdgeSel true

and then store the UVW edge selection to a bit array that can be brought into the base PolyObject and converted into an edge selection. Then we can use the split tool.
>> Problem: This function doesn't create a real edge selection. It's the weirdest thing ever. The viewport shows an edge selection, but any other commands act on whatever edge selection was in place BEFORE you tried this command.

This is total BS. I'm starting to think this feature doesn't really work at all. :xx:

Mr. Bluesummers-3DT
28-03-2009, 10:08 PM
Yah, you're probably right. Selecting UVW cluster edges is probably a more feasible option; but this one was definitely easier if these functions worked. :xx:

Mr. Bluesummers-3DT
28-03-2009, 10:13 PM
Filed a report on the Area forums. Planning on getting ignored by Autodesk again.

Mr. Bluesummers-3DT
28-03-2009, 11:14 PM
I've written out the entire script, the only component missing is getting edges from the UVW selection window to a useful bit array. Below is the code as it stands...


-- Split by UVW cluster by Mr. Bluesummers
-- Not sea-worthy. Don't use this.

undo on
(
local NumFaces = PolyOp.getNumFaces $
local AllFaces = #{1..NumFaces}
local FacesCompleted = #{}
local Finished = false

while not Finished do
(
-- Get the next face to test
NextFace = 1

while FacesCompleted[NextFace] do
NextFace += 1

-- Get a face in an element.
$.modifiers[#unwrap_uvw].unwrap2.selectFaces #{NextFace}

-- Select the whole element, and convert to edges.
$.modifiers[#unwrap_uvw].unwrap2.selectElement()
$.modifiers[#unwrap_uvw].unwrap2.faceToEdgeSelect()

-- Get the current selection. Get a new selection ready.
CurrentSelection = $.modifiers[#unwrap_uvw].unwrap2.getSelectedEdges()
NewSelection = #{}

-- Select half the edges
for b in CurrentSelection do
if (mod b 2) == 0.0 do
NewSelection[b] = true

-- Assign the new, half-selection of edges.
$.modifiers[#unwrap_uvw].unwrap2.selectEdges NewSelection

-- Select open edges
$.modifiers[#unwrap_uvw].unwrap2.openEdgeSelect()

-- Get the current selection again, prep another new selection.
CurrentSelection = $.modifiers[#unwrap_uvw].unwrap2.getSelectedEdges()
NextNewSelection = #{}

-- Subtract the original half-selection from this current selection.
for b in CurrentSelection do
if not NewSelection[b] do
NextNewSelection[b] = true

-- Set the selection with the result, and redo the open edge selection.
$.modifiers[#unwrap_uvw].unwrap2.selectEdges NextNewSelection
$.modifiers[#unwrap_uvw].unwrap2.openEdgeSelect()

-- We now have the cluster edges.
-- Get edges with UVW-based IDs.
ClusterEdges = $.modifiers[#unwrap_uvw].unwrap2.getSelectedEdges()

-- Get the edges with GEOMETRY-based IDs. FAILS!!
-->> ClusterEdges = $.modifiers[#unwrap_uvw].unwrap5.getSelectedGeomEdges()

-- Convert this to a geometry edge selection and split.
-->> PolyOp.splitEdges $ ClusterEdges

-- Add the current cluster to the completion list.
FacesCompleted += $.modifiers[#unwrap_uvw].unwrap2.getSelectedFaces()

-- If the completion list is equal to all faces, we're done!
if FacesCompleted.numberset == AllFaces.numberset do Finished = true
)
)


I'm sorry, but without a way to convert UVW edge IDs to geometry edge IDs, there's no way to make this work. I already tried the vertex workaround, and it fails for triangles. :xx:

poopipe
29-03-2009, 12:37 AM
hmm. thats a bit of a bugger.

getting the edge selection is the time consuming part and your code does that bit so it's not a dead loss

there could be a hack here somewhere though since manually adding an edit poly on top of an unwrapUVW (with an active selection) carries the selection up the stack.

discmage
10-04-2009, 02:00 PM
Is there a way to select all edges that have different smoothing groups on either side? if not, would that be hard to script?

Astaroth
10-04-2009, 03:21 PM
there's someway to add a modifier for the editable poly(even in the quad menu) that works as a push modifier on the fly, without adding the modifier itself?
it should push the selected vertex in the direction of their normal, is it hard to do???

poopipe
10-04-2009, 03:39 PM
just use normal constraint in edit poly - its there in max 2008 or above

Astaroth
10-04-2009, 04:01 PM
i'm still using max 9 T_T
well, i think i'll wait till i update to a newer version, thanks however ^^

Mr. Bluesummers-3DT
10-04-2009, 06:10 PM
Is there a way to select all edges that have different smoothing groups on either side? if not, would that be hard to script?

Hmm...That's an interesting one. Let me see what I can do tonight, and I'll get back to you. I'd imagine something really dirty like this would work:

For each edge in this object do
Make a new selection list.
Then try to
Select the two polygons that share this edge.
If the smoothing groups don't match, add the edge to a list.

Set the object's edge selection to the selection list

Throw a party

Mr. Bluesummers-3DT
16-04-2009, 09:08 PM
Hey there, I'm sorry. I've been really busy; is this still a needed item? I think it can be done rather quickly if you still want it.

discmage
17-04-2009, 01:30 AM
It would be handy. It will make the transition from a low poly 'rough' with smoothing groups to a nice chamfered high poly much easier. As long as it selects ALL the edges of all the different smoothing group edges. That would be really cool if you could!

Mr. Bluesummers-3DT
17-04-2009, 02:20 AM
Discmage, click through to my blog and you can download the select smoothing groups boarder script (http://www.mrbluesummers.com/?p=923). It was pretty easy, and I'm surprised not a standard feature in max. It's kinda cool. :)
http://www.mrbluesummers.com/downloads/Apr09/SelectSmoothingGroupBoarders.gif

Cheers!

discmage
17-04-2009, 06:10 AM
You are a genius :) Cheers for that!

poopipe
22-04-2009, 11:12 AM
It's a bit cheeky but it's probably better to thread hijack than make a new one..

Since I needed to this earlier I figured I might as well put it up here.

This'll import all the .obj files in a folder to your scene - pretty handy if you've exported a load of separate subtools.

You have to manually enter the path to the files because I couldn't be bothered to do a gui (don't forget the double backslashes)

max 2009 makes sensible object names, max 9 doesn't. I cant remember whether 2008 does or not.

anyway - dump the following into a script file and run it


--enter your path here
files = getFiles "T:\\whereveryoukeepthings\\import\\base_obj_files\ \*.obj"

for f in files do (
--import various obj files from the path specified above
fullFilePath = getFilenamePath f + filenameFromPath f
importFile fullFilePath #noPrompt quiet:true

)

discmage
18-05-2009, 05:31 AM
Um...about that select edge script...it doesn't seem to work. I finally used it on a model I am working on (it was too close to the ed of my character for the DW) and when I run the script, nothing is selected.

Is there anything I need to have done to make it work? eg. use an editable poly or editable mesh, have the faces selected etc? Oh I'm using Max 2009 if that makes any difference too.

hulahuga
10-11-2010, 05:52 PM
What about a thread for 2d supplies as well, such as brushes and the like? :) (really need to find some good, useful rock brushes...).

BiG ToE-3DT
10-11-2010, 07:47 PM
you can post 2d requests in here too.

hulahuga
10-11-2010, 07:57 PM
Okay then, nice!

Then it stands as it is; some good, useful rock brushes :)

poopipe
10-11-2010, 08:05 PM
a code snippet for selecting alternate edges in a ring would be handy - I'll do the rest ..

Buzzy
11-11-2010, 03:39 PM
This ended up being WAAAAAAYYYY more complex than I thought it would be. There is probably an easier way, but this works.

2 rules:
1 - The object must be an Editable Poly
2 - You must select 1 edge and 1 edge only

It will then propagate out from that edge, alternately selecting edges.
It does occasionally get a little confused if your edge ring crosses itself because I uses the inbetween faces to determine whether edges are adjacent or not.


obj = $
firstEdge = getEdgeSelection obj
firstEdge = firstEdge as array
edgeRing1 = #{}
curEdges = #()
altEdgeRing = #()
curEdge = #()
tempEdges = #()
a = true
b = false
faceEdges = #()
feIndex1 = undefined
feIndex2 = undefined
if firstEdge.count == 1 then
(
obj.SelectEdgeRing()
edgeRing1 = getEdgeSelection obj
edgeRing1 = edgeRing1 as array
altEdgeRing = #(firstEdge[1])
curEdges = #(firstEdge[1])
while edgeRing1.count != 0 do
(
for f in curEdges do
(
feIndex1 = findItem edgeRing1 f
if feIndex1 != 0 then deleteItem edgeRing1 feIndex1
edgeFaces = polyOp.getEdgeFaces obj f
if a then
(
append altEdgeRing f
for ef in edgeFaces do
(
faceEdges = #()
faceEdges = polyOp.getFaceEdges obj ef
for fe in faceEdges do
(
feIndex1 = findItem edgeRing1 fe
b = (fe != f)
if feIndex1 != 0 and b then
(
append tempEdges fe
deleteItem edgeRing1 feIndex1
)
)
)
)
else if not a then
(
for ef in edgeFaces do
(
faceEdges = #()
faceEdges = polyOp.getFaceEdges obj ef
for fe in faceEdges do
(
feIndex1 = findItem edgeRing1 fe
b = (fe != f)
if feIndex1 != 0 and b then
(
append tempEdges fe
deleteItem edgeRing1 feIndex1
)
)
)
)
)
curEdges = tempEdges
tempEdges = #()
a = not a
)
polyop.setEdgeSelection obj altEdgeRing
)
gc()

poopipe
12-11-2010, 10:20 PM
woop!

go buzzy!

it's the only thing from graphite tools i miss on 2009.

maxscript is such an ugly language.

Mr. Bluesummers-3DT
30-11-2010, 04:40 PM
Updated WireBundle script for you guys. Indeed, Maxscript is a truly awful language. Someday, maybe they'll switch everything over to C#...

Download the wire bundle maxscript here (http://www.mrbluesummers.com/3868/downloads/wire-bundle-script).

Mr. Bluesummers-3DT
30-11-2010, 04:41 PM
P.S. I'll organize these tools this week if I get a chance. Maybe put them together into a 3dTotal Plug-In pack with deployment code so that you can just install them all at once.

Christian86
08-12-2010, 05:01 PM
Um...about that select edge script...it doesn't seem to work. I finally used it on a model I am working on (it was too close to the ed of my character for the DW) and when I run the script, nothing is selected.

Is there anything I need to have done to make it work? eg. use an editable poly or editable mesh, have the faces selected etc? Oh I'm using Max 2009 if that makes any difference too.

It works for me with a standard sphere and 4 different groups. I get all the edges I would chamfer.

But i just doesn´t work with my character (that has also several different groups). Both, sphere and character are editable polys with no other modifier.

Bigley
09-03-2011, 02:40 AM
Wanted to dump off some scripts that I have run across that may be useful.


Explode Elements (http://donott-lcad.blogspot.com/2009/09/script-explode-elements-back-into.html) - breaks all elements into separate objects
RTTAssist (http://vertexbee.com/rttassist.htm) - Streamlines the Render to Texture Process with a number of functions including a one button explode model.
Smooth Manager (http://www.scriptspot.com/3ds-max/scripts/smooth-manager) - control all meshsmooths or turbosmooths at once.
Texture Area (http://www.juantwo.com/maxscripts.html) - Calculates your wasted texture space.
UVW to Smoothing Groups (http://www.polycount.com/forum/showthread.php?t=71406) - Takes your UVs and creates unique smoothing group information for your model.
Primitive Maker (http://www.scriptspot.com/3ds-max/scripts/primitive-maker) - Make a primitive object out of anything. Eliminates the need to import bolts and such into your scene to be able to reuse.
Quick Save (http://www.zbrushcentral.com/showthread.php?t=46610) - (for Zbrush) Allows you to setup a hotkey to save in increments. No need to bring up a dialog. :D
Color Scheme Designer (http://colorschemedesigner.com/) - Interesting tool for helping with color design.

Also check here for tons of info, cool links, and more tools.
LowpolyLinks.blogspot.com (http://lowpolylinks.blogspot.com/)

hulahuga
10-03-2011, 05:00 PM
Anyone have any nifty Maya scripts at hand? (preferably modeling or rendering ;))

liquidbear
17-03-2011, 12:20 PM
can we requist viewport shaders for max ?

paulius-st
21-03-2011, 02:30 PM
i think this should be usefull. free UDK
http://www.udk.com/news-beta-mar2011

Grimmwolf
28-03-2011, 09:30 PM
Savus everyone,

BoxAttach.ms (http://grimmwolf.gr.funpic.de/DominanceWar/BoxAttach.ms) - attaches the selected object(s) to a editable mesh box to reset unwanded properties of the objects (I know it's a quite simple one but it's also one of the scripts I use quite often)

FreeMemory.ms (http://grimmwolf.gr.funpic.de/DominanceWar/FreeMemory.ms) - a small script from a tutorial that was featured on this page some time ago

ToggleHideBones.ms (http://grimmwolf.gr.funpic.de/DominanceWar/ToggleHideBones.ms) - the only toggle of max that is not accessible in the UI

UvHelper.ms (http://grimmwolf.gr.funpic.de/DominanceWar/UvHelper.ms) - a work in progress script with some nice functionalities (the stitch loop function currently works only with egdes, at some point I will add some other functions but this ill be after the DW)

VertSelectionLoad.ms (http://grimmwolf.gr.funpic.de/DominanceWar/VertSelectionLoad.ms)
VertSelectionSave.ms (http://grimmwolf.gr.funpic.de/DominanceWar/VertSelectionSave.ms) - these ones can be used to transfer a selection from one modifier to another without having to collapse the stack (pretty usefull for skinning parts that are not easily accessible in 3d but in UV space, these files should be copied to the *\stdplugs\stdscripts folder in your max folder to work correctly)

edit:
damn just noticed that if you want to download the PS scripts you have to right click and save link to...

ToggleUvs.jsx (http://grimmwolf.gr.funpic.de/DominanceWar/ToggleUvs.jsx) - a simple script to toggle a Photoshop group called "Guides" ( I have the F4 button assigned to it so it works like in max)

Normalmap_generator.jsx (http://grimmwolf.gr.funpic.de/DominanceWar/Normalmap_generator.jsx) - for those of you who know the nDo scripts for PS, this one does some similar stuff, just create a selection and run the script note the resulting normalmap if works for max so z-up, if you are using maya you have to invert the green channel

For easier access to the PS scripts you can create an action that records how you run the script and then access the scripts by running the actions

If you encounter any problems with the scripts feel free to contact me, I'm also open to any suggestions for other scripts or enhancements.

Cheers,
Grimmwolf

washka
05-04-2011, 07:48 PM
Lill' piece of newbie code I did a few month ago.
What's the use? Random distribution.
It creates random selections (Selection Sets) from a selection of objects.

0)Copy paste in a .ms file. Run it in max as maxscript.
The lill' tool should appear in:
Utilities tab=> MAXScript => Utilities rollout
1) Select for exemple 100 objects, so that's important first make a selection!!!
2) Go to the Utilities tab MAXScript => Utilities rollout tool should be there. (or it means script bugged / could be max version compatibility).
3) Enter number of set exemple 7. (If you choose 101 there should be an error message) You can also name Selection Set.
4) Push da button, 7 random Selection Sets should be created from the initial one (distribution).

Useful when you want to create random selection from a bunch of objects, MP me if you got questions/suggestions, use at your own risk:

utility Rselect "Random select"

(
global sa = selection
global textpart="SubSelect"
global nselect = 1
global range = floor (sa.count/nselect)

spinner sel_amt "Select:" range:[1,100,nselect] type:#integer
on sel_amt changed amt do
(
nselect = amt
)
edittext Iname_txt "Subselect name:" text:textpart fieldWidth:200 labelOnTop:true
on Iname_txt changed txt do
(
if txt != textpart do
(
textpart= Iname_txt.text
)
)
button theButton "Split!"
on theButton pressed do
(
sa = selection
if sa.count > 0 then
(
if nselect <= sa.count then
(
range = floor (sa.count/nselect)
sarray=#()
for k=1 to sa.count do
(
insertItem sa[k] sarray k
)
reste = sa.count - (nselect*range)

for i=1 to nselect do
(
Sname = textpart+i as String
Stemp = #()
for j=1 to range do
(
rand = random 1 sarray.count
insertItem sarray[rand] Stemp j
deleteItem sarray rand
)

if reste>0 do
(
insertItem sarray[1] Stemp (range+1)
deleteItem sarray 1
reste=reste-1
)
selectionSets[Sname]=Stemp
)
)
else messagebox "Select has to be smaller or equal than your selection cardinal (number of selected objects)!"
)
else messagebox "Selection required!"
)
)