POV-Ray : Newsgroups : povray.advanced-users : Trying to write new HF_ macros, how to cut the mesh? : Re: Trying to write new HF_ macros, how to cut the mesh? Server Time
29 Jul 2024 06:16:04 EDT (-0400)
  Re: Trying to write new HF_ macros, how to cut the mesh?  
From: Christopher James Huff
Date: 9 Nov 2002 13:43:09
Message: <chrishuff-BF0503.13425509112002@netplex.aussie.org>
In article <web.3dcd4ff566ca52347efeba520@news.povray.org>,
 "normdoering" <nor### [at] yahoocom> wrote:

> If another function is declared and used by a new HF_ macro in order to get
> another color channel that channel might tell the macro where to cut off
> excess mesh to get the shape desired. I don't know if transmit and filter
> channels can be easily made by all paint programs or if theres a way the
> masks corel draw can make for .png files can be accessed (is transmit a
> mask channel?).

I think the best way would be a separate mask function. That way, you 
aren't limited to an image with an alpha channel. You could then use a 
user defined function to mask out parts of the image. (I don't even know 
how POV image maps handle alpha channels, I've never used it.)


> All the colors make white, that shows up on all color channels, I think. So,
> you'd have to do some sort of compare...

Now I just couldn't figure out this sentence...the colors of a height 
field image are not shades of gray. The red and green channels are 
combined to get 16 bit precision out of 2 8-bit channels, the blue 
channel is ignored. You could probably use the blue channel for mask 
information, if that's what you are asking...it won't work if you then 
use a grayscale image, and it will limit you to image files unless you 
do some extra work to encode the mask into a pigment function.


> However, how does one express that cutting so that HFCreate_() can read it?
> Will HFCreate have to be rewritten too?

Probably. For this you should probably write your own version, not 
modify the height field macros in shapes.inc, which could cause problems 
parsing other people's code.

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tagpovrayorg
http://tag.povray.org/


Post a reply to this message

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