POV-Ray : Newsgroups : povray.programming : Slope dependent textures Server Time
29 Jul 2024 10:29:50 EDT (-0400)
  Slope dependent textures (Message 1 to 10 of 11)  
Goto Latest 10 Messages Next 1 Messages >>>
From: Hans-Detlev Fink
Subject: Slope dependent textures
Date: 6 Apr 1998 12:14:23
Message: <3528FF5F.700B@pecos.n.o-s.p.a.m.de>
Hi pov friends!

As discussed in povray.binaries.images already,
I have patched POV 3.02 for slope dependent textures.
The new keyword slope is used in a similar way as
eg 'gradient'. It takes a vector as its parameter.
It returns values between 0.0 and 1.0, depending
on the angle between the local surface normal and
the slope parameter vector. 0.0 means antiparallel,
0.5 means perpendicular, 1.0 is parallel.

Thus, with 'slope y' it is quite easy to give your
objects a snow (or sands or whatever) covered outfit.

If you want to give it a try: the patch is available
at ftp://user.pecos.de/pub/povray. It contains a readme
and two patch files (in unified diff format). One is for
plain POV 3.02 source, the other one is for 3.02 source that
contains R. Suzuki's iso-surface patch (beta-18).

As usual, this is an unofficial patch.

Enjoy.

-Hans- 


-----
Remove n.o-s.p.a.m. to obtain my real address.
-----

================================
In seeking the unattainable,
simplicity only gets in the way.
-- ACM SIGPLAN Sept. 1982
================================


Post a reply to this message

From: Ronald L  Parker
Subject: Re: Slope dependent textures
Date: 6 Apr 1998 14:23:23
Message: <35291bfc.19006359@10.0.2.33>
On Mon, 06 Apr 1998 18:14:23 +0200, Hans-Detlev Fink
<hdf### [at] pecosno-spamde> wrote:

>If you want to give it a try: the patch is available
>at ftp://user.pecos.de/pub/povray. It contains a readme
>and two patch files (in unified diff format). One is for
>plain POV 3.02 source, the other one is for 3.02 source that
>contains R. Suzuki's iso-surface patch (beta-18).

Very nice.  Mind if I add it to my superpatch?  I'll give proper
credit when I finally make the superpatch available.

Also, in your Readme file, I see:

>  Example: slope y
>This is what everyone associates with slopes in
>landscapes. For all surface elements that are horizontal
>slope returns 1.0. All vertical parts return 0.5 and all
>'anti-horizontal' surfaces (pointing downwards) return
>0.0.

Doesn't a slope of 1.0 correspond to a "vertical" surface, while 0.5
corresponds to "horizontal?"


Post a reply to this message

From: Hans-Detlev Fink
Subject: Re: Slope dependent textures
Date: 6 Apr 1998 19:16:44
Message: <3529625B.E946B266@pecos.n.o-s.p.a.m.de>
Ronald L. Parker wrote:

> On Mon, 06 Apr 1998 18:14:23 +0200, Hans-Detlev Fink
> <hdf### [at] pecosno-spamde> wrote:
>
> >If you want to give it a try: the patch is available
> >at ftp://user.pecos.de/pub/povray. It contains a readme
> >and two patch files (in unified diff format). One is for
> >plain POV 3.02 source, the other one is for 3.02 source that
> >contains R. Suzuki's iso-surface patch (beta-18).
>
> Very nice.  Mind if I add it to my superpatch?  I'll give proper
> credit when I finally make the superpatch available.
>

Fine.  Please contact me before final release of yourpatch. Just in case
I have some bugfixes to contribute.
I would be really happy if as many people as possible
tested the patch. I suspect I was far from all those
'pathological' scenes in my tests.

> Also, in your Readme file, I see:
>
> >  Example: slope y
> >This is what everyone associates with slopes in
> >landscapes. For all surface elements that are horizontal
> >slope returns 1.0. All vertical parts return 0.5 and all
> >'anti-horizontal' surfaces (pointing downwards) return
> >0.0.
>
> Doesn't a slope of 1.0 correspond to a "vertical" surface, while 0.5
> corresponds to "horizontal?"

No.  Well, depends on vertical with respect to what. You are
right if you mean a surface that is perpendicular to y.
I meant vertical in the everday way, ie a surface that is parallel
to y (like a wall etc.).
For this definition of vertical surfaces the surface normal is
in the x-z-plane and thus perpendicular to y. The 'dot' product
of the surface normal and y is therefore 0, which is eventually
translated to 0.5. Similarly a horizontal surface's normal points
in y direction. The product is 1.0, which is translated to 1.0.
Anti-horizontal yields a product of -1.0 which is transformed
to 0.0. (Have a look at slope() at the end of pattern.c.)

I was not sure whether or not I should map the values this way.
Originally I began with 1.0 for horizontal and 0.0 for vertical, all
'negative' surfaces were mapped to 0.0.  At the end I felt that
this was an unnecessary restriction (imagine rocks or asteroids
whose lower surface shall have a specific texture). So I did it
as I did. (A more intuitive way would be a mapping between
-1.0 and +1.0, but that would break the general structure of
maps in povray.)

Cheers

-Hans-


Post a reply to this message

From: Ronald L  Parker
Subject: Re: Slope dependent textures
Date: 7 Apr 1998 09:18:19
Message: <352b26d4.479269@10.0.2.33>
On Tue, 07 Apr 1998 01:16:44 +0200, Hans-Detlev Fink <hdf### [at] pecosde>
wrote:

>> Doesn't a slope of 1.0 correspond to a "vertical" surface, while 0.5
>> corresponds to "horizontal?"
>
>No.  Well, depends on vertical with respect to what. You are
>right if you mean a surface that is perpendicular to y.
>I meant vertical in the everday way, ie a surface that is parallel
>to y (like a wall etc.).

Doh! I even looked at the code you mention, but I messed up on that
one.  The _normal_ is vertical for slopes of 0 or 1.  Oops.

BTW, one fix for the bug you mention in the readme file is to use a
symmetrical color map.  This works in cases where you don't draw a
distinction between horizontal and "anti-horizontal."  In other cases,
such as the pyramid with sand on one surface, this won't work.


Post a reply to this message

From: GrimDude
Subject: Re: Slope dependent textures
Date: 8 Apr 1998 01:02:05
Message: <6gf0in$i2j$1@oz.aussie.org>
Ronald, do you have a mailing list for your super patch?

- Grim


Post a reply to this message

From: Ronald L  Parker
Subject: Re: Slope dependent textures
Date: 8 Apr 1998 09:32:04
Message: <352c7bab.1894624@10.0.2.33>
On Wed, 8 Apr 1998 00:02:05 -0500, "GrimDude" <gri### [at] swbellnet>
wrote:

>  Ronald, do you have a mailing list for your super patch?
>

Not yet.  Apparently I should, since that's two people today who've
expressed an interest.  If you'd like, I'll start keeping a list and
add you to it, but I will post any updates on the status of the
superpatch here just as soon as anything happens.  (See my other post
from today for why nothing has happened yet.)


Post a reply to this message

From: GrimDude
Subject: Re: Slope dependent textures
Date: 8 Apr 1998 12:58:34
Message: <6ggahu$jq0$1@oz.aussie.org>
Well, hey man, add me to your list (just in case I should miss your post
here). :)

- Grim


Post a reply to this message

From: Twyst
Subject: Re: Slope dependent textures
Date: 8 Apr 1998 14:15:39
Message: <6ggbic$jr8$1@oz.aussie.org>
I believe it was Ronald who suggested I do a "repository" for all the custom
patches, and thus, I shall!

If ANYONE has a patch they want to put on a website, I'll give it a home. =)
Just e-mail me, and we can work out something.... :)

Twyst================================
EFnet and NewNet #povray Channel Operator
Website: http://twyst.home.ml.org
E-Mail: twy### [at] v-wavecom
=====================================


Post a reply to this message

From: Ronald L  Parker
Subject: Re: Slope dependent textures
Date: 8 Apr 1998 15:47:59
Message: <352bd1e0.23963097@10.0.2.33>
On Wed, 8 Apr 1998 11:15:39 -0700, "Twyst" <sir### [at] hotmailcom>
wrote:

>
>I believe it was Ronald who suggested I do a "repository" for all the custom
>patches, and thus, I shall!
>
>If ANYONE has a patch they want to put on a website, I'll give it a home. =)
>Just e-mail me, and we can work out something.... :)

Not necessarily a repository, but at least a directory.  The only
directory I've found to date still lists a bunch of old 2.0 patches
that don't work or are unnecessary for 3.0, and doesn't list a lot of
new ones.

Here's my current list of "patches I know about", copied from my
Netscape Bookmark file.  The patch we're discussing in this thread
hasn't made it in yet; nor have the ones on ftp.povray.org (or
ftp.cdrom.com/pub/povray), mainly because they're mostly for 2.0.
Some are missing good documentation, which is why that will be the
most time-consuming part of my superpatch.

http://www.newcolor.com/darenw/dswpov/dswpov.html
Dispersion and Other Modifications to POV-Ray

http://www.newcolor.com/darenw/dswpov/unlimit.html
Unlimited Light mod for POVRay

  (Sources for the previous two at 
  http://www.newcolor.com/darenw/dswpov/stash/
  but it wasn't ready for prime time last time I checked.  Has anyone

  heard from DSW recently?)

http://www.informatik.uni-bremen.de/~vader/pss/pss.html
POV-Ray with Sphere Sweeps

http://www.public.usit.net/rsuzuki/e/povray/iso/index.html 
POV-Ray 3.0 isosurface pactch

ftp://atrey.karlin.mff.cuni.cz/pub/local/0rfelyus/povray-3.02/
Daniel Skarda - Rational Bezier Surface patch

http://pandora.inf.uni-jena.de/noo/povsplines.html
POV-RaySP - POV-Ray with Splines

http://member.aol.com/kochinc/povray/cjkpov.html
Rendering Double-Byte TTF Characters in POV-Ray v3.0
(Already included in isosurface patch.)

http://www2.fwi.com/~parkerr/traces.html
Object Bounds patch for POV-Ray


Post a reply to this message

From: Twyst
Subject: Re: Slope dependent textures
Date: 8 Apr 1998 23:20:28
Message: <6ghbfr$l4l$1@oz.aussie.org>
Ronald L. Parker wrote in message <352bd1e0.23963097@10.0.2.33>...
>On Wed, 8 Apr 1998 11:15:39 -0700, "Twyst" <sir### [at] hotmailcom>
>wrote:
>
>>
>>I believe it was Ronald who suggested I do a "repository" for all the
custom
>>patches, and thus, I shall!
>>
>>If ANYONE has a patch they want to put on a website, I'll give it a home.
=)
>>Just e-mail me, and we can work out something.... :)
>
>Not necessarily a repository, but at least a directory.  The only
>directory I've found to date still lists a bunch of old 2.0 patches
>that don't work or are unnecessary for 3.0, and doesn't list a lot of
>new ones.
>
>Here's my current list of "patches I know about", copied from my
>Netscape Bookmark file.  The patch we're discussing in this thread
>hasn't made it in yet; nor have the ones on ftp.povray.org (or
>ftp.cdrom.com/pub/povray), mainly because they're mostly for 2.0.
>Some are missing good documentation, which is why that will be the
>most time-consuming part of my superpatch.


Great..
Ok. the question here is: Should I write the authors, and ask if I can offer
them on my site? Or just put a link?

hehe.. Either way, I've got to re-design my site. Man. The things you do for
Pov-Ray. =P

On another note: ( insert shameless site plug here )
I will soon be putting some reviews on my site, just as soon as I can get a
group of Pov users who are willing to rate apps.. I would *like* to review
ALL major apps on all platforms, as well as have a list of the top 15
indispensible .inc files... but I know that my opinion may differ from
someone elses, which is why I'd like to get at least 3 people's input on
each program.

Twyst================================
EFnet and NewNet #povray Channel Operator
Website: http://twyst.home.ml.org
E-Mail: twy### [at] v-wavecom
=====================================


Post a reply to this message

Goto Latest 10 Messages Next 1 Messages >>>

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