POV-Ray : Newsgroups : povray.binaries.images : Textured block pattern problem Server Time
1 Aug 2024 04:15:07 EDT (-0400)
  Textured block pattern problem (Message 21 to 30 of 44)  
<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>
From: clipka
Subject: Re: Textured block pattern problem
Date: 26 Mar 2009 06:55:00
Message: <web.49cb5eca143ba0c593bfb07f0@news.povray.org>
"Kenneth" <kdw### [at] earthlinknet> wrote:
> When a function is used in the HF_Square macro in shapes.inc--supposedly the
> 'equivalent' of POV's regular HF--the function (whether of a pigment/pattern OR
> an image_map) actually evaluates the pattern 'slice' on the X/Z plane(!) rather
> than the X/Y plane as it is supposed to. That explains lots of things!

No, that's actually documented:

"The function values used for the heights will be taken from the square that
goes from <0,0,0> to <1,1,0> if UV height mapping is on. Otherwise the function
values will be taken from the points where the surface is (before the
deformation)."

As the HF_Square macro will build a height field over the X/Z plane, you'd need
to set the UseUVheight parameter to true to get the samples from the X/Y plane.

The regular height_field is always in "UseUVheight" mode, so to speak.


Post a reply to this message

From: clipka
Subject: Re: Textured block pattern problem
Date: 26 Mar 2009 07:30:00
Message: <web.49cb661e143ba0c593bfb07f0@news.povray.org>
"Bill Pragnell" <bil### [at] hotmailcom> wrote:
> > > ...(after all, if I'm not mistaken, function images are the only
> > > way to create a height field from a pattern in the first place).
> >
> Just an aside to your discussion, obviously, but...
>
> What about using a regular pigment function in the height field?

You always need an image (= image file or "internal image" aka "function image")
to generate the height field from... or do you know some other way?

> Or a pigment
> function called at <x,0,z> in an isosurface? (Not strictly a heightfield but
> you get the same effect.) Or, of course, you could always write your own
> heightfield macro...
>
> As always, plenty of ways to skin a cat... :)

At other occasions I'd fully agree with you (after all, POV is mostly
"tri-vial", you know ;)), but we're talking specifically about height_field
objects here.

(Well, the isosurface solution won't work as you described anyway, because it
needs some gradient mixed in to act as a height field substitute :P)


Post a reply to this message

From: Bill Pragnell
Subject: Re: Textured block pattern problem
Date: 26 Mar 2009 07:45:00
Message: <web.49cb69cf143ba0c56dd25f0b0@news.povray.org>
"clipka" <nomail@nomail> wrote:
> "Bill Pragnell" <bil### [at] hotmailcom> wrote:
> > > > ...(after all, if I'm not mistaken, function images are the only
> > > > way to create a height field from a pattern in the first place).
> > >
> > Just an aside to your discussion, obviously, but...
> >
> > What about using a regular pigment function in the height field?
>
> You always need an image (= image file or "internal image" aka "function image")
> to generate the height field from... or do you know some other way?

Apologies, I think we're talking about the same thing. You don't need any
"image" related SDL keywords, that's what confused me (without having looked it
up till now)!

> At other occasions I'd fully agree with you (after all, POV is mostly
> "tri-vial", you know ;)), but we're talking specifically about height_field
> objects here.

The 'tri-vial' was indeed my angle :) Yes, fair enough, the underscore seemed to
get lost somewhere, I was thinking of general solutions.

> (Well, the isosurface solution won't work as you described anyway, because it
> needs some gradient mixed in to act as a height field substitute :P)

Yes. Well, I didn't really describe it at all :)


Post a reply to this message

From: Jörg 'Yadgar' Bleimann
Subject: Re: Textured block pattern problem
Date: 26 Mar 2009 10:36:46
Message: <49cb92fe$2@news.povray.org>
High!

Cousin Ricky wrote:

> I didn't make a Trinidad and Tobago; not enough of a challenge, I 
> guess.  Instead I submit nearby countries Barbados and St. Vincent and 
> the Grenadines.  (I have flags languishing of even closer countries, 
> Venezuela (which is a good swim from Trinidad) and Grenada, as well as 
> T&T itself. However, they are from my pre-POV-Ray days.)

Impressive... how did you the coats-of-arms of the Virgin Islands? Did 
you use that famous Python script to convert GIMP bezier paths into POV 
splines?

I plan to do two versions for each country, a simple one and a more 
intricated one containing also the coat-of-arms (if given), depending on 
the use of the texture.

Here is what I put together up to now:
1. Afghanistan (of course ;-))
2. Poland
3. Spain
4. Switzerland

...more to come!

See you in Khyberspace! (yes, there will be also flags of POVghanistan 
and Khyberspace!)

Yadgar


Post a reply to this message


Attachments:
Download 'flag_afghanistan.png' (2 KB) Download 'flag_poland.png' (2 KB) Download 'flag_spain.png' (2 KB) Download 'flag_switzerland.png' (2 KB)

Preview of image 'flag_afghanistan.png'
flag_afghanistan.png

Preview of image 'flag_poland.png'
flag_poland.png

Preview of image 'flag_spain.png'
flag_spain.png

Preview of image 'flag_switzerland.png'
flag_switzerland.png


 

From: Kenneth
Subject: Re: Textured block pattern problem
Date: 26 Mar 2009 15:55:01
Message: <web.49cbdc3c143ba0c5f50167bc0@news.povray.org>
"clipka" <nomail@nomail> wrote:
> "Kenneth" <kdw### [at] earthlinknet> wrote:
> > When a function is used in the HF_Square macro in shapes.inc--supposedly the
> > 'equivalent' of POV's regular HF--the function (whether of a
> > pigment/pattern OR an image_map) actually evaluates the pattern 'slice'
> > on the X/Z plane(!) rather than the X/Y plane as it is supposed to. That
> > explains lots of things!
>
> No, that's actually documented:
>
> "The function values used for the heights will be taken from the square that
> goes from <0,0,0> to <1,1,0> if UV height mapping is on. Otherwise the
> function values will be taken from the points where the surface is
> (before the deformation)."

So *that's* what is meant by that paragraph. I've been trying to pin down its
meaning for quite awhile... the 'surface' thing.  Now that you bring it to my
attention (and explain it so succinctly), it does make complete sense.

Hmm. I've been taking my cues from two different places--"3.5.11.16  Function
Image" (which I understand to be the way to create a 'regular' procedural HF,
and where the image 'slice' is definitely evaluated on the X/Y plane) and
"3.7.12.1.1  The HF Macros" in shapes.inc. It's possible that I've been
combining/confusing their explanations; I need to step back and re-gather my
thoughts.
>
> As the HF_Square macro will build a height field over the X/Z plane, you'd
> need to set the UseUVheight parameter to true to get the samples from
> the X/Y plane.
>
> The regular height_field is always in "UseUVheight" mode, so to speak.

I think this is why it never occurred to me, re: the HF_Square macro--I was
expecting it to automatically be in that mode as well. Hmm, what a strange and
semi-confusing difference. I can't truly understand why the macro wasn't set up
'out of the box' to duplicate regular HF behavior. (Probably having to do with
the added feature of UV-mapping, I suppose.) Thanks for pointing this out; much
appreciated.


Post a reply to this message

From: Kenneth
Subject: Re: Textured block pattern problem
Date: 26 Mar 2009 16:05:00
Message: <web.49cbde91143ba0c5f50167bc0@news.povray.org>
"clipka" <nomail@nomail> wrote:

> Make sure you're not messing up these two in your experiments:
>
>     function { pattern { MyPattern } }
>     function 20, 20 { pattern { MyPattern } }
>

I'm not even sure anymore!! :-|  I've lately been *exclusively* thinking about
how they relate to HFs. Time to re-read the docs. (Sometimes, when I get onto a
problem and start dealing with minutia, I 'can't see the forest for the trees.')

BTW (and finally on-topic), I'm really liking the flag images I'm seeing!

KW


Post a reply to this message

From: clipka
Subject: Re: Textured block pattern problem
Date: 26 Mar 2009 16:55:00
Message: <web.49cbeb89143ba0c593bfb07f0@news.povray.org>
"Kenneth" <kdw### [at] earthlinknet> wrote:
> I think this is why it never occurred to me, re: the HF_Square macro--I was
> expecting it to automatically be in that mode as well. Hmm, what a strange and
> semi-confusing difference. I can't truly understand why the macro wasn't set up
> 'out of the box' to duplicate regular HF behavior. (Probably having to do with
> the added feature of UV-mapping, I suppose.)

I guess it has more to do with the way the other macros work. HF_Square is
probably there mainly for completeness. With a sphere for instance, the
standard mode makes much more sense than the UV-mapped, IMO. So for the macro
suite to be consistent, it had to be made inconsistent with the regular
height_field.


Post a reply to this message

From: Jörg 'Yadgar' Bleimann
Subject: @Chris B.: new flags for flags.inc!
Date: 27 Mar 2009 00:30:14
Message: <49cc5656@news.povray.org>
High!

Chris B wrote:

> If you code these in a way that's compatible with the 23 already in the 
> Object Collection at 
>
http://lib.povray.org/searchcollection/index2.php?objectName=Flags&contributorTag=chrisb

> 
> then we could build a pretty comprehensive set (each is simply defined 
> in it's own macro which sets the Flags_Texture identifier using a 
> texture scaled to fit a unit square.
> 
> It currently contains procedural textures for "Olympic", "UnionJack", 
> "UnionFlag1606", "StGeorgesCross", "StAndrewsCross", 
> "StPatricksCross","Wales", "Canada", "USA", "Australia", "New Zealand", 
> "Ireland", "France", "Belgium", "Italy", "Germany", "Austria", 
> "Luxembourg", "Netherlands", "Hungary", "Armenia", "Peru", "Nigeria".

That's a good idea... I just spent this night (CET) working myself into 
the logic of your files - and, so, contributing 18 additional flags your 
collection (I think it's more creative than just daddling away my 
lifetime with Freeciv...)!

I added flags of the following countries:
Bulgaria, Bolivia, Estonia, Gabon, Lithuania, Russia, Yemen, Ivory 
Coast, Chad, Guinea, Mali, Romania, Sierra Leone, Indonesia, Monaco, 
Poland, Ukraine and Mauritius

They are all still pretty simple, straight gradient patterns without any 
coats of arms; to do Indonesia, Monaco, Poland and Ukraine, I added a 
TwoStripeFlag() macro, also FourStripeFlag() for Mauritius (which is 
currently the only country flying a simple 4-stripe flag, but who knows 
that this may not change in the future?).

Another addition is a third parameter "light" for the Flags() macro: if 
"light" is set to 0, the texture gets ambient 1 and diffuse 0 in its 
finish, making it usable without light sources.

Oh, and I've got a suggestion for the more sophisticated flags: as 
bi-/tri-/tetracolors, circles, crescents, stars, crosses and diagonal 
stripes are quite common elements of flags throughout the world, it 
would be more elegant to define them via global macros and then build 
layered textures using them for any specific flag!

See you in Khyberspace!

Now playing: Clouds (Rosenstein & Wagener)


Post a reply to this message


Attachments:
Download 'newflags1.png' (21 KB) Download 'newflags2.png' (20 KB)

Preview of image 'newflags1.png'
newflags1.png

Preview of image 'newflags2.png'
newflags2.png


 

From: Chris B
Subject: Re: @Chris B.: new flags for flags.inc!
Date: 27 Mar 2009 05:59:38
Message: <49cca38a$1@news.povray.org>
Good work.
I look forward to seeing it up on the site.
Just replace the existing submission with a new 'Flags' submission with a 
higher version number.
If you need any help with that just shout.

Regards,
Chris B.


Post a reply to this message

From: Jörg 'Yadgar' Bleimann
Subject: @Chris B.: SHOUT!!!
Date: 28 Mar 2009 04:51:25
Message: <49cde50d$1@news.povray.org>
High!

Although I just registered and logged in, I can't proceed to the members 
area... I just always get the login tab!

Can you help me?

See you in Khyberspace!

Yadgar

Now playing: Six Days In Berlin, Part 6 (Mike Batt)


Post a reply to this message

<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>

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