Aligning an image map to an imported OBJ

Started by ethan, May 08, 2014, 05:08:20 PM

Previous topic - Next topic

ethan

Probably getting rusty here but does anyone know a straight forward way to get the position and size of an imported obj? I need that to position an image map to be used as a mask. The work flow i am using involves previs in maya and then importing Objs as reference along with maps created in PS. The maps from PS are intended to face in y with the same x and z size and position as the obj bounding box has.

Using this method rather than painting height maps as those still slow the scene down by 2X. They are much more stable now though.

Thanks and anyone who knows a trick please let me know.
-Ethan

jo

Hi Ethan,

The easiest way to figure this out is going to be look at the object dimensions in a 3D app. For some time I've been thinking about adding an object statistics readout to TG which gives the dimensions etc. of objects. You can do some stuff in TG but it's not always too easy for objects.

Obviously the position of the object is available in the object node, but that is of course the position of the origin and not, for example, the bottom left corner of it's bounding box. There are some ways to figure this out, although with variable accuracy. For example you can mouse over a bounding box corner in the 3D preview and see the position in the coordinate readout under the preview, or in the 3D Preview Location window that you can open from the View menu. If you wanted to use those values you can context click in the 3D Preview and choose Copy Coordinates from the context menu.

You can use the measure tool to find lengths. I thought there were some docs for that but I can't find them now :-/. Basically you click the Measure Mode button above the 3D Preview (yellow ruler icon) and then click on the two spots in the preview you want to measure between.

There is a caveat with both of these methods. These work using the location of the terrain or sky in the preview under the mouse. Basically the parts of the scene you see render in the preview and which get refined with higher detail levels. They do not work with imported objects and object polygons in the preview. It might work with some built in objects. Let's say you have an imported object and you wanted to measure between two bounding box corners which are shown against the sky. If you clicked on each corner using the measure tool you'd actually be measuring between the two points on the sky behind the bounding box. This would give a really massive length which was completely incorrect. Similarly plant models often have bounding boxes which extended beneath the terrain. If you were to try and measure between two bottom corners you would actually be measuring between two points on the terrain that are in a different position than the bounding box corners.

It is possible to manipulate an object into a situation where you could measure it using built in tools, but it could be quite awkward and not particularly accurate. Your best bet is really to check it in a general purpose 3D app or similar. It's definitely an area for improvement.

Regards,

Jo