Mon, Nov 25, 7:26 AM CST

Renderosity Forums / Poser - OFFICIAL



Welcome to the Poser - OFFICIAL Forum

Forum Coordinators: RedPhantom

Poser - OFFICIAL F.A.Q (Last Updated: 2024 Nov 24 8:11 pm)



Subject: Translate Props on their origin XYZ axes?


GRENDEL1 ( ) posted Thu, 24 December 2020 at 7:58 PM · edited Mon, 25 November 2024 at 7:24 AM

Does anyone know how to make a prop Translate on their origin XYZ axes, instead of the Global Axes? I'm trying to slide a door along it's own x axis instead of the world X axis...


ghostman ( ) posted Fri, 25 December 2020 at 2:37 AM

Open the Joint Editor and then rotate the Joint Centers to your liking.

"Dream like you'll live forever. Live like you'll die tomorrow."

Join PoserLounge Chat


GRENDEL1 ( ) posted Fri, 25 December 2020 at 2:45 AM

Thanks for the reply! I have already done that, The part still moves according to the word axes.. Not to the joint center... :(


ghostman ( ) posted Fri, 25 December 2020 at 2:47 AM

And you rotated both centers?

"Dream like you'll live forever. Live like you'll die tomorrow."

Join PoserLounge Chat


GRENDEL1 ( ) posted Fri, 25 December 2020 at 2:49 AM

Yup, give me a few minutes to open it back up. I'll put up a screenshot..


GRENDEL1 ( ) posted Fri, 25 December 2020 at 3:00 AM

When you dial xTran, it moves Left or right, not diagonal with the axis DoorTop1.png


GRENDEL1 ( ) posted Fri, 25 December 2020 at 3:01 AM

Door2.png


ghostman ( ) posted Fri, 25 December 2020 at 3:23 AM · edited Fri, 25 December 2020 at 3:24 AM

you need to move the end point crosshairs. In the editing tools you grab the Move tool and then you move them where you want them to be. For that door I would place them both in the middle if it's a sliding door. If it's a normal door i place the green cross at the hinges and the red at the door end. You also need to rotate the Orientation once you have them placed. Make sure you are in the front and side view mode when moving them.

"Dream like you'll live forever. Live like you'll die tomorrow."

Join PoserLounge Chat


GRENDEL1 ( ) posted Fri, 25 December 2020 at 3:31 AM

I don't understand.. Isn't that what I've done? Both Red and Green Axes are in the center of the door and rotated to the angle of the door..


ghostman ( ) posted Fri, 25 December 2020 at 3:38 AM

Orientation rotates the crosshairs so that the alignment goes in the right direction. So what you need to do it to rotate it so that it alignes with the door. From what i can see on yr screenshot you have rotated the Y-Rotation. Maybe that is what causing yr issue.

"Dream like you'll live forever. Live like you'll die tomorrow."

Join PoserLounge Chat


GRENDEL1 ( ) posted Fri, 25 December 2020 at 3:55 AM · edited Fri, 25 December 2020 at 3:55 AM

Ok.... Thanks for your help! I can't make it work. I cheated it with a Master Parameter... Seems like a simple thing that I can't get to work :( The door was part of a larger prop which I separated. It was created at the angle you see in the top view. Even when I use the Direct manipulation tool, the widget is properly aligned with the door at the right angle but dragging the handles doesn't drag it in the direction of the widget arrows. It still follows the global/world XYZ........... Merry Christmas by the way!


ghostman ( ) posted Fri, 25 December 2020 at 3:57 AM

Merry Xmas to you too. :)

"Dream like you'll live forever. Live like you'll die tomorrow."

Join PoserLounge Chat


GRENDEL1 ( ) posted Fri, 25 December 2020 at 4:03 AM

Maybe I'll try it in Poser 11... I've had a lot of problems with 12............


ghostman ( ) posted Fri, 25 December 2020 at 4:04 AM

Is this yr own model or someone else made it?

"Dream like you'll live forever. Live like you'll die tomorrow."

Join PoserLounge Chat


GRENDEL1 ( ) posted Fri, 25 December 2020 at 4:06 AM

Someone else.. From CGTrader....


adp001 ( ) posted Fri, 25 December 2020 at 7:14 AM · edited Fri, 25 December 2020 at 7:15 AM

Maybe you should set the vertices from the extracted geometry (the door) first to their zero position (around [0, 0, 0]).

Select your prop an run the following script to do that:

from __future__ import print_function, division
import numpy as np
import poser

SCENE = poser.Scene()
actor = SCENE.CurrentActor()
verts = np.array([[vt.X(), vt.Y(), vt.Z()] for vt in actor.Geometry().Vertices()])

verts_min = np.array([np.min(verts[:, 0]), np.min(verts[:, 1]), np.min(verts[:, 2])])
verts_max = np.array([np.max(verts[:, 0]), np.max(verts[:, 1]), np.max(verts[:, 2])])
verts_center = verts_min + (verts_max - verts_min) / 2.0
verts -= verts_center

for idx, vert in enumerate(actor.Geometry().Vertices()):
    vert.SetX(verts[idx][0])
    vert.SetY(verts[idx][1])
    vert.SetZ(verts[idx][2])

actor.SetOrigin(0, 0, 0)
actor.SetEndPoint(0, verts_center[1] - verts_max[1], 0)
actor.MarkGeomChanged()
for code in (poser.kParmCodeXTRAN, poser.kParmCodeYTRAN, poser.kParmCodeZTRAN):
    actor.ParameterByCode(code).SetValue(0)
SCENE.DrawAll()




GRENDEL1 ( ) posted Fri, 25 December 2020 at 1:09 PM

Hey thanks! Is that a python script? How would I run/execute that?


adp001 ( ) posted Fri, 25 December 2020 at 4:46 PM · edited Fri, 25 December 2020 at 4:47 PM

Yes, it's a script.

Copy & paste it into a file somewhere on your Poser drive. Give the file a name as you like it but with an extension ".py" (testscript.py for example).

From Posers Main Menu: File -> Run Pythonscript... (navigate to the saved file and click it)




GRENDEL1 ( ) posted Fri, 25 December 2020 at 4:49 PM

Thanks!


TwiztidKidd ( ) posted Fri, 25 December 2020 at 11:09 PM · edited Fri, 25 December 2020 at 11:19 PM

Easiest way... save the prop to your prop folder and load it back as a 2nd prop... they will both look as one prop unless you move one of them. Before you start moving anything, parent the 2nd prop to the 1st prop... now you have the 1st prop set as origin... so you can go ahead and translate or rotate the 2nd prop. Of course you can set the 1st prop to be invisible if you wish. Use the Grouping Tool to split a prop into two or more props.

Parented handrail 2 to handrail 1... and I moved handrail 2 forward... on the Z-axis... zTran

(oh and handrail 1 is parented to her abdomen)

PS: those are both 2-minute renders... the chrome reflection on the handrail is fake lol

Untitled.JPG

Untitled1.JPG



GRENDEL1 ( ) posted Sat, 26 December 2020 at 1:12 AM

Thanks for the reply! What does that get me? What I'm trying to do is move a sliding door sideways along it's X axis.. The door is rotated about 39 degrees in relation to the Y world axis. When I translate X the door, it follows the world x, not the door x....


TwiztidKidd ( ) posted Sat, 26 December 2020 at 1:25 AM · edited Sat, 26 December 2020 at 1:28 AM

Parent your door to itself... or to the frame of the door... or a small invisible prop placed in the center of your door opening... or on one side if you want it to swivel instead



GRENDEL1 ( ) posted Sat, 26 December 2020 at 1:43 AM

I see.. That should work, parenting to an invisible object.. What I want to know though is why I can't just get the door to follow it's own axis? Seems super basic, I don't know why it won't work...


TwiztidKidd ( ) posted Sat, 26 December 2020 at 1:45 AM · edited Sat, 26 December 2020 at 1:54 AM

Actually... DON'T parent the door to the frame of the door because your door is not parallel with the frame if I see well from your sketch...

Your door is floating right now... you need to set its origin if you want to move it in relation to something... Been using Poser since 1999 I don't have a door in my runtime... so I can show you... the door 😄



TwiztidKidd ( ) posted Sat, 26 December 2020 at 2:04 AM

... how this works I meant, please excuse my childish humor...



FVerbaas ( ) posted Sat, 26 December 2020 at 4:01 AM
Forum Coordinator

GRENDEL1 posted at 3:19AM Sat, 26 December 2020 - #4408580

....What I want to know though is why I can't just get the door to follow it's own axis? Seems super basic, I don't know why it won't work...

The own axis is normally used for internal purposes only: location of vertices and child actors. What you are looking for indeed is mathematically simple but it is difficult to implement in a GUI like Poser has without bloating the whole thing. Translation in an own axis adds 3 dials. Of course if translation is there where are rotation and scaling? That adds another 9 dials to the already crowded parameter palette.

Poser is truly GUI driven. It does not have the 'command line with graphical shortcuts for selected commands' we see in other 3D apps. The consequence is that the number of commands one can practically implement is limited and decisions must be made. This is the first time I hear someone asking for this so it would seem the function is not missed too dearly and the decision not to implement transformation relative to local axis was a good one.

It would be a qualifyjng candidate for the goodies box though.


FVerbaas ( ) posted Sat, 26 December 2020 at 4:19 AM · edited Sat, 26 December 2020 at 4:25 AM
Forum Coordinator

BTW: The (usually hidden by default) OriginX, OriginY and OriginZ dials move the centre of rotation and scaling: Schermafbeelding 2020-12-26 111349.jpg

In this example the cone is on x=0.0, y=0.0, z = 0.0 in universe coordinates. I moved the origin of the sphere 1.0 m (-0.381 PNU) in the positive x-direction and rotated the sphere around the Y-axis through that new origin by 63 degrees. As you can see it is moved off the z=0.0 line (the edge loop betwee the centre of the base of the cone and the green cross).


GRENDEL1 ( ) posted Sat, 26 December 2020 at 6:30 PM

Thanks for the explanation! Let me ask you this then; How would you move a sliding door, if the door was not square to the world Axes? I did it by creating a master parameter dial that moved it in both world x and z simultaneously. It's not perfect, but it works pretty well....


adp001 ( ) posted Sat, 26 December 2020 at 7:26 PM

GRENDEL1 posted at 7:18PM Sat, 26 December 2020 - #4408683

Thanks for the explanation! Let me ask you this then; How would you move a sliding door, if the door was not square to the world Axes? I did it by creating a master parameter dial that moved it in both world x and z simultaneously. It's not perfect, but it works pretty well....

Use Grouping and parent your door to this new grouping.

Grouping is something like an invisible prop. It has no polygons/materials, but all other attributes a prop has.

Move/twist the grouping in any direction you like. Parented props will go with it. The invisible box from this grouping is "the world" for all props parented to this grouping. Props directly dialed in X, Y or Z will translate in the correct directions.




FVerbaas ( ) posted Sun, 27 December 2020 at 8:57 AM
Forum Coordinator

GRENDEL1 posted at 8:29AM Sun, 27 December 2020 - #4408683

I did it by creating a master parameter dial that moved it in both world x and z simultaneously. It's not perfect, but it works pretty well....

That would be one way to go for it. It requires some trigonometric math and may not be robust to rotation of the parent object. A grouing like adp001 proposes is another, It requires setting the orientation of the axis of the group parallel to the rail. Easy to be done when the axis is in a world axis direction, May be more difficult when axis direction is different.
My quick and dirty solution would therefore be to add a constraint (special type of grouping) to the door with for target an object with centre at the other end of the rail (say the end doorpost). Works irrespectively of orienatation of the rail but of course you need to tune the location of the object origins.


dadt ( ) posted Tue, 29 December 2020 at 2:48 AM

Since you said that you had seperated the door I presume you used a modelling program.The answer is simple.

  1. Load your model and door into the modeller and combine into one object.

  2. Export the object.

  3. Separate the two again and move the door to the open position.

  4. Combine again and export as "open door".

  5. Load the first object into Poser.

  6. Load the "open door" as a morph target.

  7. You now have a morph which will slide the door in the right direction.


Privacy Notice

This site uses cookies to deliver the best experience. Our own cookies make user accounts and other features possible. Third-party cookies are used to display relevant ads and to analyze how Renderosity is used. By using our site, you acknowledge that you have read and understood our Terms of Service, including our Cookie Policy and our Privacy Policy.