POV-Ray : Newsgroups : povray.general : mm_per_unit question Server Time
29 Jul 2024 16:29:20 EDT (-0400)
  mm_per_unit question (Message 1 to 10 of 17)  
Goto Latest 10 Messages Next 7 Messages >>>
From: Jim Holsenback
Subject: mm_per_unit question
Date: 10 Mar 2011 09:42:47
Message: <4d78e367@news.povray.org>
Is there any provision for having more than one specification of
mm_per_unit in the globals block? What if I have two separate items that
have different scalings.

Would it be reasonable to expect that something like the following might
work?

global_settings {
  mm_per_unit one-scale
  }

object {
 ...
 finish {
  subsurface {...}
  }
}

global_settings {
  mm_per_unit another-scale
  }

object {
 ...
 finish {
  subsurface {...}
  }
}


Post a reply to this message

From: Stephen
Subject: Re: mm_per_unit question
Date: 10 Mar 2011 10:01:56
Message: <4d78e7e4$1@news.povray.org>
On 10/03/2011 2:42 PM, Jim Holsenback wrote:
> Is there any provision for having more than one specification of
> mm_per_unit in the globals block? What if I have two separate items that
> have different scalings.
>


you should scale the subsurface values.

> Would it be reasonable to expect that something like the following might
> work?
>

I'm sure that the last value overwrites the first.

It should be (I think)

global_settings {
    mm_per_unit one-scale
    }

object {
   ...
   finish {
    subsurface {...}
    }
}


object {
   ...
   finish {
    subsurface {...} * one-scale/ another-scale // or something like
    }
}




-- 
Regards
     Stephen


Post a reply to this message

From: Jim Holsenback
Subject: Re: mm_per_unit question
Date: 10 Mar 2011 10:15:20
Message: <4d78eb08$1@news.povray.org>
On 03/10/2011 11:01 AM, Stephen wrote:
> I'm sure that the last value overwrites the first.

That was my 1st thought as well, but considering that you're able to
declare a default texture/pigment/finish at different places and have to
applied accordingly, I thought it was worth asking :-)


Post a reply to this message

From: Stephen
Subject: Re: mm_per_unit question
Date: 10 Mar 2011 11:25:56
Message: <4d78fb94@news.povray.org>
On 10/03/2011 3:15 PM, Jim Holsenback wrote:
> On 03/10/2011 11:01 AM, Stephen wrote:
>> I'm sure that the last value overwrites the first.
>
> That was my 1st thought as well, but considering that you're able to
> declare a default texture/pigment/finish at different places and have to
> applied accordingly, I thought it was worth asking :-)

I've never done that, myself.
Why don't you experiment with the mm_per_unit and report back? 
Remembering that this version of SSLT will be made redundant in the next 
release.

-- 
Regards
     Stephen


Post a reply to this message

From: Jim Holsenback
Subject: Re: mm_per_unit question
Date: 10 Mar 2011 13:42:27
Message: <4d791b93$1@news.povray.org>
On 03/10/2011 12:25 PM, Stephen wrote:
> I'm sure that the last value overwrites the first.

yep that's the case ... it allows multiple definitions but is honoring
the last instance, I had to do:

subsurface {translucency <1,0.25,0.05> *2}

before seeing a diff as suspected


Post a reply to this message

From: clipka
Subject: Re: mm_per_unit question
Date: 11 Mar 2011 03:26:23
Message: <4d79dcaf@news.povray.org>
Am 10.03.2011 16:15, schrieb Jim Holsenback:
> On 03/10/2011 11:01 AM, Stephen wrote:
>> I'm sure that the last value overwrites the first.
>
> That was my 1st thought as well, but considering that you're able to
> declare a default texture/pigment/finish at different places and have to
> applied accordingly, I thought it was worth asking :-)

Note that mm_per_unit it is a global_setting, not a default ;-)

Stephen's right: Last value wins.


Post a reply to this message

From: Jim Holsenback
Subject: Re: mm_per_unit question
Date: 11 Mar 2011 08:36:27
Message: <4d7a255b$1@news.povray.org>
On 03/11/2011 04:25 AM, clipka wrote:
> Am 10.03.2011 16:15, schrieb Jim Holsenback:
>> On 03/10/2011 11:01 AM, Stephen wrote:
>>> I'm sure that the last value overwrites the first.
>>
>> That was my 1st thought as well, but considering that you're able to
>> declare a default texture/pigment/finish at different places and have to
>> applied accordingly, I thought it was worth asking :-)
> 
> Note that mm_per_unit it is a global_setting, not a default ;-)

Yep ... realize that. I guess /global/ should have been my 1st clue ...
eh? While we're on the subject, having mm_per_unit in globals just seems
counter-intuitive. I'm sure there's a technical reason for having it
there, or maybe when the feature was implemented it just wasn't
considered that there could be a case of having more than one sslt
object of different scale in a scene. Since scaling (generalized NOT
sslt) is either attached to a material, texture, pigment or object
wouldn't it make more sense to have it on a per object bases ie:

object {
  ....
  finish {
    subsurface { translucency color mm_per_unit float }
    }
  }


Post a reply to this message

From: Stephen
Subject: Re: mm_per_unit question
Date: 11 Mar 2011 09:12:31
Message: <4d7a2dcf$1@news.povray.org>
On 11/03/2011 1:36 PM, Jim Holsenback wrote:

>>
>> Note that mm_per_unit it is a global_setting, not a default ;-)
>
> Yep ... realize that. I guess /global/ should have been my 1st clue ...
> eh? While we're on the subject, having mm_per_unit in globals just seems
> counter-intuitive. I'm sure there's a technical reason for having it
> there, or maybe when the feature was implemented it just wasn't
> considered that there could be a case of having more than one sslt
> object of different scale in a scene. Since scaling (generalized NOT
> sslt) is either attached to a material, texture, pigment or object
> wouldn't it make more sense to have it on a per object bases ie:
>
> object {
>    ....
>    finish {
>      subsurface { translucency color mm_per_unit float }
>      }
>    }

I recognise your train of thought. :-)

What I think we need to do is scale both the subsurface values and the 
texture, independently but related. (If that makes sense)


   texture {
     pigment { colour}
    finish {
      subsurface { scattering, absorption }* Scale_for_SSLT
      }

scale Scale_for_Texture
    }

PS I notice that you forgot to put your subsurface values in the RC3 
format :-P

-- 
Regards
     Stephen


Post a reply to this message

From: Aydan
Subject: Re: mm_per_unit question
Date: 11 Mar 2011 11:10:00
Message: <web.4d7a48942213d8df3771cd8e0@news.povray.org>
Stephen <mcavoys_at@aoldotcom> wrote:
> On 11/03/2011 1:36 PM, Jim Holsenback wrote:
>
> I recognise your train of thought. :-)
>
> What I think we need to do is scale both the subsurface values and the
> texture, independently but related. (If that makes sense)
>
>
>    texture {
>      pigment { colour}
>     finish {
>       subsurface { scattering, absorption }* Scale_for_SSLT
>       }
>
> scale Scale_for_Texture
>     }
>
> PS I notice that you forgot to put your subsurface values in the RC3
> format :-P
>
> --
> Regards
>      Stephen

mm_per_unit is an attribute of the world (scene) not the object.
If you scale an object with the same material it's SUPPOSED to look different,
just like in the real world. If you want it to look the same when it's e.g.
double the size you need to use a different (more translucent) material. So the
logic as it is implemented makes absolute sense.

Regards
Aydan


Post a reply to this message

From: Jim Holsenback
Subject: Re: mm_per_unit question
Date: 11 Mar 2011 11:39:14
Message: <4d7a5032$1@news.povray.org>
On 03/11/2011 10:12 AM, Stephen wrote:
> What I think we need to do is scale both the subsurface values and the
> texture, independently but related. (If that makes sense)

agreed ... I'm doing a beauty run on the stanford dragon now, here's
what I have for the material:

object { stanford_dragon
material {
  texture {
    T_Stone18
    scale 0.035
  finish {
    subsurface {translucency <0.05,1,1>*0.5}
    reflection { SeaGreen*0.001 }
    }
  }
  interior {ior 1.62}
  }

I copied T_Stone18 into my scene file and made a couple of mods (ambient
to 0 and dialed down diffuse a touch) in the bottom layer texture, then
changed phong to specular/roughness on the outer layer.

To setup the sslt I used a plain white texture instead of T_Stone18
while I dialed in the sslt (seems to help with visualizing the effect).
That was interesting because my 1st take on mm_per_unit was that it
would be smaller than default because of the size of the model at scale
1. When smaller didn't seem to be working I tried default without much
luck either, so I increased to 1000 then 2540, but still had to wildly
scale the translucency color. Finally I decided to try a couple of half
step itterations between something I considered to be more reasonable
(100 - 10) and found the sweet spot. The value I arrived at was so close
to the subsurface scene file values, I opted to use mm_per_unit 40 and
quickly was able to tune the translucency setting to what's shown above.

> PS I notice that you forgot to put your subsurface values in the RC3
> format :-P

ha-ha ... bleeding edge :-P


Post a reply to this message

Goto Latest 10 Messages Next 7 Messages >>>

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.