|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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)
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |