PDA

View Full Version : Layout: Pivot position for loaded object layer



Underdog
08-13-2015, 09:39 PM
I like to look at myself as an intermediate :lwicon:-user, but have this ever returning basic problem when loading object layers in layout:

* Imported layers change rotation and position, compared to the original.

It happens with bones, too. The workaround is of course manual adjustment of position and rotation, but that is very time consuming indeed.

I simply want imported object layers and bones to stick to the pivot reference of the main object (e.g. imported eyes in individual layers appearing in the correct position, or a copied bone to inherit the same position and rotation as the original.)

It would have been very beneficial understanding this from the get go, but I guess I was too excited learning about hypervoxels and inverse kinematics...

Snosrap
08-13-2015, 09:55 PM
I think you've come across a LW bug-a-boo. Not really a bug so to speak, but an annoyance none the less when you import layers or make changes to your pivot points in Modeler. Reset your pivot points by going to Modify. Move Pivot and Reset. Anyway if I am understanding you correctly I think that is what is needed. Also make sure "Parent in Place" is checked, otherwise things can get all screwed up if you moved and rotated the parent object.

Underdog
08-13-2015, 10:17 PM
Snosrap,

Thank you very much for that quick reply! Interesting - I did not know it was a bug...

* Parent in Place - I am sure I forgot about enabling this a million times, and have not been using it lately. The reason being I never fully understood the functionality of this button: I will take time reading about it today.

I already know how to reset pivot points, but thank you for mentioning it anyway. :thumbsup:

Of course, sometimes one wants to change the position of an object layer, but usually - when importing - I want it to stick to the original position and rotation of the main object.

jojodyne
12-14-2015, 11:29 PM
I consider myself a "novice" user, and have a very similar problem:

- simple room
- a modeled spotlight, stuck against the ceiling (with translate axis n edge mode)
- load both in layout
- create a light
- parent light to the modeled spotligh

Even though I've centered the pivot for the spotlight in modeler (and I can see the pivot is at the center of the spotlight in layout), the layout light will not "jump" to the position of the spotligh, so I need to manually move it up there. I need about 12 lights, so would like to have the child light just take the position of the parent object. It just remains at the world origin. Hope anybody can help out with this one.

jeric_synergy
12-15-2015, 12:31 AM
Look for the toggle "PARENT IN PLACE". Turn it off.

jojodyne
12-15-2015, 04:41 AM
Thanks for the reply! I tried that (it's off by default I think) but to no avail. Need to experiment a bit more and let you know. I must be doing something wrong somewhere :)

jeric_synergy
12-15-2015, 10:13 AM
Hmmm. With PARENT IN PLACE off, and the location set to 0/0/0, parenting any item to another should cause it to jump to the parent's location.

Try with a virtually empty scene, you may be getting one small step wrong. BTW, here PARENT IN PLACE is on by default, so be sure you've got that correct.

jojodyne
12-15-2015, 12:40 PM
That's what I though. OK here goes:

LW2015
I've created a simple ball at position x=3.5 / z=1.95 / y=1.95
Go to layers --> center pivot (checked with the pivot tool, and it's indeed at the center of the ball)
save
open up Layout
add spotlight
load ball (I can see the pivot is right at the center - and the position at the bottom left shows the number I've mentioned above)
Go to lights mode - select the spotlight
open up motion options
choose "ball" in the parent box
--------------------
The spotlight stays at 0,0,0

Parenting it to either the default distant light or the camera makes it jump to their respective positions, just not with my ball
--------------------
I'm stumped :):):)

jojodyne
12-15-2015, 01:17 PM
From the position I was before, I returned to Modeler, centered the object, centered the pivot. Then deleted it from layout and reloaded it, then moved it. This time parenting does set the lights position to that of its parent. more stumping :)

spherical
12-15-2015, 01:58 PM
Yes. (Haven't had my espresso yet, so this may be daft.) When you create an object not at the origin in Modeler, it loads into Layout in that position relative to Layout's origin. Therefore, the light considers that object to be at Layout's origin (0,0,0). Creating objects at Modeler's origin and moving in Layout to their intended location does not create this situation, as Layout (and the objects unique to it: Lights, Cameras) then are aware of the movement and resultant position.

jojodyne
12-15-2015, 02:14 PM
Yes. (Haven't had my espresso yet, so this may be daft.) When you create an object not at the origin in Modeler, it loads into Layout in that position relative to Layout's origin. Therefore, the light considers that object to be at Layout's origin (0,0,0). Creating objects at Modeler's origin and moving in Layout to their intended location does not create this situation, as Layout (and the objects unique to it: Lights, Cameras) then are aware of the movement and resultant position.

I sort of reached that conclusion too. Annoying thing is that visually, the pivot point is really located away from layout's origin, and even the numerical position of the object is not 0,0,0.

What I really wanted to do was:

create 12 spot light objects, arranged in a 4x3 grid, have those aligned exactly with the ceiling of the room, and then have 12 lights, each at the center of a light object. Using the parenting technique seemed like the quickest way to to that.

jojodyne
12-15-2015, 02:34 PM
OK, instancer should already give me a quick grid, now the lights ...

spherical
12-15-2015, 05:17 PM
Make sure you have the light center not included within a light object's physical geometry. I do some amount of complex archviz and just dispense with "automatic" ways of placing lights relative to their fixtures. A model of our new studio has, so far, 130 lights and I'm only about 3/4 finished. Most of them aren't on any sort of grid; although some do follow a linear pattern. As for the ones that might conform to a grid, there are enough of them requiring location adjustments that it just isn't worth having two systems for placement. Being low voltage MR16 IES lights of various beam spreads targeting specific areas/objects, only a few are predictable as to location/angle, so programmatical placement is out of the question for me. And, for the most part, once they're placed, they're placed. It's a one-time operation.

On the parenting issue, I had one scene for NASA that was driving me nuts with the pivot point locations. I'd set things up in the model, load up the scene in Layout and have doors flying all over the place. Couldn't figure what was going on until finally just building the doors separately, with their pivots located at the hing centers, then place the doors in Layout where the stationary hings parts were. After that, they would load and animate as expected. Up until then, I was going nuts.

jeric_synergy
12-15-2015, 05:29 PM
Good point: Everybody, how DOES one use Instancer with Lights???

+++++
re: Pivot points: I seem to recall there being some madness with using "Move Pivot" versus the 'natural' Pivot Point (i.e. the LWM origin). In that you could see the damn thing, but as above Parenting was in reference to the un-altered Pivot location.

jojodyne
12-16-2015, 04:27 AM
Make sure you have the light center not included within a light object's physical geometry.
Thanks for the tip!


for the most part, once they're placed, they're placed. It's a one-time operation.
Very true. I was trying to be clever, and have now spent more time on doing them programmatically than just a manual alignment (I could just simply copy the coordinates, lower the y-coordinate a bit to keep the light's center outside the object's geometry, and then manually reproduce the y-coordinate in all the lights I need to be at the same height) :):):)


On the parenting issue, I had one scene for NASA that was driving me nuts with the pivot point locations. I'd set things up in the model, load up the scene in Layout and have doors flying all over the place. Couldn't figure what was going on until finally just building the doors separately, with their pivots located at the hing centers, then place the doors in Layout where the stationary hings parts were. After that, they would load and animate as expected. Up until then, I was going nuts.
:) a lesson learned there :)

jojodyne
12-16-2015, 04:34 AM
Good point: Everybody, how DOES one use Instancer with Lights???
Tried it. The Lights Motion Options Panel does not have the "Instancer" tab :(


re: Pivot points: I seem to recall there being some madness with using "Move Pivot" versus the 'natural' Pivot Point (i.e. the LWM origin). In that you could see the damn thing, but as above Parenting was in reference to the un-altered Pivot location.
That's exactly the problem. Alternatively, If there was a way to align objects geometry in Layout rather than in Modeler that would also do the trick. The "align-axis" tool in modeler is pretty neat. Oh well, I'm only just starting out. I've given myself some time to get to grips with the program, and have fun!

DrStrik9
12-16-2015, 12:41 PM
This is pretty advanced, but here it is anyway ...

https://www.youtube.com/watch?v=Kwp2W_2BAaU

jeric_synergy
12-16-2015, 02:50 PM
This is pretty advanced, but here it is anyway ...
https://www.youtube.com/watch?v=Kwp2W_2BAaU
Thanks for the link. I'm stumbling along following it, had to add some DP plugins, but right now the bit that's stymieing me is: the initial velocities seem to be basically 1/1/0, because we're explicitly killing the Z velocity. But everything is going upper right.

The velocity is derived from the bump channel of a turbulence node, and I'm wondering if it's all positive, or if I've just screwed up somewhere. Bryphii's particles seem to be moving in every (XY) direction, around the clock. :(

jojodyne
12-16-2015, 02:51 PM
This is pretty advanced, but here it is anyway ...

https://www.youtube.com/watch?v=Kwp2W_2BAaU
That's pretty cool! Thanks a bunch for finding this; must try it.

Meanwhile, I've found another easy way to do what I set out to: quite simple and does the same trick:

load your light object
add the light (spot, spherical, whatever)
go to object mode, select your light object
hit "copy motion" from the "motion path" section on the left panel
go to light mode, select your light
hit "paste motion"

boom! Light is now positioned exactly at the pivot of your object - no need to key frame (you still need to center the pivot of the light object).

All that's left is set the pitch to 90 to make it point down, and move it down slightly so it actually shines light on the scene.

jeric_synergy
12-16-2015, 02:55 PM
You may also want to investigate the "Controllers and Limits" tab of the Motion Panel, specifically the POSITION ITEM ....ummm.....thingy, followed by the use of SAME AS ITEM in the X, Y, Z controller options.

These are dynamic, and will follow any changes you make to the controller item.

spherical
12-16-2015, 04:56 PM
I was trying to be clever, and have now spent more time on doing them programmatically than just a manual alignment (I could just simply copy the coordinates, lower the y-coordinate a bit to keep the light's center outside the object's geometry, and then manually reproduce the y-coordinate in all the lights I need to be at the same height) :):):)

You can select multiple lights in Scene Editor and change the Y for them all at once.

jeric_synergy
12-16-2015, 05:09 PM
You can select multiple lights in Scene Editor and change the Y for them all at once.
A little bit off topic, and purely speculative:

Suppose you were using SAI Motion Options to adjust the vertical altitude of a bunch of lights, dozens. (I think Assign Tools would make this easy.)

Is there a way, analogous to SAVE TRANSFORMED, that you could "apply" the position of the light as derived from motion options, and remove the motion options. --I guess maybe baking???