|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Hi,
I am trying to apply CSG operations to objects filled with media without
any success (results also attached):
https://povlab.online/?scene=dicom.pov
Who knows if it's really possible or I am only wasting the time trying
to force it to work ?
Thanks in advance.
--
YB
Post a reply to this message
Attachments:
Download 'dicom.png' (351 KB)
Preview of image 'dicom.png'
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On 24/09/2024 20:40, yesbird wrote:
PS: I know, that by changing the cube size this effect can be achieved,
but applying CSG operations is still mystery to me.
--
YB
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
yesbird <sya### [at] gmailcom> wrote:
> Hi,
> I am trying to apply CSG operations to objects filled with media without
> any success (results also attached):
> https://povlab.online/?scene=dicom.pov
>
> Who knows if it's really possible or I am only wasting the time trying
> to force it to work ?
>
> Thanks in advance.
> --
> YB
Media is . . . tricky.
(Thus why I haven't used it a lot)
Just curious:
Have you tried the reverse - applying CSG operations to a container and THEN
filling it with media?
I think that if you read the documentation on the details of how media works, it
might help - or it may not. It's so very dependent on what you're trying to do
and how you're going about doing it.
- BW
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On 24/09/2024 21:14, Bald Eagle wrote:
> Just curious:
> Have you tried the reverse - applying CSG operations to a container and THEN
> filling it with media?
Hmm, interesting - I will try ...
--
YB
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Am 24.09.2024 um 20:14 schrieb Bald Eagle:
> yesbird <sya### [at] gmailcom> wrote:
>> Hi,
>> I am trying to apply CSG operations to objects filled with media without
>> any success (results also attached):
>> https://povlab.online/?scene=dicom.pov
>>
>> Who knows if it's really possible or I am only wasting the time trying
>> to force it to work ?
>>
>> Thanks in advance.
>> --
>> YB
>
> Media is . . . tricky.
Indeed!
> (Thus why I haven't used it a lot)
>
> Just curious:
> Have you tried the reverse - applying CSG operations to a container and THEN
> filling it with media?
>
> I think that if you read the documentation on the details of how media works, it
> might help - or it may not. It's so very dependent on what you're trying to do
> and how you're going about doing it.
>
The section "Multiple Density vs. Multiple Media" may be of help. One
can simulate intersections and unions of media with this approach.
Most freedom you can achieve with user defined functions to control the
density. But it can be very time-consuming to find the right parameters.
Best regards
Michael
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On 24/09/2024 22:37, MichaelJF wrote:
> The section "Multiple Density vs. Multiple Media" may be of help. One
> can simulate intersections and unions of media with this approach.
>
> Most freedom you can achieve with user defined functions to control the
> density. But it can be very time-consuming to find the right parameters.
Thanks a lot, I will explore it !
--
YB
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Le 2024-09-24 à 13:40, yesbird a écrit :
> Hi,
> I am trying to apply CSG operations to objects filled with media without
> any success (results also attached):
> https://povlab.online/?scene=dicom.pov
>
> Who knows if it's really possible or I am only wasting the time trying
> to force it to work ?
>
> Thanks in advance.
> --
> YB
Looks like that box is opaque.
If you start by applying the media THEN cut away, you need to make sure
that the other object also have rgbt 1 as it's pigment.
The best approach here is to do all of your CSG before adding your
media, add the transparent pigment at once to the totality of the
composite object, then add the media.
DO NOT use union. You can use merge, intersection and difference. As
union don't remove any internal surface, it'll wreak havoc with your media.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Le 2024-09-24 à 13:40, yesbird a écrit :
> Hi,
> I am trying to apply CSG operations to objects filled with media without
> any success (results also attached):
> https://povlab.online/?scene=dicom.pov
>
> Who knows if it's really possible or I am only wasting the time trying
> to force it to work ?
>
> Thanks in advance.
> --
> YB
I see that your code use intervals 60.
That's REAL bad.
This will render faster with better results :
#declare themedia = interior{
media{
samples 100
// stating method 3 is not needed as it's the default
// ratio is not used with method 3
// confidence and variance are also not used
emission 1/20 //OK
absorption 1/1000 //OK
scattering {1, -0.3} //OK
density{
<density items>
// As interpolate 0 mean no interpolation,
// you can omit it
}
}
}
Using intervals with any value >1 massively increase the rendering time
and can introduce artifacts and glitches.
Then. Change your container as follow :
difference{
box{ 0, 1
translate -0.5
scale 200
}// NO pigment
box{ 0, 1
translate -0.5
scale <100, 100, 201>//400 is uselessly large
}//still no pigment
hollow //apply to the difference as a whole
pigment{rgbf 1}
interior{ theinterior}
}
Using the default method 3, you need to avoid using intervals
altogether. Using intervals is a huge performance killer.
Then, the parameters ratio, confidence and variance are specific to
method 1 and 2 and are used to control how many samples are to be used
for each intervals. As you work with only 1 intervals, they have no effect.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Sorry, yesterday I addressed the general question of the possibility of
CSG operations with media and not your special example. Now reading
Alains post, I think your actual problem has nothing to do with media at
all, but with the way POV handles textures in case of a CSG difference.
May be sections 3.6.1.9 and 3.6.1.10 in the docs about interior and
cutaway textures solve your special riddle since the default of an
undefined texture is black as is your background. In your case the
texture of the subtracted second box is undefined as well as the
interior/cutaway texture of the first with the df3-interior. Anyway,
Alains remedies shuld help.
Best regards
Michael
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On 25/09/2024 18:58, Alain Martel wrote:
> I see that your code use intervals 60.
> That's REAL bad.
> This will render faster with better results :
>
> #declare themedia = interior{
> media{
> samples 100
> // stating method 3 is not needed as it's the default
> // ratio is not used with method 3
> // confidence and variance are also not used
> emission 1/20 //OK
> absorption 1/1000 //OK
> scattering {1, -0.3} //OK
> density{
> <density items>
> // As interpolate 0 mean no interpolation,
> // you can omit it
> }
> }
> }
Alan !
Many, many thanks for this correction - rendering now is really faster
with better quality. All your information about parameter's
interference is also very valuable - you saved a lot of time for me.
I like your deep and serious approach.
> Then. Change your container as follow :
> difference{
> box{ 0, 1
> translate -0.5
> scale 200
> }// NO pigment
> box{ 0, 1
> translate -0.5
> scale <100, 100, 201>//400 is uselessly large
> }//still no pigment
> hollow //apply to the difference as a whole
> pigment{rgbf 1}
> interior{ theinterior}
> }
>
Unfortunately here still no success (please see 1st attached image).
It looks like scaling / translation issue - I will try to fix it.
In any case slicing by orthogonal planes by changing the box size
(as on 2nd image) will be enough - CSG operations was only exercise for
me. And now I believe - the media is really tricky :)
--
YB
Post a reply to this message
Attachments:
Download 'dicom_diff.png' (328 KB)
Download 'dicom_slice.png' (348 KB)
Preview of image 'dicom_diff.png'
Preview of image 'dicom_slice.png'
|
|
| |
| |
|
|
|
|
| |