|
|
"Newbie" <nomail@nomail> wrote:
> Hi, I'm new to POV-Ray so not good at it.
> I managed to import .obj into POV-Ray using PoseRay program but the imported
> object are so huge for my scene so I am trying to scale it down. I can't seem to
> find out how to scale the object down so it fit in my scene (since there like so
> much code in the geom.inc file). I tried to search around but can't seem to find
> anything. So could anyone guide me to scale/translate the imported .obj so I
> could use for my POV-Ray please?
>
> Thanks
To scale down an object you have to insert, for example: scale <0.5,0.5,0.5> in
the object section will scale down the object by 2.
In your main file scene you must have: #include geom.inc
and after you have to call the object that you need (ex: if your object's name
is FOO): object{FOO scale <0.5,0.5,0.5>}
Post a reply to this message
|
|
|
|
> Hi, I'm new to POV-Ray so not good at it.
> I managed to import .obj into POV-Ray using PoseRay program but the imported
> object are so huge for my scene so I am trying to scale it down. I can't seem to
> find out how to scale the object down so it fit in my scene (since there like so
> much code in the geom.inc file). I tried to search around but can't seem to find
> anything. So could anyone guide me to scale/translate the imported .obj so I
> could use for my POV-Ray please?
>
> Thanks
>
>
To scale down, you use a fractional value.
Using a negative value will mirror your shape on that axis.
Be warned that ALL scale and rotate are performed relative to the
origin: <0,0,0>.
If the object is NOT at/around the origin, scaling will move the object
radialy, and a rotation will cause it to orbit the origin.
If you want to adjust the size of an object of unknown size and location
to a known size and location, you can use:
#declare Min=min_extent(Object);
#declare Max=max_extent(Object);
to get the bounding box of Object.
Then, use:
#declare Object={Object translate -(Min+Max)/2}
to redefine your object around the origin.
Then:
#declare Max=max_extent(Object);
#declare Object={Object scale 1/Max}
to redefine your object to fit an unit box.
Now, Object fit exactly inside a box{<-1,-1,-1>,<1,1,1>}
You can now scale it to exactly the dimention you want.
Once properly scaled, you can rotate and translate it to where you
need/want.
Alain
Post a reply to this message
|
|