HeroEngine Forums
Welcome, Guest. Please login or Register for HeroCloud Account.

Author Topic: [Resolved] Problem & Question about grid & snap  (Read 2317 times)

gaarzen

  • General Accounts
  • *
  • Posts: 99
    • View Profile
[Resolved] Problem & Question about grid & snap
« on: Jun 23, 12, 03:52:11 PM »

Hey guys,

1. I'm having an odd problem defining "Grid Snap" in Maya with the "Asset Tools".
I managed to have a tiled set object snap to 0.25, however I later on wanted to change that to 0.1 though it doesn't matter what I do, the object remains at 0.25 in HE.
I tried completely deleting the object from the HE directory, from HE's assets and from the library and then re-uploaded the object with the new settings with the Repository though it still auto snaps to 0.25 and I have to manually override it in HE.
I made sure the new file is being saved to the correct folder in the local HE directory (ArtDepot) and made sure it is being synchronized correctly in the Repository.

Also, "Edit Asset Names" sometimes works and sometimes doesn't.. in some cases I enter a name, it can be a combination of random letters and then setting settings to selection and nothing happens, the object is not being renamed.

2. I understand HE goes by real life units and that synchronizes well with Maya. However, I have no idea what is a size of 1 unit in HE while for me in maya 1 unit = 1 Meter and 0.1 of a unit is 1 decimeter.
if I want to have objects snapped in 1 meter intervals or in 1 decimeters in HE what should I be doing?

Thanks a lot for any help !
« Last Edit: Oct 26, 12, 03:39:43 PM by HE-Cooper »
Logged

HE-Cooper

  • *****
  • Posts: 2221
    • View Profile
Re: Problem & Question about grid & snap
« Reply #1 on: Jun 25, 12, 06:56:32 AM »

You would set up your assets to have their centroid be in a position such that when you set the snap distance in the engine the objects will line up correctly.
Logged

gaarzen

  • General Accounts
  • *
  • Posts: 99
    • View Profile
Re: Problem & Question about grid & snap
« Reply #2 on: Jun 25, 12, 08:15:09 AM »

You would set up your assets to have their centroid be in a position such that when you set the snap distance in the engine the objects will line up correctly.
Hi Cooper,
If you mean that centroid is the pivot then I have it placed in correctly in a spot that should snap to other parts.
However, because I have the grid snap set to 1 unit in Maya (meaning 1 meter) it works fine though if I set the snap to 1 unit in HE the snapping is much further away. What distance is 1 unit in HE? I couldn't find in the docs.

FI-ScottZ

  • General Accounts
  • *
  • Posts: 1407
    • View Profile
    • Forever Interactive, Inc.
Re: Problem & Question about grid & snap
« Reply #3 on: Jun 25, 12, 09:22:21 AM »

From my experience, it seems that 1 unit in Hero is 10 meters.
Logged
Scott Zarnke
Lead Programmer, Visions of Zosimos
CTO, Forever Interactive, Inc.

HE-Cooper

  • *****
  • Posts: 2221
    • View Profile
Re: Problem & Question about grid & snap
« Reply #4 on: Jun 25, 12, 09:28:59 AM »

Yes, world units are 10 meters. Most everything else should just be in meters. I haven't used snapping in a long time, so it's always possible something is off, but I'm trying to understand exactly what your current problem is.
Logged

gaarzen

  • General Accounts
  • *
  • Posts: 99
    • View Profile
Re: Problem & Question about grid & snap
« Reply #5 on: Jun 25, 12, 01:03:53 PM »

Thanks for the replies,
Now that I know it is 10 meters I was able to fix the fixed snapping to 0.1 (1 meter), in order to do that I had to remove the HE Material because with it it didn't save and Asset Tool changes and only after I was done re-assign the material.

I have 3 other tiny question which I think are relevant so I'll just ask them here.

1. For some reason when I put set tiles and duplicate them over and over sometimes the collision breaks.. that also sometimes happens when I change the properties of a tiled object.
I've attached a video in which I duplicated the same test wall part over and over and then ran with my character right through a piece although I couldn't do it with other pieces.
A small video of the problem:
http://www.youtube.com/watch?v=IkgGh5YlnAc

2. For some reason in order for me to select a tile piece I had to click to the right of the object instead of simply on it..?

3. Is there a way to lock the default floor? I find it pretty hard to select objects in the set without selecting the floor instead, I tried locking it in its properties though I could still select it.. I also tried hiding it and it wouldn't hide.

Thank you so much !! :D
« Last Edit: Jun 25, 12, 05:33:14 PM by gaarzen »
Logged

HE-BENNETT

  • HeroEngine
  • *****
  • Posts: 559
    • View Profile
Re: Problem & Question about grid & snap
« Reply #6 on: Jun 25, 12, 01:09:04 PM »

Hmmm, so you're saying in Maya, any changes you make in the asset tools window to an object that already has a Hero material assigned are not saved?

hmmm.......
Logged

gaarzen

  • General Accounts
  • *
  • Posts: 99
    • View Profile
Re: Problem & Question about grid & snap
« Reply #7 on: Jun 25, 12, 02:35:42 PM »

Hmmm, so you're saying in Maya, any changes you make in the asset tools window to an object that already has a Hero material assigned are not saved?

hmmm.......
Well I'm not sure.. if I modify the object with the HE material with different snapping attributes the new settings seemed to stick in Maya but when I tried exporting the object to HE the settings were the old ones.. The second time I tried changing the material back to Lambert before applying the settings and giving it the HE material again afterwards and then exporting the object to HE and that seemed to fix the problem.. Not positive what exactly the trigger is but something causes those settings not to stick in some occasions although every export is over the same files in the ArtDepot and are being synchronized with the Repository every time.

HE-Cooper

  • *****
  • Posts: 2221
    • View Profile
Re: Problem & Question about grid & snap
« Reply #8 on: Jun 25, 12, 03:40:32 PM »

All 3 of your questions are actually the same problem funny enough. The physics representation of your models is not in the same place as the models themselves. They are offset to the right. That's why your models are rotating around a centroid, and why you have to click to the right of them, and why you are finding it hard to select your models instead of the floor, because selecting and collision uses the same physics shape.

It's been a long time since I've looked at it, if you export those same assets with the centroid in the middle instead of at an edge, I'd be interested to know how much of your problem goes away.

The stuff not getting updated when exported, that is both something bennett will have to help with, but also has me wondering if something else isn't getting updated, and so your physics meshes aren't updating, or something odd. But anyways, try the "bone" in the center of those walls first and see what happens.
Logged

gaarzen

  • General Accounts
  • *
  • Posts: 99
    • View Profile
Re: Problem & Question about grid & snap
« Reply #9 on: Jun 25, 12, 05:45:56 PM »

All 3 of your questions are actually the same problem funny enough. The physics representation of your models is not in the same place as the models themselves. They are offset to the right. That's why your models are rotating around a centroid, and why you have to click to the right of them, and why you are finding it hard to select your models instead of the floor, because selecting and collision uses the same physics shape.

It's been a long time since I've looked at it, if you export those same assets with the centroid in the middle instead of at an edge, I'd be interested to know how much of your problem goes away.

The stuff not getting updated when exported, that is both something bennett will have to help with, but also has me wondering if something else isn't getting updated, and so your physics meshes aren't updating, or something odd. But anyways, try the "bone" in the center of those walls first and see what happens.
Thanks for the reply Cooper !
I tried centering the pivot and that seemed to fix the problem but cause another.
Now with the pivot centered I can select the objects well and the collision works, however I can't have the pivot centered in all objects and my best bet is to set it on object endings where I would like for it to snap because I'll be making objects in various sizes and shapes.
For instance, if I currently have a 2 Meter wall tile I can have the pivot in the middle but if I'll also have a 1 Meter floor tile I can't have the pivot of it in the center because then it would be in the middle of the 2 meter wall and I won't be able to put 2 floor tiles in front of a 2 meter wall.. what should I do in similar cases? I would assume the collision and selection representation is geometry oriented?

And the problem I've encountered is that for some reason although in Maya objects tile perfectly, in HE there's a slight offset between a certain tile I made to another.
I made a small video showing wall tiles being tiled just fine and a corner tile having a slight gap for no apparent reason. It shows I rotated the corner tile just for the test and also I check it's snapping to the wall tile perfectly from within Maya though after I export it to HE the corner tile indeed rotates but there's still a gap?

The video:
http://www.youtube.com/watch?v=drZtys6Jyiw

Thanks and sorry for taking so long into this issue !

HE-Cooper

  • *****
  • Posts: 2221
    • View Profile
Re: Problem & Question about grid & snap
« Reply #10 on: Jun 25, 12, 06:24:19 PM »

I think if you think very hard you'll come up with how to setup your assets and grid to overcome the center bone. Like make your grid half the size it is now, but keep your assets the same size, that way 2 1m tiles snap infront of 1 2m wall piece, or use 3 meter walls and 1.5 meter floor tiles, keeping a 1 meter snap grid. The world is your oyster. :-)
Logged

gaarzen

  • General Accounts
  • *
  • Posts: 99
    • View Profile
Re: Problem & Question about grid & snap
« Reply #11 on: Jun 25, 12, 06:56:37 PM »

I think if you think very hard you'll come up with how to setup your assets and grid to overcome the center bone. Like make your grid half the size it is now, but keep your assets the same size, that way 2 1m tiles snap infront of 1 2m wall piece, or use 3 meter walls and 1.5 meter floor tiles, keeping a 1 meter snap grid. The world is your oyster. :-)
You're right !:D
I was also able to fix the previous problem.
Thanks for all of your help !!

HE-BENNETT

  • HeroEngine
  • *****
  • Posts: 559
    • View Profile
Re: Problem & Question about grid & snap - Fixed
« Reply #12 on: Jun 26, 12, 09:00:36 AM »

I'll take a look at the issue with the Maya Asset tools and see what's happening there.  BTW, nice wall assets :)
Logged

gaarzen

  • General Accounts
  • *
  • Posts: 99
    • View Profile
Re: Problem & Question about grid & snap - Fixed
« Reply #13 on: Jun 26, 12, 09:50:37 AM »

I'll take a look at the issue with the Maya Asset tools and see what's happening there.  BTW, nice wall assets :)
Thanks.. these were just made in a couple of minutes for the test ;D