|
|
Hi. I have previously asked for help cutting a 3D model into slices.
The solution did unfortunately not always work. Only in simple 3D models.
Here is what I have done:
#declare MinZ = min_extent(_151stan_toon_).y;
#declare MaxZ = max_extent(_151stan_toon_).y;
#declare Height = MaxZ - MinZ;
//==================================================
intersection {
object{
_151stan_toon_
double_illuminate
}
plane{
y,MinZ+(frame_number/final_frame)*Height
pigment{
color rgbf <1,1,1,1>
}
}
}
The rest of the pov file was generated using poseray.
The object name is _151stan_toon.
I want to cut the model into slices similar to ct scans.
(Vertical slices.)
As far as I know all I want to do is get the intersection of the model and
the plane. I made the plane transparent so that I can see the original
colour of the
model.
What happens is that it does cut it into slices but for some reason it
keeps on creating the same slice after a while instead of going further up
the model.
Any help will be appreciated greatly.
Post a reply to this message
|
|
|
|
LikeNoOther wrote:
> What happens is that it does cut it into slices but for some reason it
> keeps on creating the same slice after a while instead of going further up
> the model.
Hmm, the code looks reasonable to me. If you just
render the plane, does it move as expected?
Post a reply to this message
|
|
|
|
"LikeNoOther" <eug### [at] gmailcom> wrote in message
news:web.4704b40aeb8279c96e4edffd0@news.povray.org...
> Hi. I have previously asked for help cutting a 3D model into slices.
> The solution did unfortunately not always work. Only in simple 3D models.
>
> Here is what I have done:
>
> #declare MinZ = min_extent(_151stan_toon_).y;
> #declare MaxZ = max_extent(_151stan_toon_).y;
> #declare Height = MaxZ - MinZ;
> //==================================================
>
> intersection {
> object{
> _151stan_toon_
> double_illuminate
> }
>
> plane{
> y,MinZ+(frame_number/final_frame)*Height
>
> pigment{
> color rgbf <1,1,1,1>
> }
>
> }
> }
>
> The rest of the pov file was generated using poseray.
> The object name is _151stan_toon.
> I want to cut the model into slices similar to ct scans.
> (Vertical slices.)
> As far as I know all I want to do is get the intersection of the model and
> the plane. I made the plane transparent so that I can see the original
> colour of the
> model.
>
> What happens is that it does cut it into slices but for some reason it
> keeps on creating the same slice after a while instead of going further up
> the model.
>
> Any help will be appreciated greatly.
>
Hi Eugene,
You could use the #debug directive to write the values out into the message
stream so that you can trace the problem.
For example, you could add the following lines to your code to look at the
result of the height calculation, then home in on parts of the calculation
to see which bits are causing you trouble.
#debug concat("Frame Number: ",str(frame_number,3,3),"\n")
#debug concat("Final Frame: ",str(final_frame,3,3),"\n")
#debug concat("Height Calculation:
",str(MinZ+(frame_number/final_frame)*Height,3,3),"\n")
Also, while you want to focus on the message stream you can cut the render
size right down so that each frame renders quicker.
Regards,
Chris B.
Post a reply to this message
|
|
|
|
LikeNoOther nous apporta ses lumieres en ce 2007/10/04 05:36:
> Hi. I have previously asked for help cutting a 3D model into slices.
> The solution did unfortunately not always work. Only in simple 3D models.
>
> Here is what I have done:
>
> #declare MinZ = min_extent(_151stan_toon_).y;
> #declare MaxZ = max_extent(_151stan_toon_).y;
> #declare Height = MaxZ - MinZ;
> //==================================================
>
> intersection {
> object{
> _151stan_toon_
> double_illuminate
> }
>
> plane{
> y,MinZ+(frame_number/final_frame)*Height
>
> pigment{
> color rgbf <1,1,1,1>
> }
>
> }
> }
>
> The rest of the pov file was generated using poseray.
> The object name is _151stan_toon.
> I want to cut the model into slices similar to ct scans.
> (Vertical slices.)
> As far as I know all I want to do is get the intersection of the model and
> the plane. I made the plane transparent so that I can see the original
> colour of the
> model.
>
> What happens is that it does cut it into slices but for some reason it
> keeps on creating the same slice after a while instead of going further up
> the model.
>
> Any help will be appreciated greatly.
>
>
>
I don't see anything wrong with your code, only some naming inconsistencies,
like MinZ and MaxZ for a vertival movement where MinY and MaxY would have been
more straightforward.
--
Alain
-------------------------------------------------
Stay out of my head, its a bad neighborhood.
Post a reply to this message
|
|