Snapping hotpoint to specific vertex?

WsCGWsCG Posts: 391
edited June 2017 in Carrara Discussion

Hello all,

So, I've tried finding information on this, but haven't been able to.

I'm looking to create some modular game envrironment assets with Carrara, stuff like dungeons, tunnels, etc. One of the key things of this is to set the origin/hotpoint of each piece to a spot that allows them to neatly connect together, like legos, when on a grid-snapped setup. This is generally done by placing them at one end, either in the center of the object, or to one side, etc; it depends on how the pieces are constructed and meant to fit together.

Anyway, in Carrara, I've found the "object to hotpoint" and "hotpoint to object" buttons. What I'm looking for is something like that, but would be more of a "hotpoint to selected" option, where the hotpoint would be moved to whatever vertex (ideally) is selected at the time.

I've googled and looked around in the program, but haven't seen anything that jumped out at me as allowing that.

If such an option doesn't exist outright, is anyone aware of any tricks or such to achieve the same result in Carrara as-is? I'm making progress in learning my way around it, but there's a lot I'm still not familiar with, so the answer might be "staring me in the face", but I don't recognize it.

Thanks in advance for any help/insight!

 

Post edited by WsCG on

Comments

  • WendyLuvsCatzWendyLuvsCatz Posts: 38,202

    you can move the hotpoint with the caps lock on to where you want

  • WsCGWsCG Posts: 391
    edited June 2017
    th3Digit said:

    you can move the hotpoint with the caps lock on to where you want

    Ah yes, I'm familiar with that, too; manually moving it.

    But it's not terribly accurate, and so you have to eye-ball it a lot. If you're trying to ensure assets fit together "snugly", and you don't see any seams/holes between pieces, it's necessary for the hotpoint/origin to be placed accurately. I suppose with enough finesse, you could get it there, but the ideal would be to have some way to have it 'snapped in place'.

    I'm thinking of trying to find some way to align assets to the grid in a way that I can snap the hotpoint that way. I'll have to give that a shot and see how it goes.


     

    Post edited by WsCG on
  • HeadwaxHeadwax Posts: 9,987

    could be of interest - not really answering question though :)

    Aligning Objects

    Carrara's relative alignment feature lets you arrange objects with respect to each other. You align objects on each axis separately. The selected axis is called the axis of constraint.

    Note When aligning many objects, you may want to start by aligning only two of them. Once the two objects are aligned, group them, then align a third object to the group. Continue to group and align objects until all are aligned.

    To align objects relative to each other:

    1. Orient the working box to set the axes of constraint you want to use. For information on orienting the working box, refer to Changing the Working Box.

    2. Select two or more objects. The first object you select becomes the anchor object.

    3. Choose Edit menu> Align. The Align dialog appears.

     

    The Align dialog.

    1. Click to choose the axis or axes of constraint. To choose more than one axis, Shift+click additional axes. If you choose all three axes, the second object will be embedded in the anchor object.

    2. Select the alignment command you want for this axis. You'll often use a different command on each axis.

    • Align sets the reference point of each object co-linear with the reference point of the anchor object along the axis of constraint.

    • Contact brings the Max of each object into contact with the Min of the next object along the axis of constraint.

    • Space puts the specified distance between the reference points of each object along the axis of constraint. Enter a spacing value.

    • Distribute aligns three or more objects at an equal distance from each other along the axis of constraint. By default, the first two objects you select serve as anchors, while the third and subsequent objects are the ones that move.

    1. Select the reference point on the objects. Object reference points that are grayed out are unavailable for the selected alignment command.

    • Hot Point specifies each object's hot point.

     

    Align with Hot Point as reference.

    • Minspecifies the side of each object's bounding box with the lower coordinate value along the axis of constraint.

     

    Align with Min as the reference

    • Center specifies the center of each object's bounding box.

     

    Distribute with Center as the reference.

    • Max specifies the side of each object's bounding box with the higher coordinate value along the axis of constraint.

     

    Space with Max as the reference.

    • Sides specifies the sides of the object's bounding box.

     

    Contact with Sides as the reference.

    1. If you want to add a buffer around the distribution of the objects, enter a value for the buffer in the Space field.

    2. Click OK.

    3. When you have achieved the alignment you want in one constraint axis, move on to the next one. (Return to step 3.)

    Alignment: Tutorial

    The following section is a step-by-step tutorial that shows you how to align three objects.

    To align the hot points of three objects:

    1. Use the object primitives pop-up menu to drag three simple objects into your scene.

     

    Three objects in the working box.

    1. Select all three objects by holding down the Shift key while clicking each object. The first object you select becomes the anchor object.

    2. Choose Edit menu> Align. The Align dialog appears.

    3. Click to choose both the X and Y axes.

    4. From the Alignment pop-up menu, select Align.

    5. From the Reference pop-up menu, select the Hot Point.

     

    The Align dialog with the specified settings.

    1. Click OK. The objects are aligned along the X and Y axes.

     

    The objects are aligned.

    Duplicating Objects

    Duplication creates a new object with the position, orientation, and scale attributes of the original object. Duplication is an efficient way of working and has a number of practical applications.

    For example, you could use this feature to build a DNA strand:

    1. Create the first base and place it between two helixes.

     

    Select the object.

    1. Then duplicate the base, raise the duplicate to the level where the next base would be located, and rotate it an appropriate amount.

     

    Duplicate and position the new object.

    1. Choose duplicate again and again until you have built a DNA strand.

     

    Replicate (repeat 1 and 2).

    Duplicated objects are multiple instances of a single master object. For more information, refer to Working with Master Objects.

    To duplicate an object:

    1. Select one object.

    2. Choose Edit menu> Duplicate. The duplicate occupies the same space as the original. Pull the duplicate away by dragging it or moving it numerically.

    3. Perform any number of position, orientation, and scale operations without deselecting the object.

    4. Choose Duplicate again.

    Each time you duplicate, the new copy receives the positioning, orientation, and scaling of the last duplicated object.

  • WsCGWsCG Posts: 391
    edited June 2017
    head wax said:

    could be of interest - not really answering question though :)

    Aligning Objects

    Carrara's relative alignment feature lets you arrange objects with respect to each other. You align objects on each axis separately. The selected axis is called the axis of constraint.

    ...

    Yeah, that looks like a very useful function - reminds me of working in Illustrator or Corel Draw with their alignment tools. But yeah, like you said, it doesn't really help my specific situation. 

    I have a feeling that, if it's to be done in Carrara at all, it's going to involve use of snapping to the grid and making sure the objects are modeled strictly on the grid (which they should be anyway, for modular environments). Then I should be able to snap the hotpoint, also on the grid, exactly where I need it.

    Post edited by WsCG on
  • PGrePGre Posts: 95

    Open the object in the vertex modeler

    Select the entire object and center it (Properties panel)

    Deselect the object and then select the vertice you want to align with the hot point

    Write down the X,Y,Z coordinates of said vertice (Shown in Model Tab)

    Select the entire object again

    Enter the coordinates you copied down from the Model Tab into the Properties Panel with the signs reveresed (for example if you copied down 10,10,10 you would enter that as -10,-10,-10

    The object will now be positioned so the vertice you selected now sits at 0,0,0

    When you switch back to the assembly room the hot point should be aligned at the desired vertex on the object

    if it isnt just use the Center Hot Point to Object option

  • 3DAGE3DAGE Posts: 3,311

    HI Mitovo :)

    If you just want to move two objects together so that they are in contact,. you can switch on (collision detection) and move one object until it touches the other and stops.

    Each model's Hot point, is the central rotation and movement axis point,. rather than a physical part of the model.

    There are many ways to arrange objects in carrara,. such as replicators,. or distribution maps,. or groups,. or Poses, which save the position of an object,.

    You can select an object,. (hold shift) and select another object,. then go to EDIT / Align ,. then select the options for how you want to align those two objects.

    use Collision detection,to move two objects together until they're touching.  ..then remember to turn collision detection off again,. it can slow things down.

     

  • WsCGWsCG Posts: 391
    3DAGE said:

    HI Mitovo :)

    If you just want to move two objects together so that they are in contact,. you can switch on (collision detection) and move one object until it touches the other and stops.

    Each model's Hot point, is the central rotation and movement axis point,. rather than a physical part of the model.

    There are many ways to arrange objects in carrara,. such as replicators,. or distribution maps,. or groups,. or Poses, which save the position of an object,.

    You can select an object,. (hold shift) and select another object,. then go to EDIT / Align ,. then select the options for how you want to align those two objects.

    use Collision detection,to move two objects together until they're touching.  ..then remember to turn collision detection off again,. it can slow things down.

     

    Oh, indeed.  I'm good with moving and using the hot point for stuff related to Carrara. It's like the 'origin' in Blender, and I'm sure it's called other things in other programs. Blender, in particular, has an option to "move origin to selection"; I was looking for a way to get the same result in Carrara.

    The reason I want to snap it to a specific vertex's location is for the creation of modular game assets - like tunnel pieces, walls, floors, etc. Since the origin/hotpoint is what is "snapping" to the grid you want it located in a spot on all your objects that will allow them to snap together seamlessly. That's what I'm trying to achieve in that particular case.

    In this video here, at around 2:20, you can see him showing/explaining the process. Although he does it a bit differently than I learned... he moves the geometry to get the origin/hotspot where he wants it. I learned to move the origin to the selected vertex. I guess his way works fine, too, as long as you're snapping to a grid and the geometry is aligned with it. But anyway... there ya go.

  • 3DAGE3DAGE Posts: 3,311
    edited July 2017

    HI :)

    You can manually place the object hotpoint anywhere on the model,. but that should only effect the objet in the program,. it should have nohing to do qwith an exported objects centre point in another software

    Carrara has automatic Hotpoint to object / Object to hotpoint,.positioning,. and you have a manual ability to reposition and lock in position.

    Caps lock (On/Off) allows you to manually move the hotpoint relative to the object,. or move the object and not the hotpoint (as in the blender clip)

    You can also use the numeric values on the "Motion" tab,. to manually type in values for X,Y,Z ,..to position the hotpoint.

    so,. you should be able to place your hotpoint anywhere you need it,.

    what you can't do in Carrara is to select a "Vertex",. and snap the object's hotpoint to that vertex,. simply because it's not editable geometry when you see the hotpoint

    The object's Hotpoint is only visible in the Assembly room,. but not in the Vertex editor,. or in edit mode in the assembly room.

    In the verex modeller,. the object's axis is relative to the "zero" point of the working grid.

    If you created a model in one corner of the Vertex editor "working grid" and returned to the assembly room,. you'll notice that the obects hotpoint is not where the object is,. it's at the centre of the modeling space where the object was created.

    perhaps thats what you're looking for,.

    Normally the objects centre point should be either the physical centre of the object,. or the World position of the object when it was exported.

    Try importing an exported object where you've offset the objects hotpoint,. see if that becomes the imported objects centre.

    I would assume,. if you had a cube, in a game program, you should be able to set and adjust the positioning of multiple cubes within that program irrespective of the origin point of the cube model.  by knowng the dimentions of the model,.. you should be able to set options for repeating clones within that software

    I'm making some asumptions about what's possible in game making programs since i've no experience in either playing or making games.

    maybe someone with some experience in game construction could offer more help on that aspect,.

    Hope that makes some sense,. :)

    Post edited by 3DAGE on
  • Hi Mitovo,

    I've made a plugin that should help, if you still need it.  In my Transforms Package I have a number of helpful scene commands created for the purpose of making it easier to move objects around with precise offsets.  I was able to use the code from my Jump Object and Jump Hot Point To commands with a small change to make a new Jump To Vertex command.  You can download it from my Laboratory and try it out and get the Transforms Package too if you don't already have it.

    Once installed the plugin can be found in the Assemble room under the Edit menu.  It has two modes, one that will move the object to the selected vertex and another to keep the object where it is and only move the hot point as you required.  The object to move doesn't have to be the current selection so you need to re-select it in the dialog if you are moving the vertex object's own hot point.  I'll do an update soon which allows for automatic self selection and can make any other changes and options anyone can think of.

    I'd normally plan ahead when making kit pieces to have the vertex object's origin in a useful place to help join them up later but this tool will allow for that to be changed more easily without needing to move any geometry or make calculations.

  • HeadwaxHeadwax Posts: 9,987

    Hi Mitovo,

    I've made a plugin that should help, if you still need it.  In my Transforms Package I have a number of helpful scene commands created for the purpose of making it easier to move objects around with precise offsets.  I was able to use the code from my Jump Object and Jump Hot Point To commands with a small change to make a new Jump To Vertex command.  You can download it from my Laboratory and try it out and get the Transforms Package too if you don't already have it.

    Once installed the plugin can be found in the Assemble room under the Edit menu.  It has two modes, one that will move the object to the selected vertex and another to keep the object where it is and only move the hot point as you required.  The object to move doesn't have to be the current selection so you need to re-select it in the dialog if you are moving the vertex object's own hot point.  I'll do an update soon which allows for automatic self selection and can make any other changes and options anyone can think of.

    I'd normally plan ahead when making kit pieces to have the vertex object's origin in a useful place to help join them up later but this tool will allow for that to be changed more easily without needing to move any geometry or make calculations.

     

    wow, thanks for all your work on Carrara

     

  • Samuel S.Samuel S. Posts: 322
    3DAGE said:

    HI Mitovo :)

    If you just want to move two objects together so that they are in contact,. you can switch on (collision detection) and move one object until it touches the other and stops.

    Each model's Hot point, is the central rotation and movement axis point,. rather than a physical part of the model.

    There are many ways to arrange objects in carrara,. such as replicators,. or distribution maps,. or groups,. or Poses, which save the position of an object,.

    You can select an object,. (hold shift) and select another object,. then go to EDIT / Align ,. then select the options for how you want to align those two objects.

    use Collision detection,to move two objects together until they're touching.  ..then remember to turn collision detection off again,. it can slow things down.

     

    I agree and collision detection has worked for me in the past.

  • PGrePGre Posts: 95

  • wgdjohnwgdjohn Posts: 2,634

    @Sparrowhawke3D  Thanks for all your plug-ins and your continued work that benefits the entire Carrara Community.

  • DartanbeckDartanbeck Posts: 21,551

    I often need to have specific hot points for speed in (accurately) manipulating things around a scene.

    My preferred method (so far) is to use Target Helper objects, since their so very null and accurate in placement.

    Here's an example:

    I have spent some time placing the object in question, but now I want the hot point to be over there, using that other thing.

    So I Insert a Target Helper and use Align to send it to where I want my hot point to be

    Then I parent the item to the Target Helper object

    So now, instead of using the actual object's hot point (which is still intact), I use the Target Helper it's parented to.

    Works like a charm. I even recall (but not the specifics, off hand) then using second and even third Target Helpers to add even more hot points to the object. Of course, I also rename the Target Helpers to their assigned use, as well as reducing theire visual size to minimum, often also giving them their own unique color.

    I use those darned handy little things all the time - often to just delete them again after I'm done using them.

  • DartanbeckDartanbeck Posts: 21,551
    edited July 2017

    BTW, Mitovo, Love your action shot Avatar!

    I'm loving my new e-kit! It's no comparison to my acoustic kit, for sure... but for gigging out, I just love it! 

    It took a while to get set up how I want it to sound and feel, but now it just thunders! Amazing how many ways it can be set up for velocity sensitivity settings and what they do for the sound, etc., and this one uses samples from a drummer playing quietly when hit softly, a drummer playing loudly when hit hard, and several levels in between... I just love it!

    I still haven't figured out how to solo with it, like I can with my acoustics. Soloing is such a dynamic thing, making so many different sounds from the same drum.

    01a.jpg
    1688 x 1201 - 1M
    Post edited by Dartanbeck on
  • DartanbeckDartanbeck Posts: 21,551

    I often need to have specific hot points for speed in (accurately) manipulating things around a scene.

    My preferred method (so far) is to use Target Helper objects, since their so very null and accurate in placement.

    Here's an example:

    I have spent some time placing the object in question, but now I want the hot point to be over there, using that other thing.

    So I Insert a Target Helper and use Align to send it to where I want my hot point to be

    Then I parent the item to the Target Helper object

    So now, instead of using the actual object's hot point (which is still intact), I use the Target Helper it's parented to.

    Works like a charm. I even recall (but not the specifics, off hand) then using second and even third Target Helpers to add even more hot points to the object. Of course, I also rename the Target Helpers to their assigned use, as well as reducing theire visual size to minimum, often also giving them their own unique color.

    I use those darned handy little things all the time - often to just delete them again after I'm done using them.

    So basically pretending that the Target Helper Object is the Hot Point, and Aligning It where I need the accurate control, then drag the object that needs that hot point onto the THO to parent it. New hot point, just like that! Unparent when/if done! ;)

  • DartanbeckDartanbeck Posts: 21,551

    The beauty I've found in this method is that there is no need to manipulate anything after the Align!

    We don't care where the Target Helper is, visually. So we just Align it to whatever we need to align to, then parent the other thing to it.

    We can do this over and over, too. When we un-parent the object from the Target Helper, it stays put. Then perform whatever aligning we need, then parent again.

Sign In or Register to comment.