POV-Ray : Newsgroups : povray.general : re-texturing only part of an object? Server Time
31 Oct 2024 06:03:30 EDT (-0400)
  re-texturing only part of an object? (Message 1 to 10 of 12)  
Goto Latest 10 Messages Next 2 Messages >>>
From: Kenneth
Subject: re-texturing only part of an object?
Date: 28 Dec 2005 07:00:00
Message: <web.43b27dd4f80d455488567a490@news.povray.org>
I've made a text object, with a nice translucent "ice" texture. I'd like to
"paint" the top of the letters white (only the top SURFACES), as a base
color for tracing on some snow objects. Maybe I'm forgetting something
basic, but I can't figure out how to do that. Some kind of image_map
configuration? Procedural texture? Or do I need to use uv-mapping? If
uv-mapping, can I do it completely within the POV SDL, or do I need an
external app like UV MAPPER? Though I've been reading up on the subject,
assume that I don't know very much about how to use the uv-mapping process
within POV itself.

Thanks in advance for any help!

Ken


Post a reply to this message

From: Kenneth
Subject: Re: re-texturing only part of an object?
Date: 28 Dec 2005 07:35:01
Message: <web.43b285ebdf8284dc88567a490@news.povray.org>
Oh...forgot to mention: The type style I'm using for the letters is very
angular (a Gothic style), with no curving surfaces on the top, just flat
ones, though some are angled downwards at about 45-degrees.

Ken


Post a reply to this message

From: Roman Reiner
Subject: Re: re-texturing only part of an object?
Date: 28 Dec 2005 07:40:00
Message: <web.43b28677df8284dcded174120@news.povray.org>
i would recommend creating a cutobject (maybe a box or a heightfield) and
slice the textobject in two by using difference and intersection. then you
can easily texture the parts at your will.

Hope this helpes
Regards Roman

"Kenneth" <kdw### [at] earthlinknet> wrote:
> I've made a text object, with a nice translucent "ice" texture. I'd like to
> "paint" the top of the letters white (only the top SURFACES), as a base
> color for tracing on some snow objects. Maybe I'm forgetting something
> basic, but I can't figure out how to do that. Some kind of image_map
> configuration? Procedural texture? Or do I need to use uv-mapping? If
> uv-mapping, can I do it completely within the POV SDL, or do I need an
> external app like UV MAPPER? Though I've been reading up on the subject,
> assume that I don't know very much about how to use the uv-mapping process
> within POV itself.
>
> Thanks in advance for any help!
>
> Ken


Post a reply to this message

From: Roman Reiner
Subject: Re: re-texturing only part of an object?
Date: 28 Dec 2005 07:50:00
Message: <web.43b28909df8284dcded174120@news.povray.org>
After re-reading you post i guess my previously post wasn't the right answer
to your question. i guess the front and backside of the textobject should
stay with the ice texture? then i'd do it that way:
create the textobject with a gradient y texture with your ice and your
snowtexture and transform it that way that the upper half is covered
completely by the snowtexture and the rest by the icetexture. afterwards
intersect it with a box (with the icetexture) that is bigger in y and x
direction but smaller in z direction (assuming that the text goes from -x
to x with y upwards).
That should lead to your wanted object i guess.

Regards Roman


Post a reply to this message

From: Jim Charter
Subject: Re: re-texturing only part of an object?
Date: 28 Dec 2005 11:07:14
Message: <43b2b832$1@news.povray.org>
//Here is two ideas that could be refined:

#local  P =
text {
   ttf
   "courbd.ttf",
   "P",
   2,
   0
};

intersection {

         object {
                 P
                 texture { pigment { White } }

         }
         object {
                 P
                 texture { pigment { Red } }
                 translate <.001,.001,.001>
         }
}

//or:

#local Mx = max_extent ( P );
#local Mn = min_extent ( P );

intersection {

         object {
                 P
                 texture { pigment { Red } }

         }
         box {
               Mn,
               <Mx.x,Mx.y-.001,Mx.z>
               texture { pigment { White } }
         }
         translate x*1
}


Post a reply to this message

From: gonzo
Subject: Re: re-texturing only part of an object?
Date: 28 Dec 2005 17:05:02
Message: <web.43b30b32df8284dca0c272b50@news.povray.org>
"Kenneth" <kdw### [at] earthlinknet> wrote:
> I've made a text object, with a nice translucent "ice" texture. I'd like to
> "paint" the top of the letters white (only the top SURFACES), as a base
> color for tracing on some snow objects. Maybe I'm forgetting something
> basic, but I can't figure out how to do that. Some kind of image_map
> configuration? Procedural texture? Or do I need to use uv-mapping? If
> uv-mapping, can I do it completely within the POV SDL, or do I need an
> external app like UV MAPPER? Though I've been reading up on the subject,
> assume that I don't know very much about how to use the uv-mapping process
> within POV itself.
>
> Thanks in advance for any help!
>
> Ken

If the top is completely flat then a slope pattern with only a narrow range
at the top should work.  Assuming the Ice & White textures are already
defined...

#declare Text_Texture = texture {
  slope
  texture_map {
    [0.00  Ice_Texture ]
    [0.95  Ice_Texture ]
    [0.95  White_Texture ]
    [1.00  White_Texture ]
  }
}


Post a reply to this message

From: Kenneth
Subject: Re: re-texturing only part of an object?
Date: 29 Dec 2005 17:05:00
Message: <web.43b45d3ddf8284dc7d28b4e70@news.povray.org>
"gonzo" <rgo### [at] lansetcom> wrote:

>
> If the top is completely flat then a slope pattern with only a narrow range
> at the top should work.  Assuming the Ice & White textures are already
> defined...
>

Unfortunately for me, the lettering has those sloping 45-angles. (Or am I
not reading your reply the right way?)

I see that this is not as straightforward a problem as I thought. Considered
a "difference" with another object (or objects), and may yet go that way.
But I'll definitely try out all the techniques that have been suggested,
and post my results. Thanks to all!

Ken


Post a reply to this message

From: gonzo
Subject: Re: re-texturing only part of an object?
Date: 2 Jan 2006 00:18:51
Message: <43b8b7bb@news.povray.org>
Kenneth wrote:
> "gonzo" <rgo### [at] lansetcom> wrote:
> 
> 
>>If the top is completely flat then a slope pattern with only a narrow range
>>at the top should work.  Assuming the Ice & White textures are already
>>defined...
>>
> 
> 
> Unfortunately for me, the lettering has those sloping 45-angles. (Or am I
> not reading your reply the right way?)

If I'm understanding what you're trying to do, 45 degree angles 
shouldn't be a problem... you have letters that are flat on top with 45 
degree sloping sides?

I see I forgot in my example to provide slope with direction vector 
though, so it should give an error as is...

If y is up in your scene, just 'slope y' should do it.

RG


Post a reply to this message

From: Charles C
Subject: Re: re-texturing only part of an object?
Date: 2 Jan 2006 21:00:01
Message: <web.43b9da64df8284dc58035aeb0@news.povray.org>
When I read your post I assumed by "tracing on some snow objects" you meant
using trace to find the top surface of the letters and cover it in some
kind of fluffy looking snow flakes.  If that's the case, you could always
shoot it with a grid of "trace" and create a form fitting mesh.  Might be a
bit brute force, but hey....

Charles C

Or..... I haven't thought this out yet, but you could do some difference CSG
with some fancy scaling of individual letters.

Or.... Maybe just translate the letters down some tiny amount to make your
cutting object.  Then manuallly add some boxes to the cutting object to get
the bits that remain.


Post a reply to this message

From: Kenneth
Subject: Re: re-texturing only part of an object?
Date: 11 Jan 2006 02:00:05
Message: <web.43c4ab9edf8284dce06d11910@news.povray.org>
"Charles C" <nomail@nomail> wrote:
> When I read your post I assumed by "tracing on some snow objects" you meant
> using trace to find the top surface of the letters and cover it in some
> kind of fluffy looking snow flakes.

yes yes.

> If that's the case, you could always
> shoot it with a grid of "trace" and create a form fitting mesh.  Might be a
> bit brute force, but hey....

Not familiar with that technique, or what it would end up looking like.
Would very much like to know how that's done! As-is, the traced snowflake
blobs look...decent...though not great. Still experimenting with specular
and roughness settings, to get that "snow glint." Even came up with a
somewhat simple "snow layering" trick to build up random thickness ( by
tracing on one layer of union-ed snow objects--then union-ing that WITH the
letters--then going back and tracing another layer onto that combo,
union-ing it all again, etc.) A faster technique than it sounds.


>
> Or.... Maybe just translate the letters down some tiny amount to make your
> cutting object.  Then manuallly add some boxes to the cutting object to get
> the bits that remain.

That's what I ended up doing. Lotsa work, as you can imagine. But made
easier by the flat lettering surfaces.

Actually, I found that with enough snow blobs, the lettering tops didn't
need painting after all!  Go figure...

Ken


Post a reply to this message

Goto Latest 10 Messages Next 2 Messages >>>

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