Well be very carefull on what you instantiate. Mayas instancing behavior system is pretty straightforward, but only if you know how maya operates the dag. Most people don't exactly think about how it works for second. Its not that its hard to explain, i could probably explain it in 1 hour to a 12 year old and they could handle it easily. It is however considerably harder to explain it to somebody who allready went past this explanation out of right sequence. Reason is that it would mean you'd have to rethink mostly everything you know, and that makes you resist the explanation VERY VERY much.
Its fundamental, you can live without knowing this but cant progress beyond a certain point. Its also wy feezing allmost always goes berserk on you.
QUOTE
I know when it comes to instancing geomentry it's preferred to have the objects at origin.
You know wrong, theres no such preference from mayas point of view nor mine. But the reason it works is that your infinitely more likely to do it right by mistake this way. Hence its taught out that way, its easy it doesn't rely on making you understand anything. Like i said its not hard to explain its just very hard to resist once you have built your own world view because it would mean you have to rethink most of everything you know.
SO HERE GOES:
Objects dont exist in maya, just packets of dag nodes. What you precieve as a object is actually a transform that is a parent of a shape. (other more worrying object like structures do exist). When you isntance maya takes all nodes UNDER the dag node being selected an pushes them off to a different part of the dag tree.
So if you have:
transformA -> transformAB ->shapeABC
transformB
And instantiate trasformA under trasformB you get
CODE
transformA -> transformAB ->shapeABC
transformB-> transformAB ->shapeABC
This illustrates how it works. A more likely scenario sis that you instance transformAB to be under transformB and get:
CODE
transformA -> transformAB ->shapeABC
transformB->shapeABC
This leads many a artist into perplexing situation. It doesnt work like their world view tells them it OUGHT to work. They are missing a fundamental cornerstone of how transforms and 3d works, you can ignore it for a long time but eventually it will catch you up. Now i cant explain to you how it works up front youd resist it very much (i know form experience, trying to do this for ages, either people get it outright or they will take a loong time to learn it form down up).
WHY? Well the computer is saving a lot of computational time in maneuver that will soon hopefully make sense to you. Let us investigate what the shape is first.
A shape is a array of vectors that describe points and the physical connectivity of those points. Forget the connectivity data for the moment it doesn't come into play. So basically the shape is a number of triplets in long chain of succession:
1,0,0 0,1,0 ......
and so on for as may control points as you have in the object. This array of vectors only make sense if you know where they are all being measured from. This reference frame is called the origin of the object. Now for most people the problem starts here. People instinctively THINK that the handle that manipulates the object is the center of it, its not! So what you get is:
pivot is not equal to the origin of measure
Well why the hell not? I admit it would be easy it if it was. However there's other things to consider. Let me make a analogy, imagine you'd take your coffeepot n draw points on it, then take one point make it red and define it to be 0 0 0, then measure all other points based on this. Now then imagine up picking up the coffeepot by the spout, now it would be a bit tedious and error prone to measure all the points form where you just picked up the coffepot, just because you happen to be currently handing it form there. You could reuse the values if you measured the difference between where you hold and where you had the origin This is what maya does it keeps a complimentary information on where you pick the thing up from, now since its decoupled it can be easily moved around without fear of damaging the data below. It is also way lighter. And i don't know about you but my pivots tend to move all the time.
Now the shape doesnt know any of this, its the transforms job so what you get is object placed at where its ACTUAL center is. So whats the error you see, its simply the difference of where you think the coordinate sytems center is wersus where it is actuallylocated. Simply your assumption is wrong.
QUOTE
Was wondering if there is any way to counter act this?
Yes sure, just put 3 extra transforms underneath and instance one level lower. Or (Now this is where you DO use freeze, not in to make values nice and zero) just do strategic freeze at some point so your coordinate systems match up with what you think they ought to be.