|
|
badjanah nous apporta ses lumieres en ce 2008/01/03 08:12:
> I need to insert into povray scene some exported 3ds objects. Exported
> objects are complex, have many polygons and vertex. How automatically
> calculate object bounding box for scaling to needed size?
>
>
>
Get PoseRay (Free).
Import the 3DS object into PoseRay.
Here, you can rotate, translate and rotate the object if you wish.
Export the object to POV-Ray. This will create a file (.inc) that POV-Ray can
use. That file will contain a mesh version of your object. You may also have
some other files containing the materials to be used with the obect.
#include the file(s) from PoseRay into your scene.
Once the object is available to POV-Ray, you can use min_extent() and
max_extent() to retreive the actual bounding box of that object and use that to
scale it.
As the imported object is a mesh, you can use 1000's of it without problem.
--
Alain
-------------------------------------------------
Advertisements contain the only truths to be relied on in a newspaper.
Thomas Jefferson
Post a reply to this message
|
|
|
|
Alain wrote:
> badjanah nous apporta ses lumieres en ce 2008/01/03 08:12:
>> I need to insert into povray scene some exported 3ds objects. Exported
>> objects are complex, have many polygons and vertex. How automatically
>> calculate object bounding box for scaling to needed size?
>>
>>
>>
> Get PoseRay (Free).
> Import the 3DS object into PoseRay.
> Here, you can rotate, translate and rotate the object if you wish.
> Export the object to POV-Ray. This will create a file (.inc) that
> POV-Ray can use. That file will contain a mesh version of your object.
> You may also have some other files containing the materials to be used
> with the obect.
>
> #include the file(s) from PoseRay into your scene.
>
> Once the object is available to POV-Ray, you can use min_extent() and
> max_extent() to retreive the actual bounding box of that object and use
> that to scale it.
> As the imported object is a mesh, you can use 1000's of it without problem.
>
Also, the #include file created by PoseRay will include (as comments)
the minimum and maximum x-, y-, and z-extents of the object, which *may*
save you a step or two, at least in deciding precisely how to deal with
the object.
--Sherry Shaw
--
#macro T(E,N)sphere{x,.4rotate z*E*60translate y*N pigment{wrinkles scale
.3}finish{ambient 1}}#end#local I=0;#while(I<5)T(I,1)T(1-I,-1)#local I=I+
1;#end camera{location-5*z}plane{z,37 pigment{granite color_map{[.7rgb 0]
[1rgb 1]}}finish{ambient 2}}// TenMoons
Post a reply to this message
|
|