 |
 |
|
 |
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Hello everyone,
I am having clipping image issues with the povray scene I am currently working
on and I would sincerely appreciate the help.
The scene I am working on represents a spacecraft in "space", where the earth
was placed at the center of povrays coordinate system and the sun was at the
corresponding distance in km defined as a single pointlight.
The spacecraft was first modelled in freecad then imported as independent stl
parts to blender where textures were assigned and finally using povray add on,
the pov code defining the different parts as mesh2 was obtained and the
different objects were merged into a single spacecraft one to be capable of
moving it around the scene and place it wherever is wished.
The problem is that when I place the spacecraft on a certain lower orbit and at
a relative distance from the camera of meters, in some cases the object appers
clipped. Here I provide some images examples showing that.
Is not that we are too close, the FOV is enough, and there is no clipping option
defined in the camera, in fact this is how the camera is defined:
camera {
sky sky_vector
right -(image_width/image_height)*x
look_at look
angle afov
location Cam_pos
}
Maybe it has to do with the meshes and merge of how the spacecraft os defined,
but I tried to check this and I didnt find anything... or maybe the problem is
with the overall scale of the scene??
If anyone has a feeling of what could be happening and knows how to fix it, I
would really appreciate it.
Post a reply to this message
Attachments:
Download 'screenshot_20251112_124351_gmail.jpg' (127 KB)
Preview of image 'screenshot_20251112_124351_gmail.jpg'

|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
If you search the forums, you will likely find that this is due to trying to
model the scene in "realistic units".
(Lookup "Ringworld", for instance)
Also, this ought to still be in the FAQ.
Numbers in a computer can only be so large, and so the numbers themselves "get
clipped" and suffer from floating point accuracy issues.
Scale everything down so that your number are less than maybe 1E9 or so, and I'm
sure that you'll see an improvement.
Welcome.
- BE
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
https://wiki.povray.org/content/Knowledgebase:Language_Questions_and_Tips#Topic_24
https://www.infradead.org/~wmp/proj_rings.html
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"Lourdes" <lou### [at] gmail com> wrote:
> Hello everyone,
>
> I am having clipping image issues with the povray scene I am currently working
> on and I would sincerely appreciate the help.
>
> The scene I am working on represents a spacecraft in "space", where the earth
> was placed at the center of povrays coordinate system and the sun was at the
> corresponding distance in km defined as a single pointlight.
>
> The spacecraft was first modelled in freecad then imported as independent stl
> parts to blender where textures were assigned and finally using povray add on,
> the pov code defining the different parts as mesh2 was obtained and the
> different objects were merged into a single spacecraft one to be capable of
> moving it around the scene and place it wherever is wished.
>
> The problem is that when I place the spacecraft on a certain lower orbit and at
> a relative distance from the camera of meters, in some cases the object appers
> clipped. Here I provide some images examples showing that.
>
> Is not that we are too close, the FOV is enough, and there is no clipping option
> defined in the camera, in fact this is how the camera is defined:
> camera {
>
> sky sky_vector
>
> right -(image_width/image_height)*x
>
> look_at look
>
> angle afov
>
> location Cam_pos
>
>
>
> }
>
> Maybe it has to do with the meshes and merge of how the spacecraft os defined,
> but I tried to check this and I didnt find anything... or maybe the problem is
> with the overall scale of the scene??
>
> If anyone has a feeling of what could be happening and knows how to fix it, I
> would really appreciate it.
Just checking if anyone replied...
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"Bald Eagle" <cre### [at] netscape net> wrote:
> https://wiki.povray.org/content/Knowledgebase:Language_Questions_and_Tips#Topic_24
>
> https://www.infradead.org/~wmp/proj_rings.html
Thank you very much for your reply!!
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"Lourdes" <lou### [at] gmail com> wrote:
>
> I am having clipping image issues with the povray scene I am currently working
> on and I would sincerely appreciate the help.
>
From the appearance of your render examples, it looks like you are using an
orthographic camera(?). Does the clipping of your object still occur if you use
a typical 'perspective' camera instead?
Which version of POV-ray are you running?
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"Kenneth" <kdw### [at] gmail com> wrote:
> "Lourdes" <lou### [at] gmail com> wrote:
> >
> > I am having clipping image issues with the povray scene I am currently working
> > on and I would sincerely appreciate the help.
> >
>
> From the appearance of your render examples, it looks like you are using an
> orthographic camera(?). Does the clipping of your object still occur if you use
> a typical 'perspective' camera instead?
>
> Which version of POV-ray are you running?
Hello,
I will try with the prespective camera... I tried scaling everything down and it
didnt work....the clipping still occurs. And the version I am running is 3.7.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"Bald Eagle" <cre### [at] netscape net> wrote:
> If you search the forums, you will likely find that this is due to trying to
> model the scene in "realistic units".
> (Lookup "Ringworld", for instance)
> Also, this ought to still be in the FAQ.
>
> Numbers in a computer can only be so large, and so the numbers themselves "get
> clipped" and suffer from floating point accuracy issues.
>
> Scale everything down so that your number are less than maybe 1E9 or so, and I'm
> sure that you'll see an improvement.
>
> Welcome.
>
> - BE
I tried to scale everything down but it didnt work... clipping still occurs.
I had everything modelled in km so the distance of the sun reached numbers of
1e9 but now that I changed everything to decameters (1decameter=10km) is still
not working. I tried also megameter (1 megameter=1000km) but still no good
results.... what else can I try? Or can it be something else what is causing the
problem?
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
To be honest, without seeing the scene code, it's going to be a hard problem to
diagnose.
Suggestions:
1. post a simple scene, perhaps a link to the mesh file.
2. Try a simple placeholder for your mesh like a union of boxes or something,
and see if the problem persists.
3. Move things around a bit and see what happens. translate, rotate in all 3
directions by a degree or so. Make sure nothing's occluding your light onto
your object or getting between camera and object. Check your finishes - hard
shadows will make everything BLACK and you just won't see that part of your
object.
Try non-zero values in your pigment statements. (rgb < (val>0), (val>0),
(val>0) >
Add a small amount of diffuse to your finish.
Use radiosity in your scene.
Posting the scene would be best.
- BE
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Le 2025-11-18 à 11:37, Lourdes a écrit :
> "Bald Eagle" <cre### [at] netscape net> wrote:
>> If you search the forums, you will likely find that this is due to trying to
>> model the scene in "realistic units".
>> (Lookup "Ringworld", for instance)
>> Also, this ought to still be in the FAQ.
>>
>> Numbers in a computer can only be so large, and so the numbers themselves "get
>> clipped" and suffer from floating point accuracy issues.
>>
>> Scale everything down so that your number are less than maybe 1E9 or so, and I'm
>> sure that you'll see an improvement.
>>
>> Welcome.
>>
>> - BE
>
> I tried to scale everything down but it didnt work... clipping still occurs.
> I had everything modelled in km so the distance of the sun reached numbers of
> 1e9 but now that I changed everything to decameters (1decameter=10km) is still
> not working. I tried also megameter (1 megameter=1000km) but still no good
> results.... what else can I try? Or can it be something else what is causing the
> problem?
>
The problem is the range between the close objects and the far objects.
If you have distances with a ratio of 1e6 to 1, you will have clipping
issues.
Don't change the scale of the foreground objects. Don't change the
distance to the foreground objects. Keep the 1 unit = 1Km scale for the
close objects.
DO make the background objects 1000 to 10000 times closer and smaller.
Use the parallel attribute for your light_source. Here, the scale can
becomes 1 unit = 1000 Km to 1 unit = 10000Km, possibly even more.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |