ZBrushCentral

zDynamics...Bounce

Thought I would give zScripting a go. I was giving Digits a hard time yesterday and figured I had no right to talk. Since this is my first try its not too interesting but please let me know what you think. I understand this script has little to no practical purpose.

This script was designed for a sphere but you can use it on almost any tool. To get started just drag a sphere on the screen and hit execute. From there fiddle with the settings and try some different brushes. I got some interesting smoke like effects with a negative gravity setting, simple brush (with a nebulous alpha), and random rotation on. Sorry about the interface, I have yet to learn anything about that. The ball color changes on impact. The way it is currently coded this feature is a pain to turn this off but I’ll have a toggle in the next version. Next I am going to try and read up on zspheres. Maybe we can get some fake splashing liquid or something…

//edit
I am pulling the attachment. If you want the final version its in post #14
-thanks-

Had a chance to try this out before I headed off to the salt mine, very cool:cool: I’ll have to spend a little time seeing how each parameter effects the outcome. As a suggestion I would lay out the buttons horizontally, perhaps in 2 rows so that you can see what is happening without scrolling the Zscript window. Take a look at the PenMove controls or just use a Page Down (PD) command to make another row in your code. I have a feeling that you are no stranger to programming, getting a handle on zscripts should be no problema. It is a pretty powerful scripting lanquage and getting better with each version.

Yeah the interface needs some serious work. I would like to get into using images in there, still looking around for the cmds. I will hopefully have a much cleaner look in the next version.

Has there been any docs released for any of this? Cmd reference or anything? I found yesterday the printout from zb but I had no structure for syntax and it took some toying around to get it to work.

Anyway, thanks for the feedback. I’m starting on a revision today.

Here be the Zscript Command Reference page at Pixologic. Also you can save the Zscript Commands to disk from the Zscript Palette as a text file, it shows a few examples of the different commands, but the link above is pretty good.

WOW! that is MUCH easier to read, and it even has the whole list at the end! Time to attack that interface…

Thanks for the link

That’s a lot of fun. Great work :+1: and welcome aboard. :slight_smile:
How about markers so you could pick the whole thing up?! :wink:

Also, check out the Randomize command (if you haven’t already). I couldn’t work out why my ‘random’ settings where excatly the same each ZB session. :confused:

I shall look forward to seeing what you do with this.

I just UL’d another version into the original post. Interface layout is a bit better, no logic to it though. I was glad to find the hide gyro cmd. Do you somehow lay a clear button over an image to get image buttons? Cant seem to find any clear way of doing this…

marcus_civis
I have a “random” slider which introduces some jitter to the objects path. I didnt spend much time with this section so its ability to generate a random negative number is a bit crude. It would be nice if you could set a high AND low end in the rand cmd. I was going to try and work out a way to bounce things in 3d (which I still hope to do) but the marker idea sounds like a good quick fix as you could just rotate it afterwards.

Thanks for the input, I’m still reading up on formatting things in the zscript window atm.

…adapt this funny Cellular Atomat The Langton’s Ant
From 2 very simple rules
From chaos borns regularity :roll_eyes:
Have good scripting :sunglasses:
Pilou
Ps your script work pefectly ! :+1:

Frenchy,
Some of the routines in this script could easily be adapted to generate some Wolfram type experiments (in reference to the book “a new kind of science”). I was thinking about that in the back of my head the whole time… Strange that you mention it.

Cellular Automata need computers
We use computers

Scripting is a funny thing
You are a scripter (new for Zbrush)

There is a section scripting
I read the section Scripting:)

You make a funny moving script
I see it

So it’s remember the turmites or Langthon Ant
As Wolfram site is a mine for all math things
There no big hasard :lol:
Pilou
Ps a funny applet where you can choose number and rules of the turmites

It is funny the reference doesn’t show the parameter to assign a bitmap or psd image to the IButton Command. But indeed there is such a parameter

Here is an example of using a button with a image

[IButton ,“Place”,“Place on Canvas - Use Shortcut Key d”,
[Varset,Clicked,0]
[RoutineCall,Mouselook,Hval1,Vval1,Hval2,Vval2,Clicked]
[RoutineCall,PlaceModel,Hval1,Vval1]
, 0 ,40 ,‘d’ ,“A2.PSD” , 16 ]

[IBUTTON, Name , TIP, COMMANDS to be Executed,enabled/disabled,width,shortcut key,Image file,Height]

hope that helps

Always curious how people find out about non-documented features. Thanks Digits.

Just made a version with markers. When the marker option is “on” the script will create a new polymesh in the tools palette, then clear the screen. It does not draw the new object on the screen yet because I dont know how to save the name of the generated polymesh.

Thanks again for all the comments.

//edit: Just added V.04. This time there is a way to turn off the “onHit” color scheme as well as a new “timeLapse” version. I dont think I will keep posting every little addition, rather only when there is a major change. Thanks again for the input

//edit:
Pulled attachment, check post #14 for final version. -thanks-

You can set minimum and maximum RAND values easily enough:

[VarDef, Min,0]
[VarDef, Max,0]
[VarSet, YourRandomValue, RAND(Max-Min)+Min]

There are a few mistakes in the online command reference. Cross check it with the internal ZBrush one, available from the ZScript>Cmd button (this has examples for all the commands, missing from the exported text version).

Now to have another play…:slight_smile:

             Marcus,
Thanks for the tip, I will give that a try.  

Here is the next version. Now you can bounce in 3d. Just turn on Zwalls in the Zwall menu and you are ready. You can build an object out of it with “MarkIt” and then then move the whole thing around. I have posted a sample image below.

Thanks again for all the input

//Edit
Ok, I think this will be the final version as I can not imagine there being any real use for this. I have just gone in and cleaned everything up, improved the random features (thanks marcus). If for whatever reason you are playing with this and find a way to break it please let me know as I would like to have it as functional as possible.

Thanks to all for the comments, look forward to doing some more Zscripting!

Attachments

3dBounce.jpg

BounceV6.zip (4.72 KB)

hi Bism.

cool little plugin. has some interesting features. took me a second to get it running cuz I like to do everything the opposite way it supposed to work.:rolleyes:

will have to check out v6 and hopefully post something soon.

Aminuts,
I sat down last night just playing around with the settings and found that the default settings are rather boring. While testing I always used the default 640/480 screen size and found you can get much more interesting results with a bigger screen. Also, if you slap on a material like noise pattern2 and turn on some fog it is neat to see the page build. Not really too cool a finished product but fun to watch. Anyway, thanks for the comment. Hope to have something more useful in the next script attempt…