CGTalk > Software > Autodesk 3ds max > 3dsMax SDK and MaxScript
Login register
Thread Closed share thread « Previous Thread | Next Thread »  
Thread Tools Search this Thread Display Modes
Old 10-03-2012, 11:40 PM   #1
JokerMartini's Avatar
John Martini
CG Supervisor, 3D, Maxscript, VFX
Ingenuity Engine
Los Angeles, USA
Join Date: Mar 2009
Posts: 1,330
Send a message via AIM to JokerMartini
Brain twister (Bubble Bias)

Here is a new one I've been messing around with today in my freetime. It's an attempt at a bubble bias. Where both ends are condensed and the middle is stretched thin. In the example I used boxes and adjust there placement on the z axis. Check it out. I do believe there is a more efficient way of doing this. I'm still in the process of messing with it but feel free to chyme in and mess with it. I'm hoping to implement a way where the bias control for both ends could be independent from one another.

totalHeight = (units.decodevalue "100cm") count = 21.0 sz = (units.decodevalue "3cm") clearlistener() endBias = .4 --range -1.0 1.0 biasStrength = 1.0 --range 1.0 100.0 fn fnCreateBoxes = ( fn biasCalc f bias:0.0 power:1 = ( if bias < 0 then 1 - (pow (1 - f) (1 - power*bias)) else (pow f (1 + power*bias)) ) for k = 0.0 to count-1 do ( middle = (count-1)/2 bubble = if k == middle then 0.0 else if k > middle then (endBias*-1) else (endBias) format "% - %\n" k bubble f = k/(count-1) h = biasCalc f bias:bubble power:biasStrength obj = box width:sz height:sz length:sz pos:[0,0,(totalHeight*h)] print obj.pos.z ) ) delete objects fnCreateBoxes()
____________ ___ __ _
John A. Martini
Old 10-03-2012, 11:40 PM   #2
CGTalk Moderation
CGTalk Forum Leader
Join Date: Sep 2003
Posts: 1,066,478
Thread automatically closed

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
Thread Closed share thread

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Society of Digital Artists

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump

All times are GMT. The time now is 04:28 AM.

Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.