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 05-21-2003, 02:58 PM   #1
rgbman
New Member
 
Join Date: Feb 2003
Posts: 14
Script: Nonuniform rotate array ?

First I am using Max 3.1
Second I looked thru the search and found only a little bit.
How can I rotate an object like an array to create tick marks like a watch face BUT have them increase in the rotate by an exponential amount? So that it is not uniform.
Thanks for the help
 
Old 05-21-2003, 06:23 PM   #2
orpheo
New Member
 
Join Date: May 2003
Posts: 27
A quick way to do this is to use a spline and the spacing tool:

Draw an helix spline with no height so that you have the exponential form
then create your reference object go to tools->spacing tool and then pick the spline as path.

even on Max3.1 it should work
 
Old 05-21-2003, 08:49 PM   #3
rgbman
New Member
 
Join Date: Feb 2003
Posts: 14
When I try this it still spaces the ticks evenly over the spline.
I want something that will increase the degrees a little more each time there is another tick.
ie (all ticks have their point of rotation in the middle of the dial) first tick rotates 1 degree
then the next one rotates 1.5
then the next one rotates 3
then 6
then 10
then 20 etc.
here is an example for you
Attached Images
File Type: gif ex.gif (2.4 KB, 111 views)
 
Old 05-29-2003, 05:39 PM   #4
rgbman
New Member
 
Join Date: Feb 2003
Posts: 14
Is there anyone out there who knows how to do this?
I have tried taking a mel type of idea and I am getting no where.
 
Old 05-30-2003, 12:34 PM   #5
orpheo
New Member
 
Join Date: May 2003
Posts: 27
I've an idea, I'll try this week-end
 
Old 05-30-2003, 05:52 PM   #6
rgbman
New Member
 
Join Date: Feb 2003
Posts: 14
Thanks orpheo.
I would really appreciate any help.
 
Old 06-01-2003, 04:31 AM   #7
visualboo
virtualpoo
 
visualboo's Avatar
portfolio
Gene Crucean
VFX/CG Sup - Generalist
Los Angeles, USA
 
Join Date: Mar 2002
Posts: 2,087
I'd love a script that did this btw

Just thought I would say that
__________________
Gene Crucean
Arnold Renderer
 
Old 06-01-2003, 07:51 PM   #8
LFShade
smarter than I look
 
LFShade's Avatar
for sale or rent!
 
Join Date: Dec 2001
Posts: 964
I can do this, but I need more information.

1. You say exponential, but in your example it's more like doubling the value. What shall it be? Is there some specific formula that should be used to determine the rotation factor?

2. Are the rotation amounts you're referring to supposed to be absolute or cumulative? In other words, is it 1.5 degrees from the original object, then 3 degrees from the original object, etc., or is it 1.5 degrees from the original object, then 3 degrees from there, etc.?

3. How do you wish to define the center of the circle? For instance, you could use an object, or you could pick a point on the grid, or enter a radius and allow the center to be chosen arbitrarily. There are any number of ways that this could be done, and I wouldn't want to have to account for all of them

4. Does it only need to array around the world Z-axis? Or would you prefer that it always be around the axis perpendicular to the active viewport?

5. Does it need to be strictly circular, or will you require/desire the ability to make a spiral formation?

6. Should the array stop at 360 degrees? This relates closely to question #5, since a strictly circular array will get messy if you go greater than 360 degrees, whereas a spiral is best achieved with greater than 360.

If I have the answers to these questions, then this should be a relatively simple thing to script. Let me know


RH
__________________
Got Maxscript?
RHTools
 
Old 06-02-2003, 12:58 PM   #9
visualboo
virtualpoo
 
visualboo's Avatar
portfolio
Gene Crucean
VFX/CG Sup - Generalist
Los Angeles, USA
 
Join Date: Mar 2002
Posts: 2,087
yes

This might sound stupid but can't you just build all of that into the script and then just give the user options?
__________________
Gene Crucean
Arnold Renderer
 
Old 06-02-2003, 02:52 PM   #10
LFShade
smarter than I look
 
LFShade's Avatar
for sale or rent!
 
Join Date: Dec 2001
Posts: 964
That doesn't sound stupid at all, visualboo. It's just that that's a lot more trouble than I'm willing to go to at this time. I was thinking more along the lines of a one-off script so that rgbman could do whatever it is that he needs to do. It could be developed into something more general purpose later on.


RH
__________________
Got Maxscript?
RHTools
 
Old 06-02-2003, 07:42 PM   #11
visualboo
virtualpoo
 
visualboo's Avatar
portfolio
Gene Crucean
VFX/CG Sup - Generalist
Los Angeles, USA
 
Join Date: Mar 2002
Posts: 2,087
ah, I see. I just thought that you being the super code wiz that you are could whip that out like it was a small little one off script hehe

thanks for all your help in the community LF
__________________
Gene Crucean
Arnold Renderer

Last edited by visualboo : 06-02-2003 at 07:45 PM.
 
Old 06-02-2003, 07:58 PM   #12
rgbman
New Member
 
Join Date: Feb 2003
Posts: 14
Ok sorry it took me soo long but have been busy.
ok here we go
1. Yeah something that could be placed inside that part of the script to make my own measurement.
It would be something like the last degree x 2 +1. something like that
2. well i am not sure if i totally understand but it could be either. but i was thinking it would be more based on the last peice that got rotated. so the 3rd tick would be based on the one before it not from the original peice at lets say 12 oclock.
3. i would like to be able just to set the rotation point in the middle of the dial and then just like array have it duplicate around the center that i pick.
4. i would like to be able to type in the axis that i choose
5. i am sure others would want to be able to do a spiral but mine right now just needs to be circular
6. yeah 360 is fine but maybe something that would allow for less then 360 like 180 because my dial does not go all the way to 360 more like 300.

Thanks for the help.
 
Old 06-02-2003, 08:56 PM   #13
LFShade
smarter than I look
 
LFShade's Avatar
for sale or rent!
 
Join Date: Dec 2001
Posts: 964
visualboo -
I appreciate the vote of confidence, but I don't possess quite that level of wizardry yet It still takes me a little tinkering time to develop most of the scripts I write.

rgbman -
Thanks for the clarification. I just have one question: won't your numbers get a little out of hand using a formula like 2x + 1, when the rotation is cumulative? Starting with one degree of rotation, you'd end up exceeding 360 degrees after only 7 iterations! Anyway, I'm going to allow you to type in your own expression, so you can decide what works best

I'll have to wait 'til tonight to work on the script, so please be patient


RH
__________________
Got Maxscript?
RHTools
 
Old 06-03-2003, 03:04 PM   #14
LFShade
smarter than I look
 
LFShade's Avatar
for sale or rent!
 
Join Date: Dec 2001
Posts: 964
I didn't get as much time to work on this as I'd hoped last night. I've got the main bits hashed out, but it isn't all put together yet. I should be able to post something tonight.

Sorry for the delay

RH
__________________
Got Maxscript?
RHTools
 
Old 06-03-2003, 04:35 PM   #15
rgbman
New Member
 
Join Date: Feb 2003
Posts: 14
Yeah I think you are right about the math. I think that is the formula for acceleration and it was the first thing that came to me.

Yeah take your time on the script. I understand how hard it is because I couldnt do it. lol
 
Thread Closed share thread


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
CGSociety
Society of Digital Artists
www.cgsociety.org

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

All times are GMT. The time now is 11:41 AM.


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