|
 |
On 22/02/2025 23:07, Bald Eagle wrote:
> "Leroy" <whe### [at] gmail com> wrote:
>> "Bald Eagle" <cre### [at] netscape net> wrote:
>>> Is there a way to do this?
>>>
>>> object texture?
>>> function?
>>> Some way to internally generate an image_map?
>>>
>>> Seems like it ought to be possible, but I'm not seeing the path to a solution.
>>>
>>> - BE
>>
>> If I understand you right you want to turn a text object into a pigment or
>> texture
>>
>> Using the 'object' pattern should do the trick.
>
> Hmm. Yes.
> However, that doesn't function like an image_map - it's a volumetric
> inside/outside test on 3D text.
> I can of course import that into a function and use a pigment {function {F(x, y,
> 0)}} to extend that infinitely in the z direction, but if I want color, then I
> have to resort to making an average {} texture . . . and that starts to get
> involved and messy.
>
Not sure if I'm really answering your question, but yes, texture {
pigment { object { text { ... should meet your needs.
I pulled out an old test scene with this :
// ---------------------------------------------------------------------
union {
cone { <0, 0, 0>, Rad, <0, 0, -0.50>, Rad-0.50 }
cylinder { <0, 0, 0>, <0, 0, Len>, Rad }
cone { <0, 0, Len>, Rad, <0, 0, Len+0.50>, Rad-0.50 }
texture {
pigment {
object {
#declare Texte = text {
ttf FontName Str 1, <0, 0, 0>
scale FontScale
rotate -90*y
}
#declare TexteMax = max_extent(Texte);
#declare TexteMin = min_extent(Texte);
#declare Translation = 0.50*<2*Rad,
TexteMin.y-((TexteMax.y-TexteMin.y)*0.50), Len-TexteMax.z>;
text {
ttf FontName Str 1, <0, 0, 0>
scale FontScale
rotate -90*y
translate Translation
} // end of text
pigment { color White*0.25 }
pigment { color Orange*1.15 }
} // end of object
// turbulence <0.10, 0.20, 0.05>
} // end of pigment
finish { phong 0.90 phong_size 8 }
// normal { cells bump_size 0.15 no_bump_scale scale 0.50 turbulence 0.15 }
} // end of texture
} // end of union
// ---------------------------------------------------------------------
that give the image
--
kurtz le pirate
compagnie de la banquise
Post a reply to this message
Attachments:
Download 'pigment_object.jpg' (69 KB)
Preview of image 'pigment_object.jpg'

|
 |