POV-Ray : Newsgroups : povray.advanced-users : L*C*h(uv) color solid Server Time
1 May 2024 21:15:10 EDT (-0400)
  L*C*h(uv) color solid (Message 11 to 20 of 82)  
<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>
From: Le Forgeron
Subject: Re: L*C*h(uv) color solid
Date: 19 Nov 2016 15:25:15
Message: <5830b52b$1@news.povray.org>
Le 19/11/2016 à 19:19, Mike Horvath a écrit :
> On 11/19/2016 12:59 PM, Le_Forgeron wrote:
>> Le 19/11/2016 à 18:47, Mike Horvath a écrit :
>>>
>>> I think it would be pretty easy to produce a macro that does all of the
>>> above. But how do I turn that into a POV-Ray function? The function
>>> needs to work as a color as well as an isosurface I think.
>>
>>
>> Basic of povray: the shape is not bound to the texture (excepted for
>> uv_mapping).
>>
>> Make the work for the shape, and separately the work to map 3D
>> coordinates to colour.
>>
> 
> Okay. But how?

Within the attached include file, you could replace uv_vertex with your
computed position.

The top macro is UVMeshable, first parameter is an object, just
ignore/remove it
The two others are the resolutions... you can simplify too for your
usage (getting ride of uv_min & uv_max).

mesh{
UVMeshable...

then you insert the uv_mapped texture (and I already provided some code
for that part in this thread)

et voila.


Post a reply to this message


Attachments:
Download 'nurbsmesh.inc.txt' (2 KB)

From: Mike Horvath
Subject: Re: L*C*h(uv) color solid
Date: 19 Nov 2016 15:44:06
Message: <5830b996$1@news.povray.org>
On 11/19/2016 3:25 PM, Le_Forgeron wrote:
> Le 19/11/2016 à 19:19, Mike Horvath a écrit :
>> On 11/19/2016 12:59 PM, Le_Forgeron wrote:
>>> Le 19/11/2016 à 18:47, Mike Horvath a écrit :
>>>>
>>>> I think it would be pretty easy to produce a macro that does all of the
>>>> above. But how do I turn that into a POV-Ray function? The function
>>>> needs to work as a color as well as an isosurface I think.
>>>
>>>
>>> Basic of povray: the shape is not bound to the texture (excepted for
>>> uv_mapping).
>>>
>>> Make the work for the shape, and separately the work to map 3D
>>> coordinates to colour.
>>>
>>
>> Okay. But how?
>
> Within the attached include file, you could replace uv_vertex with your
> computed position.
>
> The top macro is UVMeshable, first parameter is an object, just
> ignore/remove it
> The two others are the resolutions... you can simplify too for your
> usage (getting ride of uv_min & uv_max).
>
> mesh{
> UVMeshable...
>
> then you insert the uv_mapped texture (and I already provided some code
> for that part in this thread)
>
> et voila.
>

I will try to get your method to work. However, it seems like it is more 
effort than simply using an isosurface. I am not worried much about 
performance.

Mike


Post a reply to this message

From: Mike Horvath
Subject: Re: L*C*h(uv) color solid
Date: 19 Nov 2016 15:52:42
Message: <5830bb9a$1@news.povray.org>
On 11/19/2016 2:53 AM, Le_Forgeron wrote:
> Here illustrated with a lemon, and HSL2RGB.
>
> The adaptation to a cylinder and L*C*h(uv) is left as an exercise for
> the reader.
>

I have never used u and v in a gradient, so I am not sure what is going 
on in your code. In the past I have used three separate functions for H, 
S and L. I will try both methods.


Mike


Post a reply to this message

From: Mike Horvath
Subject: Re: L*C*h(uv) color solid
Date: 19 Nov 2016 16:16:03
Message: <5830c113$1@news.povray.org>
On 11/19/2016 3:25 PM, Le_Forgeron wrote:
> Le 19/11/2016 à 19:19, Mike Horvath a écrit :
>> On 11/19/2016 12:59 PM, Le_Forgeron wrote:
>>> Le 19/11/2016 à 18:47, Mike Horvath a écrit :
>>>>
>>>> I think it would be pretty easy to produce a macro that does all of the
>>>> above. But how do I turn that into a POV-Ray function? The function
>>>> needs to work as a color as well as an isosurface I think.
>>>
>>>
>>> Basic of povray: the shape is not bound to the texture (excepted for
>>> uv_mapping).
>>>
>>> Make the work for the shape, and separately the work to map 3D
>>> coordinates to colour.
>>>
>>
>> Okay. But how?
>
> Within the attached include file, you could replace uv_vertex with your
> computed position.
>
> The top macro is UVMeshable, first parameter is an object, just
> ignore/remove it
> The two others are the resolutions... you can simplify too for your
> usage (getting ride of uv_min & uv_max).
>
> mesh{
> UVMeshable...
>
> then you insert the uv_mapped texture (and I already provided some code
> for that part in this thread)
>
> et voila.
>

Also, uv mapping for cylinders is not supported by POV-Ray 3.7.0. Do I 
need to compile 3.7.1 on my own?

Mike


Post a reply to this message

From: Mike Horvath
Subject: Re: L*C*h(uv) color solid
Date: 19 Nov 2016 16:22:14
Message: <5830c286$1@news.povray.org>
On 11/19/2016 3:25 PM, Le_Forgeron wrote:
> Le 19/11/2016 à 19:19, Mike Horvath a écrit :
>> On 11/19/2016 12:59 PM, Le_Forgeron wrote:
>>> Le 19/11/2016 à 18:47, Mike Horvath a écrit :
>>>>
>>>> I think it would be pretty easy to produce a macro that does all of the
>>>> above. But how do I turn that into a POV-Ray function? The function
>>>> needs to work as a color as well as an isosurface I think.
>>>
>>>
>>> Basic of povray: the shape is not bound to the texture (excepted for
>>> uv_mapping).
>>>
>>> Make the work for the shape, and separately the work to map 3D
>>> coordinates to colour.
>>>
>>
>> Okay. But how?
>
> Within the attached include file, you could replace uv_vertex with your
> computed position.
>
> The top macro is UVMeshable, first parameter is an object, just
> ignore/remove it
> The two others are the resolutions... you can simplify too for your
> usage (getting ride of uv_min & uv_max).
>
> mesh{
> UVMeshable...
>
> then you insert the uv_mapped texture (and I already provided some code
> for that part in this thread)
>
> et voila.
>

Also, if I wasn't clear before, I only want to render those portions of 
the HCL cylinder that lie within the sRGB gamut. Thus, the resulting 3D 
shape will be quite irregular. Can I still generate a mesh this way?

Mike


Post a reply to this message

From: Le Forgeron
Subject: Re: L*C*h(uv) color solid
Date: 19 Nov 2016 16:36:28
Message: <5830c5dc$1@news.povray.org>
Le 19/11/2016 à 22:22, Mike Horvath a écrit :
> Also, if I wasn't clear before, I only want to render those portions of
> the HCL cylinder that lie within the sRGB gamut. Thus, the resulting 3D
> shape will be quite irregular. Can I still generate a mesh this way?

Yes. I do not know your HCL, but as long as you have 2 parameters to
cover the surface you want, it should be fine.

If you look at the scene with the lemon, I made the exploration (there
for uv mapping) in 3 "bands", one for each portion of the surface.
you can use the same approach.


Post a reply to this message

From: clipka
Subject: Re: L*C*h(uv) color solid
Date: 19 Nov 2016 16:53:40
Message: <5830c9e4$1@news.povray.org>
Am 19.11.2016 um 22:16 schrieb Mike Horvath:

> Also, uv mapping for cylinders is not supported by POV-Ray 3.7.0. Do I
> need to compile 3.7.1 on my own?

Presuming you're using Windows, then no, not at all -- development
binaries can be found at our GitHub repository:

    https://github.com/POV-Ray/povray/releases


Post a reply to this message

From: Mike Horvath
Subject: Re: L*C*h(uv) color solid
Date: 19 Nov 2016 17:33:57
Message: <5830d355$1@news.povray.org>
I tried changing Ku to a cylinder. I expected some differences, but in 
the output the texture does not seem to be changing direction along with 
the rest of the cylinder.

Mike


#declare Ku = cylinder
{
	-y, +y, 0.4
	uv_mapping texture { TM }
	rotate 150*y
}


Post a reply to this message

From: Le Forgeron
Subject: Re: L*C*h(uv) color solid
Date: 19 Nov 2016 17:40:55
Message: <5830d4f7$1@news.povray.org>
Le 19/11/2016 à 23:34, Mike Horvath a écrit :
> I tried changing Ku to a cylinder. I expected some differences, but in
> the output the texture does not seem to be changing direction along with
> the rest of the cylinder.
> 
> Mike
> 
> 
> #declare Ku = cylinder
> {
>     -y, +y, 0.4
>     uv_mapping texture { TM }
>     rotate 150*y
> }

uv mapping of cylinder is not available in 3.70


Post a reply to this message

From: Mike Horvath
Subject: Re: L*C*h(uv) color solid
Date: 19 Nov 2016 18:09:46
Message: <5830dbba$1@news.povray.org>
On 11/19/2016 5:40 PM, Le_Forgeron wrote:
> Le 19/11/2016 à 23:34, Mike Horvath a écrit :
>> I tried changing Ku to a cylinder. I expected some differences, but in
>> the output the texture does not seem to be changing direction along with
>> the rest of the cylinder.
>>
>> Mike
>>
>>
>> #declare Ku = cylinder
>> {
>>     -y, +y, 0.4
>>     uv_mapping texture { TM }
>>     rotate 150*y
>> }
>
> uv mapping of cylinder is not available in 3.70
>

I am using 3.7.1-alpha.8826150+av273.msvc14 now.

Mike


Post a reply to this message

<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>

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