CGTALK MAXSCRIPT CHALLENGE - Topics and Suggestions


#110

Hi guys,

I’m swamped this month but i’ll try to put up a challenge next week.


#111

How does it look like, will there be any more Challenges ?
I really like to enter, though it´s really a great learning possibility ! :slight_smile:


#112

Yes a new challenge would be great !


#113

i’m not sure if anyone has suggested this but is it possible to script something for the camera movement so one could move around in a scene like in a 3D FPS game. aim with mouse and move/strafe with keyboard… recording the movement of the camera at the same time…


#114

hi , i’m new here so i dont know if its a right place to send this post .
The created script has ability to build character skin in about 7 minutes, it can slice each part of the character to be replaced by the mesh of its bone part.
please give me your feedback (sorry for bad English)
http://youtu.be/U01DQ-D3-r0


#115

I failed to understand How do you compute the envelope’s soft range and envelopes overlapping ranges?


#116

[QUOTE=gabby_ovadia]I failed to understand How do you compute the envelope’s soft range and envelopes overlapping ranges?[/i use skin wrap and add detached mesh to it
with each part script can find which vert is from which part and set 0 wight to strength vert .
for soft rang, skin wrap will do that and its almost perfect and it can be edited if its necessary]


#117

I have a suggestion…

One day i had to make an stopmotion effect, like a Clay morphing and changing the original form. I 've made it manually using one model for each “frame”, and had to animate it key by key manually.

Then i was thinking about a tool with a simple UI where we could pick a list of objects on the scene and the script will sequence that objects hiding and unhiding them (visibility 0 and 1) with an option to setup the start frame the end frame and a check box with "easy in/out". 

This kind of script could be very usefull and there's nothing like this on scriptspot or other resources...

 It could be nice to have this tool as a script, for stopmotion simulation (in 3D) and some other situations.

#118

I read your post, and came up with an Idea that might prove simpler - did you try animating using your key frame method to “stepped” key, ( or even check to just set the frame rate of the scene to 12fps )


#119

Hi Gabby. :wink:

Yeah, i've animated using all the tricks to do it looks like Stopmotion (hold, low fps, etc). :) The results are cool, but the problem is that was not "fun" to manage animate hide/unhide of a sequence of deformed objects. A script could do it much better and more interactivelly. At that time i would like a tool where i could add any objects in a list and "play" it as a single object animated, but "under the hood" it's a sequence of objects.So i can deform and manipulate every frame as a real clay without modifing the poster or previous frame cause each frame will show a single object on a list. 
It's a bit like the RealFlow plugin, that plays a sequence of Meshes...
 But, maybe it's something "too simple" for a script challenge. :)

#120

Then i was thinking about a tool with a simple UI where we could pick a list of objects on the scene and the script will sequence that objects hiding and unhiding them (visibility 0 and 1) with an option to setup the start frame the end frame and a check box with “easy in/out”.
Have you tried Joker Martini’s script, Key Transfer? I think this would be easy to set up with it.


#121

Excellent suggestion Raytracer. I will try this script. Looks very handy ! :slight_smile:


#122

Hi Marcelo,

I did not quite understand why do u need a separate mesh per frame in the first place ? You could lower the fps and modify per frame the poses of a single object, so you will have a “stop motion” effect.
That , unless I missed something on the way.


#123

Hi gabby. Good point, your method will work in many situations for sure.

The intent was to have a way to have a tool to assembly an animation of models that could have a very different topology using frame-by-frame. One of the reasons for that is the UVMap. Using just deformers over the SAME object the Textures will stretch and it will breaks the “realism” of Clay textures. Using many models i can freely adjust the UVMaps for each model/frame to have it done right.

For instance… Imagine a single plane that needs to transform on a clay car, that divide itself onto 2 clay spheres and then the 2 merge together and became a clay cube then they explode like clay drops and merge again…

Doing Clay animations with crazy topology transformations like that could be (it is) a nightmare to try doing everything with just modifiers over a single mesh. The simple solution is to use many models, that changes along the animation from a frame to another. But doing all the Hide-Unhide keys is something that could be solved with a script like the Morph modifier where we could put a list of models in a specific order and the script just create the hide/unhide keys. 
It's a very specific case, i know. ;)

#124

Well, here’s another idea - it is a good and simple possibility to create 2 macro-scripts

“$.visibility = 0” (or "for o in Selection do o.visibility = 0)
And
“$.visibility = 1” (or "for o in Selection do o.visibility = 1)

And assign a short keys for them. it will be super fast, and u can manage it on the viewport with no sluggish performance.
As for creating a list like the morph, well it may take bit more time for it, and it is a very case specific request.


#125

Thnks for the sugestion. :slight_smile: I will try. Maybe i will try to make something, with UI and the list any day. :slight_smile: I am not a former scripter, but i can code a bit. lol

Tks again ! :)

#126

Any chance we can get this restarted? Seems like theres been any number of cool ideas in the past that haven’t been seen through.

-Michael


#127

mak4max

I am in need of a script or batch processor.

What I need done is relatively simple, and at the moment looks like something that will be handed over to an intern.

We have apx 200gig of Max files on a system from the max 4 era. We’d like to archive them.
(even though possibly 20% are redundant saves)

As you might imagine, I , nor anyone else wants to go through the files one by one and load them up in max and hit a button to archive

them. And then load the next file, and the next etc etc.

Anyone know of a manner of doing this without having to spend a week in front of a terminal ?

We are hoping to compress the files with the texture files intact. 99% of the textures should still exist on the system. I comment on

this because I am not certain if a batch file might get a hitch in it’s giddy-up when it encounters a file where the source textures cannot

be located. (perhaps it just zips and dis-regards this and when the file is opened in the future it gives the browse to locate missing

textures dialogue. ?)

I’m pretty confident that you script gurus and code-a-holics might have a solution.

Your help would be greatly appreciated.

my platform is like

WIndows7 ultimate 64 bit
Core I7 ( 8 CPUs )
12 GB RAM
3ds Max 2011 64bit/vray 1.5 sp5

thank in advance , Cao.


#128

Lets kickstart the challenges by taking a stab at some Boids. Suprising as it may seem I have yet to see a published fully implemented system in maxscript. For that matter I haven’t seen one do everything in pflow either.

http://en.wikipedia.org/wiki/Boids
http://www.red3d.com/cwr/boids/

Care to add some predators?

It would be cool to see an object collision avoidance scheme built in as well .

-Michael

heres a simple find the target script to kick it off

----------------------------------------------------
 --Test Move To Target
 --A simple testbed for having a point chase a target
 --Michael Spaw 02092013
 ----------------------------------------------------
 delete objects
 testCircle =circle radius:5 wirecolor:red
 testTarget = point  wirecolor:green
 numTargets = 4 --sets the number of positions the target will be set to
 BoundingArea = 200
 HalfBound = BoundingArea*0.5
 aqua = (color 87 224 198)--Create a color to be used for the bounding shape
 
 
 currentpos = testCircle.pos
 timeStart = animationrange.start
 timeEnd = animationrange.end
 totalframes = timeEnd-timeStart
 
 ----------------------------------------------------
 --Heres the bounding area
 Rectangle length:BoundingArea width:BoundingArea pos:[0,0,0] wirecolor:aqua  --a nice bounding rectangle for neatness
 
 
 ----------------------------------------------------
 --set some positions for the target
 set animate on
 sliderTime = timeStart
 timeDivis = (1.0/numTargets)*totalframes
 for i = 1 to numTargets do
 (
 newTarget = [(random -HalfBound HalfBound),(random -HalfBound HalfBound),0]
 newtime = i*timeDivis
 sliderTime = newtime
 testTarget.pos = newTarget
 print newtime
 print newTarget
 )
 set animate off	
 	
 
 ----------------------------------------------------
 -- gives the vector to the target with a magnitude
 fn moveToTarget currentPos targetPos moveRate=
 (
 	moveVector = targetPos - currentpos
 	newpos = moveVector*moveRate
 	return newpos
 )
 
 set animate on
 for i = timeStart to timeEnd do
 ( 
 	targetPos = testTarget.pos
 	sliderTime = i
 	currentpos += moveToTarget currentpos targetPos 0.05
 	testCircle.pos = currentpos	
 )
 set animate off

#129

Hi all. How to change the encoding in the read text from a byte?
This function has bit.intAsChar, there seems to be a problem, the necessary encoding of characters in GBK2312

fn ReadFixedString bstream fixedLen=
(
local str = “”
for i = 1 to fixedLen do
(
local ch = ReadByte bstream #unsigned
str += bit.intAsChar ch
if ch == 0 then
(
– Ignore junk
SkipBytes bstream (fixedLen - i)
exit
)
)
str
)

Or there is another solutions? I need to read from a file 256 bytes text encoding GBK2312
Thank