POV-Ray : Newsgroups : povray.general : Colefax Hair Macro Server Time
2 Nov 2024 05:19:42 EDT (-0400)
  Colefax Hair Macro (Message 1 to 2 of 2)  
From: Skip Talbot
Subject: Colefax Hair Macro
Date: 9 Jun 2004 23:32:51
Message: <40c7d663$1@news.povray.org>
I'm tinkering with the excellent hair macro by Chris Colefax and have run
into a problem.  I don't have much experience working with macros so I am
probably overlooking something fairly obvious.  The problem is that I have
two objects each with their own fur.  The macro is not allowing me to
re-declare variables for different traits, but is instead reusing old
values.

  #declare  "pcmhair.mcr"
   #declare hair_length = 0.2;
   #declare hair_thickness = .005;
   #declare hair_thickness_curvature = 1;
   #declare hair_rotation = x*90;
   #declare hair_sky = -z;
   #declare hairs_per_patch = 150;
   #declare hair_rotate_to_surface = true;
   #declare hair_objects_per_unit = 750;
   #declare apply_hair_materials_to_mesh = true;
   #declare hair_rotation_turb = 0;
   #declare hair_patch_turb = 0;
read_mesh ("pd1.pcm")

   #declare  hair_length = 1;
   #declare  hair_thickness = .05;
   #declare hair_thickness_curvature = 1;
   #declare hair_rotation = x*90;
   #declare hair_sky = -z;
   #declare  hairs_per_patch = 20;
   #declare hair_rotate_to_surface = true;
   #declare hair_objects_per_unit = 5;
   #declare  apply_hair_materials_to_mesh = true
read_mesh ("pd2.pcm")

The hair on the second mesh is not 1 unit, but 0.2 like the first.  Some
aspects I am able to control differently, but others, like the length, stay
the same.  I tried putting these blocks in a macro and changing the declares
to locals but that did not help.  Any ideas?

Skip Talbot


Post a reply to this message

From: Skip Talbot
Subject: Re: Colefax Hair Macro
Date: 9 Jun 2004 23:33:46
Message: <40c7d69a$1@news.povray.org>
That first declare is a typo BTW, should be an include.  :P

Skip


Post a reply to this message

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