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:24:19 EDT (-0400)
  Re: Trying to write new HF_ macros, how to cut the mesh?  
From: Christopher James Huff
Date: 9 Nov 2002 20:13:48
Message: <chrishuff-2817F4.20132909112002@netplex.aussie.org>
In article <web.3dcda89c6f496618178f7f9c0@news.povray.org>,
 "normdoering" <nor### [at] yahoocom> wrote:

> >Now I just couldn't figure out this sentence...
> 
> In my Corel photopaint I can separate the red, green and blue channels and
> each each channel becomes a separate grey scale kind of picture. White and
> black are the same on all channels and the difference in colors shows up
> only in subtle variations in grey shades. A strongly red color is whiter in
> the red channel and darker in the blue and green channels. If the red is
> pure enough it's twice as bright as either blue or green.

Right, images are represented with red, green, and blue channels.


> >the colors of a height field image are not shades of gray.
> I found out that you don't need to use the .hf dot operator, you can use
> either .red, .green, .blue or .grey operators on color images and the HF_
> macros work.

Right, .red, .green, and .blue return the values of specific color 
components, .grey returns the grayscale value, and .hf returns a height 
value using the same technique the height_field object uses.


> I was afraid of that. This is getting more complicated the more I think
> about it.

Heh, well, it looks like the height field macros were rewritten to use a 
rectangular patch of triangles, and it would take some big changes to 
handle other geometries. My original version wrote the triangles more 
directly, which would have made this modification easier, but my version 
didn't output in mesh2 format. Looks like the tetrahedron subdivision 
spherical height field is gone too...I liked that one, it didn't have 
the pinching problems at the poles, and spread out the triangles better.
Someone else gave some code that might be easier to modify than the 
height field macros.

-- 
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.