Forum Groups
  All forums
    Help & Feedback
      Questions
      Work in progress
      Finished Art
      Non-Max related
    Community
      Offtopic
      News
    Hardware
    Photography


Featured Threads
  inspiration alert!!!
(37 replies)
  Indespensible MaxScripts, Plugins and 3rd Party Tools
(37 replies)
  The allmighty FREE Resources Thread !
(17 replies)
  spam alert!!!
(4886 replies)
  Maxforums member photo gallery index
(114 replies)
  Maxforums Member Tutorials
(89 replies)
  three cheers to maxforums...
(240 replies)
  101 Things you didnt know in Max...
(198 replies)
  A Face tutorial from MDB101 :D
(95 replies)
  Maxforums.org Members Gallery
(516 replies)
  SON OF POST YOURSELF
(637 replies)
  Dub's Maxscript Tutorial Index
(119 replies)

Maxunderground news unavailable

Scaling subobject in maxScript
show user profile  3joez
As stated here , you should first get the verts of your selection and the apply the transformations with matrices.

I'm reading two different ways to do this but I'm having troubles understanding some steps.
Why do you have to subtract the center of the transformation (how do you evaluate it?) from the transMatrix (is it the current transformation?).
Can somebody elaborate, or at least point me in the right direction? Thanks
read 387 times
3/17/2015 5:18:00 PM (last edit: 3/17/2015 5:19:40 PM)
show user profile  Garp
Say you have two positions pV and pC where pV is the position of some vertex on a mesh you want to scale and pC is the position of the center from which you want to scale. The vector (pV - pC) is the offset from the center to the vertex and is the value that needs scaling. Once you have the new offset, you add it back to the center and it gives you the new position of the vertex after scaling.
With a scaling factor k, it's k * (pV - pC) + pC.
Note that it doesn't matter in which coordinate system pV and pC are, as long as it's the same system.

ps: I didn't read the thread you linked to but I suspect it's something along those lines.




read 377 times
3/17/2015 6:59:28 PM (last edit: 3/17/2015 7:09:51 PM)
show user profile  3joez
Thanks Garp,I'll do some test scripts.
read 359 times
3/18/2015 10:23:32 AM (last edit: 3/18/2015 10:23:32 AM)
show user profile  Garp
A small algorithmic tip.
If during your tests you loop through the vertex selection, you should transform
k * (pV - pC) + pC
into
k * pV + (1 - k) * pC
Since (1 - k) * pC is the same each time around, you can speed up the computation by taking it out of the loop.




read 354 times
3/18/2015 12:59:31 PM (last edit: 3/18/2015 12:59:31 PM)
show user profile  3joez
Cool. That's beyond my idea but I wish there were more useful tips like that, around.
read 350 times
3/18/2015 1:57:28 PM (last edit: 3/18/2015 1:57:28 PM)
#Maxforums IRC
Open chat window


Support Maxforums.org