POV-Ray : Newsgroups : povray.newusers : Texture Scaling Anomaly Server Time
5 Sep 2024 14:18:59 EDT (-0400)
  Texture Scaling Anomaly (Message 1 to 4 of 4)  
From: Kyle D  Jackson
Subject: Texture Scaling Anomaly
Date: 16 Oct 2000 12:04:26
Message: <39EB2709.CF0AC864@roushind.com>
G'day folks,

My first post here to the POV-Ray groups, so I'll try
not to make a mess  :]  (I hope my identity info shows
up properly.)

I am attempting to create a texture that resembles cast
aluminum, or any cast surface in general.  To do this
I decided to make a variation of the Brushed_Aluminum
texture provided in the TEXTURES.INC file with 3.1g
(NT version).  For reference, that texture is as
follows:

// Brushed aluminum (brushed along X axis)
#declare Brushed_Aluminum = 
texture {
    Chrome_Metal
    normal {
        bumps -0.5
        scale <1, 0.001, 0.001>
    }
}


It just scales BUMPS to produce streaks.  Along similar
lines, I decided to scale the same in all 3 directions 
(as opposed to just 2) to produce "speckles" that would 
look like a cast surface.  This worked pretty well at 
first.  I then began defining a variety of cast aluminum
textures of varying quality surface finishes by modifying
the scale and/or BUMPS settings.

When I first applied this to a larger model (about 400 units
long or so), the texture made a "patch quilt" appearance
on a macro scale.  There were very clearly defined square
patches on the model.  Each patch had different looking
versions of this texture.  Only one patch seemed to resemble
the textures I'd tested on smaller models.  The other patches
presented progressively worse versions of the texture, some
so bad that the model was so fuzzy that the model detail could
no longer be determined.

Experimenting a little more I discoved that the larger the
scale numbers used, this problem improved, eventually to the
point where I no longer had these large patches.  However
at those large scale settings, the bumps were so large that
my model no longer looked anything like cast aluminum but
more like an aluminum orange peel  :]  Conversely the smaller
the scale numbers, the more problems I had.

1) Has anyone experienced anything like this before with 
textures?
2) What may be a better way to do this, or otherwise work
around this problem?

Here's my current theory on the problem.  A bump scaled as 1
would have roughly one 3-D bump texture feature within a
1x1x1 cube.  By using values like 0.001 for scaling, that
unit cube would now contain 1000^3 = 1 billion(!) 3-D bump
texture features.  Even ignoring the 3-D aspect of the textures
and just considering a model face, I've still replaced 1 bump
with 1 million bumps.  Added up over the entire part that
becomes a very high number of bumps!  With the "high quality" 
surface finish casting texture I tried to create, I was using 
scale values down to at least 0.0001.  That would put 1 trillion 
bumps into a unit cube, and so a staggering number into my model.  
Could this somehow be causing POV-Ray processing problems 
during render?  

Thanx,
KDJ

P.S., I can provide a copy of my messed up files if anyone
wants to experiment with it, or a picture of the finished
render.


Post a reply to this message

From: Margus Ramst
Subject: Re: Texture Scaling Anomaly
Date: 16 Oct 2000 15:04:48
Message: <39EB43E5.412FAB1A@peak.edu.ee>
"Kyle D. Jackson" wrote:
> 
> When I first applied this to a larger model (about 400 units
> long or so), the texture made a "patch quilt" appearance
> on a macro scale.

I believe what you're seeing is a known problem with functions that use noise or
dnoise (for example bozo, bumps and granite patterns, and turbulence).
Specifically, the problem manifests itself at large negative distances from the
origin (e.g. -10000 for bozo, -10000/128 for granite). A workaround is to
translate your pattern in the positive direction.
There is also an unofficial version that (reputedly) fixes the problem:
http://www.enst.fr/~jberger/mpov/mpov.html

-- 
Margus Ramst

Personal e-mail: mar### [at] peakeduee
TAG (Team Assistance Group) e-mail: mar### [at] tagpovrayorg


Post a reply to this message

From: Kyle D  Jackson
Subject: Re: Texture Scaling Anomaly
Date: 17 Oct 2000 08:18:10
Message: <39EC4381.8076FD93@roushind.com>
Margus Ramst wrote:
> 
> I believe what you're seeing is a known problem with functions that use noise or
> dnoise (for example bozo, bumps and granite patterns, and turbulence).
> Specifically, the problem manifests itself at large negative distances from the
> origin (e.g. -10000 for bozo, -10000/128 for granite). A workaround is to
> translate your pattern in the positive direction.
> There is also an unofficial version that (reputedly) fixes the problem:
> http://www.enst.fr/~jberger/mpov/mpov.html


G'day Margus,

Thanx for the info.  Evidently there's no NT version yet of the
"MegaPOV patch", and I don't feel like grabbing the DOS version,
so for now I'll just work around it.  I haven't yet tried your
translation suggestion.  After I posted I cruised through all
of POV-Ray's demo includes, and decided I could use GRANITE instead
of scaled BUMPs.  By default, GRANITE's patterns are much smaller
than BUMPs, so very little scaling was required for me to get
the speckled finish for the cast aluminum surface I wanted.  (I've
pasted my texture call-outs below.)  Evidently GRANITE
works on some kind of inverse relation, because I have to make
the scale value smaller to make the patterns appear larger
(and thus my surface rougher).

Thanx,
KDJ
Who Can Now Make Pretty Pictures of Aluminum Castings  :]


// My Cast Aluminum Textures.
// These textures use the Chrome_Metal texture
// from POV-Ray's default textures file.  Be 
// sure to include both where required.
// A higher number after the name means a rougher
// surface finish on the casting.     
// B-series uses Aluminum instead of Chrome_Metal,
// looks too brownish in colour (brutal heat treat?).
// Kyle D. Jackson, 16 October 2000.


#declare Cast_Aluminum1 = 
texture {
    Chrome_Metal
    normal {
     granite 0.2
     scale 1
    }
}

#declare Cast_Aluminum2 = 
texture {
    Chrome_Metal
    normal {
     granite 0.2
     scale 0.5
    }
}

#declare Cast_Aluminum3 = 
texture {
    Chrome_Metal
    normal {
     granite 0.2
     scale 0.1
    }
}

#declare Cast_AluminumB1 = 
texture {
    Aluminum
    normal {
     granite 0.2
     scale 1
    }
}


#declare Cast_AluminumB2 = 
texture {
    Aluminum
    normal {
     granite 0.2
     scale 0.5
    }
}

#declare Cast_AluminumB3 = 
texture {
    Aluminum
    normal {
     granite 0.2
     scale 0.1
    }
}


Post a reply to this message

From: Tom Melly
Subject: Re: Texture Scaling Anomaly
Date: 17 Oct 2000 09:52:23
Message: <39ec5997@news.povray.org>
"Kyle D. Jackson" <kdj### [at] roushindcom> wrote in message
news:39EC4381.8076FD93@roushind.com...

> translation suggestion.  After I posted I cruised through all
> of POV-Ray's demo includes, and decided I could use GRANITE instead
> of scaled BUMPs.  By default, GRANITE's patterns are much smaller

For samples of most of the common patterns, try

www.tomandlu.co.uk/html/pov.htm and look for "pattern.pov"


Post a reply to this message

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