Move an object to the ground

Discussions concerning plugins for SOFTIMAGE©
User avatar
wireframex
Posts: 399
Joined: 08 Jun 2009, 23:02
Location: France

Move an object to the ground

Post by wireframex » 08 May 2016, 22:35

Hi community,

I'm looking for a script or pluggin who can move an object to the ground (0,0,0). One click button will be great like F3 in Lightwave.
Thanks
Phil
"without mastery, power is nothing" - Softimage Addict User
CPU 3990x 128 Threads / 2 x 3090 RTX - 24 Go / 96 Go memory

User avatar
mc_axe
Posts: 415
Joined: 12 Mar 2013, 18:44

Re: Move an object to the ground

Post by mc_axe » 09 May 2016, 00:39

Something simillar is (shift r) reset active transform,

about scripts i dont know much, i just typed by hand in translate and got this vbscript quickly

Code: Select all

Translate , 0, 0, 0, siAbsolute, siGlobal, siObj, siX, , , , , , , , , , 0
Translate , 0, 0, 0, siAbsolute, siGlobal, siObj, siY, , , , , , , , , , 0
Translate , 0, 0, 0, siAbsolute, siGlobal, siObj, siZ, , , , , , , , , , 0

julius
Posts: 248
Joined: 12 Jun 2009, 10:56

Re: Move an object to the ground

Post by julius » 09 May 2016, 17:02

An other solution :

alt+shift+ right clic on the translate and/or scale and/or rotation picto. Then enter "0" and press enter.

User avatar
wireframex
Posts: 399
Joined: 08 Jun 2009, 23:02
Location: France

Re: Move an object to the ground

Post by wireframex » 09 May 2016, 18:09

Here is exactly what I'm looking for :

Easy way :)

[video]http://pll_3d.perso.sfr.fr/On%20Ground.mp4[/video]
Thanks
Phil
"without mastery, power is nothing" - Softimage Addict User
CPU 3990x 128 Threads / 2 x 3090 RTX - 24 Go / 96 Go memory

User avatar
mc_axe
Posts: 415
Joined: 12 Mar 2013, 18:44

Re: Move an object to the ground

Post by mc_axe » 09 May 2016, 19:29

Hmm ,thats different , for now i can think only:

mScale2fit script press get bbox (copy height value)
move center to bbox of cow
bring your object to center of world or just y=0 axis
move it upwards in +y =height/2

but thats not in one click, and changes the center of mesh.
i would love such functionality aswell +1 on request

User avatar
wireframex
Posts: 399
Joined: 08 Jun 2009, 23:02
Location: France

Re: Move an object to the ground

Post by wireframex » 09 May 2016, 19:37

I use it very often with LW and it will be good to have it for SI.

Maybe someone of us could make a script to do it :)
"without mastery, power is nothing" - Softimage Addict User
CPU 3990x 128 Threads / 2 x 3090 RTX - 24 Go / 96 Go memory

User avatar
AceMastermind
Posts: 160
Joined: 15 Jun 2009, 00:57
Contact:

Re: Move an object to the ground

Post by AceMastermind » 09 May 2016, 20:09

I was playing around with the native Align Object tool under the Transform panel and although it requires at least 2 objects, someone could use it in a script with user input specifying the 2nd object if a grid object sets the Y where the bottom of the sphere's bounding box is transformed to the grid at Y=0 in this example:

Code: Select all

Application.CreatePrim("Grid", "MeshSurface", "", "")
Application.CreatePrim("Sphere", "MeshSurface", "", "")
Application.SelectObj("grid,sphere", "", True)
Application.Align("", "siY", "siAlignGMIDDLE", "siAlignGMIN", "siAlignGMIDDLE", "siAlignGMIDDLE", "siAlignFMIDDLE", "siAlignGMIDDLE", False)
Application.DeleteObj("grid")
But yeah, I agree a script that could do this would be useful. :)

NNois
Posts: 754
Joined: 09 Jun 2009, 20:33

Re: Move an object to the ground

Post by NNois » 09 May 2016, 23:28

hey that's my fav ICE node here !
just create an ice tree
- get point position
- get minimum in set
- then the classic stuff get the Y and Add that to the point position
done.
save that in you modeling menu !

PS: and extended version would be the one i've linked here
you can do
- center X Y Z or an in between
- ground X Y Z or an in between
and more
Attachments
nnAuto Center.1.1.xsicompound
(25.57 KiB) Downloaded 119 times

User avatar
FXDude
Posts: 1129
Joined: 19 Jun 2012, 21:59

Re: Move an object to the ground

Post by FXDude » 10 May 2016, 18:36

In case you haven't made a trip to RRay.de, this can be good, ..

Softimage - Normal Align Plugin 0.5

By Der Janosch




And this can also be particularly handy! ;

Soft Transform
By Piotrek Marczak (here called 'Origin')



When you invoke it, ( Modify -> Component -> Proportional Transform Tool )
you see a radius circle around your mouse which acts like a 'move proportional' but for objects.

It can of course act on bunches of objects, but also great for individual objects as it has collision detection, so moved objects can stop once they reach a surface.

So it's really great to position stuff around!
(and/or to put things on other things, with single clicks like move point 'm' key!)


By default it proportionally moves unselected objects, and with collisions ON, are stopped by ('collide with') selected objects.

But you can also set it to move selected objects, which would then collide with unselected.
(you can access the settings PPG by pressing ENTER while in the tool)



The first two on-screen toggles are for collisions,
the 1st is for collisions with fixed objects,
and the second is for collisions between multiple objects themselves being proportionally moved.

You can map it to a key,
(it's called PBSoftTransform in the Custom Script Commands section of the KeyMap editor)
and if you don't use the 'B' key (box manipulate tool), you can map it to that, cause it's close to the 'm' key :)

Also pressing 'R' (while in the tool) while dragging, scales the proportional region size.
(see notes on Rray for hotkeys)


**Note that there seems to be an issue with the PPG where the dropdowns for colision detection have only one item, and the missing items are actually important because default settings are faster but more imprecise.

But if you want to more precisely position a few objects with collisions, you can still set it by selecting the single item in both settings of the collision dropdowns in the PPG,
then copy both commands from the log and paste them in the script editor (or toolbar buttons) while replacing the '0' argument of each of the two commands by '1'.

And once in 'precise mode' you, need to move a bit further in the direction of the fixed objects for moved objects to reach them.

Also note that for collisions to happen, both the moved and the fixed object need to be within the circle radius around the mouse.

Nevertheless, once around the few idiocicrocies it's really awesome!


I've also used this to single click animate effectors with autokey ON for speed-posing!
(while creating a Group with all effectors for easy selection of affected elements)
Could also be used for facial or other rig controllers without picking->translating/rotating

Which is also really great! :)

User avatar
wireframex
Posts: 399
Joined: 08 Jun 2009, 23:02
Location: France

Re: Move an object to the ground

Post by wireframex » 10 May 2016, 21:35

Thanks for all sugestions I also had a look to RRay.de but I just looking for a one click solution ;)

This is something I use very often in my workflow like "align & distribute" --> just see below


EDIT : Normal Align & Object Transform are already in my workflow since months but it is not exactly the same ;)

Thanks
Phil
"without mastery, power is nothing" - Softimage Addict User
CPU 3990x 128 Threads / 2 x 3090 RTX - 24 Go / 96 Go memory

User avatar
Daniel Brassard
Posts: 878
Joined: 18 Mar 2010, 23:38
Location: St. Thomas, Ontario
Contact:

Re: Move an object to the ground

Post by Daniel Brassard » 10 May 2016, 22:26

Hi Phil @wireframex

First some questions:

* What does the "Sense" field do in your previous video example? Is it an offset parameter? and in which axis (I assume it is an offset from one of the chosen plane xz, yz or xy).

* If the object is rotated, does it reset the rotation as well?

I will assume here that you don't want the scale of the object to be affected.
$ifndef "Softimage"
set "Softimage" "true"
$endif

User avatar
wireframex
Posts: 399
Joined: 08 Jun 2009, 23:02
Location: France

Re: Move an object to the ground

Post by wireframex » 10 May 2016, 22:51

Hi Daniel
Daniel Brassard wrote:First some questions:

* What does the "Sense" field do in your previous video example? Is it an offset parameter? and in which axis (I assume it is an offset from one of the chosen plane xz, yz or xy).
Sense + is to move the bottom of the object onto the ground for Y or for each axis=0
Sense - is to move the top of the object under the ground for Y or for each axis=0
Daniel Brassard wrote:* If the object is rotated, does it reset the rotation as well?
No, it put the closest part of the object onto the ground for Y or for each axis=0
Daniel Brassard wrote:I will assume here that you don't want the scale of the object to be affected.
Exactly :)
"without mastery, power is nothing" - Softimage Addict User
CPU 3990x 128 Threads / 2 x 3090 RTX - 24 Go / 96 Go memory

User avatar
Daniel Brassard
Posts: 878
Joined: 18 Mar 2010, 23:38
Location: St. Thomas, Ontario
Contact:

Re: Move an object to the ground

Post by Daniel Brassard » 11 May 2016, 17:03

What is different from your one click method and XSI transform menu

Transform > Align Objects

http://softimage.wiki.softimage.com/xsi ... ations.htm
$ifndef "Softimage"
set "Softimage" "true"
$endif

User avatar
wireframex
Posts: 399
Joined: 08 Jun 2009, 23:02
Location: France

Re: Move an object to the ground

Post by wireframex » 11 May 2016, 17:23

Daniel Brassard wrote:What is different from your one click method and XSI transform menu
Transform > Align Objects
http://softimage.wiki.softimage.com/xsi ... ations.htm
In SI you need to have 2 objects to have a reference to align and you can't move it to the ground (0,0,0) it is not what I am looking for

In LW :
- select the object
- type "F3"
- type "ENTER"

That's all :)
"without mastery, power is nothing" - Softimage Addict User
CPU 3990x 128 Threads / 2 x 3090 RTX - 24 Go / 96 Go memory

User avatar
Daniel Brassard
Posts: 878
Joined: 18 Mar 2010, 23:38
Location: St. Thomas, Ontario
Contact:

Re: Move an object to the ground

Post by Daniel Brassard » 11 May 2016, 18:01

To mimic the behaviour of LW you can script it using several ways in XSI:

* Using the command GetBBox or Align
* Using the object model Geometry.GetBoundingBox, Geometry.GetBoundingSphere or Geometry.GetBoundingCapsule introduce in XSI v5.0
* Using the object model X3DObject.GetBoundingBox introduce with XSI V10.0 (2012)

Depending of the version of Softimage you have, I would recommend using the object model X3DObject.GetBoundingBox to script the tool (for more recent versions) or Geometry.GetBoundingBox (for older versions).

The problem with working with GetBBox or Align is that you are missing the transformation information specifically scaling and rotation affecting the object to work properly which you will need to included in the script and, a reference point to align to which can be specified via script as well as you want it to be on one of the plane axis (x, y or z).

The layout is simple enough and can be made to mimic LW or anything you want, from simple check mark to more complicated field input such as offsets.

P.S. You could also use the Transform > Align Objects command as a starter script that would provide a plane as the reference object to align to which would be deleted on exit (create plane at the origin in correct orientation, align objects to plane, delete plane, done).
Last edited by Daniel Brassard on 11 May 2016, 18:27, edited 2 times in total.
$ifndef "Softimage"
set "Softimage" "true"
$endif

User avatar
wireframex
Posts: 399
Joined: 08 Jun 2009, 23:02
Location: France

Re: Move an object to the ground

Post by wireframex » 11 May 2016, 18:10

Thanks Daniel,

But the pb I don't have the knowledge of scripting ... :-ss
"without mastery, power is nothing" - Softimage Addict User
CPU 3990x 128 Threads / 2 x 3090 RTX - 24 Go / 96 Go memory

Post Reply

Who is online

Users browsing this forum: No registered users and 16 guests