POV-Ray : Newsgroups : povray.pov4.discussion.general : Feature Request - Texture Overlay Server Time
22 Dec 2024 01:57:40 EST (-0500)
  Feature Request - Texture Overlay (Message 1 to 10 of 11)  
Goto Latest 10 Messages Next 1 Messages >>>
From: Kyle
Subject: Feature Request - Texture Overlay
Date: 24 Jan 2008 19:40:29
Message: <psaip3ti869ibard1p1h4i58dj0jafeahe@4ax.com>
Functionality that I think would be helpful is a method to overlay a previously
textured object with
a new texture.  Perhaps this could be specified with an "overlay" keyword, such as
this:

object {
  o_PreviouslyTexturedObject
  texture {
    pigment { p_PartiallyClearPigment }
    overlay
  }
}

This simplistic example does not demonstrate how helpful this functionality would be. 
A better
example is a recent scene that I was working on in which I was building a brick road. 
I defined a
section of road as a union of 36x100 randomly textured bricks.  I then placed the
sections
end-to-end to form the complete road.  I wanted to have lines on the road too, but
wanted some
waviness to the lines for more realism.  Overlaying a texture on the entire road would
be the
simplest method, providing there was a method to do so.


Post a reply to this message

From: Chambers
Subject: Re: Feature Request - Texture Overlay
Date: 25 Jan 2008 04:05:17
Message: <4799a64d$1@news.povray.org>
Kyle wrote:
> This simplistic example does not demonstrate how helpful this functionality would
be.  A better
> example is a recent scene that I was working on in which I was building a brick
road.  I defined a
> section of road as a union of 36x100 randomly textured bricks.  I then placed the
sections
> end-to-end to form the complete road.  I wanted to have lines on the road too, but
wanted some
> waviness to the lines for more realism.  Overlaying a texture on the entire road
would be the
> simplest method, providing there was a method to do so.

In this example, you could actually place all the bricks in a union and 
give them a single texture block.

-- 
...Ben Chambers
www.pacificwebguy.com


Post a reply to this message

From: scott
Subject: Re: Feature Request - Texture Overlay
Date: 25 Jan 2008 05:29:54
Message: <4799ba22$1@news.povray.org>
> Functionality that I think would be helpful is a method to overlay a 
> previously textured object with
> a new texture.  Perhaps this could be specified with an "overlay" keyword, 
> such as this:
>
> object {
>  o_PreviouslyTexturedObject
>  texture {
>    pigment { p_PartiallyClearPigment }
>    overlay
>  }
> }

Uh - you can already do this can't you? just take out the "overlay" keyword 
and it works!


Post a reply to this message

From: Warp
Subject: Re: Feature Request - Texture Overlay
Date: 25 Jan 2008 07:37:31
Message: <4799d80b@news.povray.org>
scott <sco### [at] laptopcom> wrote:
> Uh - you can already do this can't you? just take out the "overlay" keyword 
> and it works!

  No, because a later texture definition will not modify an existing one.

-- 
                                                          - Warp


Post a reply to this message

From: Trevor G Quayle
Subject: Re: Feature Request - Texture Overlay
Date: 25 Jan 2008 08:10:01
Message: <web.4799def8e1857b77c150d4c10@news.povray.org>
Chambers <ben### [at] pacificwebguycom> wrote:
> Kyle wrote:
> > This simplistic example does not demonstrate how helpful this functionality would
be.  A better
> > example is a recent scene that I was working on in which I was building a brick
road.  I defined a
> > section of road as a union of 36x100 randomly textured bricks.  I then placed the
sections
> > end-to-end to form the complete road.  I wanted to have lines on the road too, but
wanted some
> > waviness to the lines for more realism.  Overlaying a texture on the entire road
would be the
> > simplest method, providing there was a method to do so.
>
> In this example, you could actually place all the bricks in a union and
> give them a single texture block.
>
> --
> ...Ben Chambers
> www.pacificwebguy.com

I think what he wants to achieve, is to have the subtextures for each brick
different by some degree and applied to each brick individually.
There are some ways this could be achieved with a single texture block, but they
would tend to be very complex, a texture overlay would be a lot simpler.

-tgq


Post a reply to this message

From: Kyle
Subject: Re: Feature Request - Texture Overlay
Date: 25 Jan 2008 08:14:21
Message: <k1njp3le8kfdn8cm0hmab4g969fc7aq1n8@4ax.com>
On Fri, 25 Jan 2008 01:05:15 -0800, Chambers <ben### [at] pacificwebguycom> wrote:

>Kyle wrote:
>> This simplistic example does not demonstrate how helpful this functionality would
be.  A better
>> example is a recent scene that I was working on in which I was building a brick
road.  I defined a
>> section of road as a union of 36x100 randomly textured bricks.  I then placed the
sections
>> end-to-end to form the complete road.  I wanted to have lines on the road too, but
wanted some
>> waviness to the lines for more realism.  Overlaying a texture on the entire road
would be the
>> simplest method, providing there was a method to do so.
>
>In this example, you could actually place all the bricks in a union and 
>give them a single texture block.

Yes, it would work.  The problem was that the memory used by a 2000x37 brick road
exceeded the memory I had available and drive thrashing ensued.  Breaking the road
down into sections resolved the
memory issue, but then I couldn't texture the road as one object.  Here's a link to a
thread where I posted an example and the discussion led to a solution, although it
used more memory than an
overlaid texture would...

http://news.povray.org/povray.general/thread/%3Chp0ro31f9m1dr7spccdp4g3j0hj5fvhdh0%404ax.com%3E/


There are other examples I can think of where overlaying a texture would be applicable
as well.  What if you want to add a texture layer to a predefined, pre-textured mesh
object, perhaps one that's
UV mapped using image maps?  That'd be kind of complex, if not impossible, without
being able to overlay the existing texture.

Perhaps you have a complex object that you've built and textured, but it looks to
clean and you want to add a little "dirt".  You can go back and use layered textures
on each piece of the object, or
you can overlay one dirt texture over the entire object.  Imagine trying to transform
the dirt texture on each piece of a complex object to have any patterns in the dirt
line up properly between
pieces of the object.  An overlaid texture would be much simpler.


Post a reply to this message

From: Kyle
Subject: Re: Feature Request - Texture Overlay
Date: 25 Jan 2008 08:26:46
Message: <6oojp3lpnpo4po67jf5e19dl842v4c5oqi@4ax.com>
On Fri, 25 Jan 2008 11:30:10 +0100, "scott" <sco### [at] laptopcom> wrote:

>> Functionality that I think would be helpful is a method to overlay a 
>> previously textured object with
>> a new texture.  Perhaps this could be specified with an "overlay" keyword, 
>> such as this:
>>
>> object {
>>  o_PreviouslyTexturedObject
>>  texture {
>>    pigment { p_PartiallyClearPigment }
>>    overlay
>>  }
>> }
>
>Uh - you can already do this can't you? just take out the "overlay" keyword 
>and it works!
> 

With basic objects, yes, but not with complex objects.

Try this...


#declare p_PartiallyClearPigment =
  pigment {
    granite
    color_map {
      [0 rgbf 1]
      [1 rgb <1,0,0>]
    }
  }

#declare o_PreviouslyTexturedObject =
  union {
    sphere { 
      x/2, 0.5 
      pigment { rgb <0,1,0> } 
    }
    sphere { 
      -x/2, 0.5 
      pigment { rgb <0,0,1> } 
    }
  }

object {
  o_PreviouslyTexturedObject
  texture {
    pigment { p_PartiallyClearPigment }
    //overlay
  }
}


Post a reply to this message

From: Kyle
Subject: Re: Feature Request - Texture Overlay
Date: 25 Jan 2008 08:30:23
Message: <11pjp353c5oq1alqao3qlu6oenv6hna2jm@4ax.com>
On 25 Jan 2008 07:37:31 -0500, Warp <war### [at] tagpovrayorg> wrote:

>scott <sco### [at] laptopcom> wrote:
>> Uh - you can already do this can't you? just take out the "overlay" keyword 
>> and it works!
>
>  No, because a later texture definition will not modify an existing one.

Scott is partially right.  This works...


#declare p_PartiallyClearPigment =
  pigment {
    granite
    color_map {
      [0 rgbf 1]
      [1 rgb <1,0,0>]
    }
  }

#declare o_PreviouslyTexturedObject =
  sphere { 
    x/2, 0.5 
    pigment { rgb <0,1,0> } 
  }

object {
  o_PreviouslyTexturedObject
  texture {
    pigment { p_PartiallyClearPigment }
    //overlay
  }
}


... but it will not work with more complex objects.


Post a reply to this message

From: scott
Subject: Re: Feature Request - Texture Overlay
Date: 28 Jan 2008 04:10:23
Message: <479d9bff$1@news.povray.org>
>> Uh - you can already do this can't you? just take out the "overlay" 
>> keyword
>> and it works!
>
>  No, because a later texture definition will not modify an existing one.

Didn't he want to add another texture over the top, not modify the existing 
one(s)?

Anyway, definitely weird that it only works for single objects, should be 
fixed to have the same behaviour with unions/merges etc.


Post a reply to this message

From: Kyle
Subject: Re: Feature Request - Texture Overlay
Date: 28 Jan 2008 08:53:31
Message: <pgnrp3hev23ng12j2u8fuqijr41gerk38h@4ax.com>
On Mon, 28 Jan 2008 10:10:40 +0100, "scott" <sco### [at] laptopcom> wrote:

>Didn't he want to add another texture over the top, not modify the existing 
>one(s)?

Yes, that's it exactly.


Post a reply to this message

Goto Latest 10 Messages Next 1 Messages >>>

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