POV-Ray : Newsgroups : povray.general : centered and resized model question put differently : Re: centered and resized model question put differently Server Time
29 Jul 2024 22:28:37 EDT (-0400)
  Re: centered and resized model question put differently  
From: clipka
Date: 1 Jun 2010 10:19:43
Message: <4c0516ff$1@news.povray.org>
Am 01.06.2010 09:39, schrieb optima:

> thru C# though, I cannot position models in povray as I want them to. I divide a
> models xyz dimensions by 2 in final translation to get the center of models. But
> even though I use same code in povray and export models with same settings from
> 3ds max and then poseray, models show up in slightly different positions when
> rendered. (actually they almost always show up by half the distance of x or y or
> z axis/size of model)

I think I still haven't understood your workflow yet.

In case you're using min_extent and max_extent in POV-Ray, be aware that 
these functions do /not/ give you the dimensions of the /object/, but 
rather its /bounding box/, which - for simplicity of the math and 
algorithms - may be larger than the object, and the center of the 
bounding box may be different from the center of the object.

> Is it right that I divide models xyz dimensions by 2 for positioning purposes?

I'd suggest to not do that, unless the models are positioned way off the 
center. Any additional step in your workflow /might/ contribute to the 
issue, so to narrow it down, you should skip any step that is not 
/really/ necessary.

I'd also recommend checking the placement of objects in Poseray already, 
as the placement will remain unchanged by the process of exporting to 
POV-Ray and rendering.

A 3rd-party 3D viewer (e.g. Deep View) or modeller (e.g. Wings 3D) might 
help you find out whether the exported files are still ok (indicating a 
problem in the Poseray import) or not (indicating bogosities in the 3DS 
max export).

> PS: I create a box in 100 cm xyz in max then I fit the model into this box  in
> xyz. I do this so that I can resize the models to a specific dimension
> programatically. Could this be the culprit?

I think this really is a question for the 3DS max community. 
Theoretically, /anything/ related to metric vs. imperial dimensions, and 
anything involving transformations, has /some/ potential of messing up 
things; to narrow down the issue any further than this, you'll need to 
ask people who are very familiar with 3DS max.

I guess the whole issue will boil down to either a Poseray import 
problem or a 3ds max export problem. I honestly suspect the latter, and 
in that case we most likely can't help you with that here in any way.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.