POV-Ray : Newsgroups : povray.general : ERROR: blob seems to be no object identifier : Re: ERROR: blob seems to be no object identifier Server Time
29 Jul 2024 04:20:36 EDT (-0400)
  Re: ERROR: blob seems to be no object identifier  
From: MichaelJF
Date: 31 Jan 2013 14:25:00
Message: <web.510ac3f5baf748952f465fd30@news.povray.org>
"Sven Littkowski" <nomail@nomail> wrote:
> I created a scene with a macro, and inside that macro I use a blob. I believe I
> declared the things correctly, but I cannot render the scene. Instead, I always
> get the error message:
>
> "Parse Error: Object identifier expected"
>
> And here's the sample:
>
> // Full Hull
> #macro Full_Hull(ShowTexture)
> blob
> {
>  threshold 0.04
>  sphere // Upper Hull
>  {
>   < 0.0, 0.0, 0.0 > 1135.0, 1.0
>   scale < 10.0, 1.0, 1.0 >
>   translate < 0.0, 750.0, 0.0 >
>  }
>  sphere // Lower Hull
>  {
>   < 0.0, 0.0, 0.0 > 1135.0, 1.0
>   scale < 10.0, 1.0, 1.0 >
>   translate < 0.0, -750.0, 0.0 >
>  }
>  sphere // Middle Hull
>  {
>   < 0.0, 0.0, 0.0 > 1135.0, 3.0
>   scale < 6.0, 1.75, 1.0 >
>  }
>  sphere // Flat Disk-Alike Sphere
>  {
>   < 0.0, 0.0, 0.0 > 1500.0, 1.0
>   scale < 2.0, 0.5, 1.0 >
>  }
>  sphere // Smaller Field-Generator-Carrying Ellipsoid
>  {
>   < 0.0, 0.0, 0.0 > 1500.0, 1.0
>   scale < 1.0, 0.15, 1.25 >
>  }
>  #declare Random_1 = seed(2); // Plus_X
>  #declare Random_2 = seed(7); // Sphere Diameter
>  #declare Random_3 = seed(3); // Sphere Height
>  #declare Random_4 = seed(9); // Sphere Translate
>  #declare Line_X = -6100.0;
>  #while (Line_X < -800.0)
>   #declare Trace_Start = < Line_X, 0.0, -2000.0 >;
>   #declare Trace_Direction = < Line_X, 0.0, 0.0 >;
>   #declare Trace_Norm = < 0.0, 0.0, 0.0 >;
>   #declare Sphere_Diameter = RRand(75, 150, Random_2);
>   #declare Sphere_Y = RRand(0.25, 0.50, Random_3);
>   #declare Translate_X = Line_X-1500;
>   #declare Translate_Y = RRand(0, 250, Random_4);
>   #declare Translate_Z = trace (Pseudo_Hull, Trace_Start,
> (Trace_Direction-Trace_Start), Trace_Norm).z+250;
>   #declare DarkPower = 0.1;
>   sphere // Middle Constructions (-X +Y -Z)
>   {
>    < 0.0, 0.0, 0.0 > Sphere_Diameter, DarkPower
>    scale < 1.0, Sphere_Y, 1.25 >
>    texture { Middle_Constructions }
>    translate < Translate_X, Translate_Y, Translate_Z >
>   }
>   sphere // Middle Constructions (-X +Y +Z)
>   {
>    < 0.0, 0.0, 0.0 > Sphere_Diameter, DarkPower
>    scale < 1.0, Sphere_Y, 1.25 >
>    texture { Middle_Constructions }
>    translate < Translate_X, Translate_Y, (-1*Translate_Z) >
>   }
>   sphere // Middle Constructions (+X +Y -Z)
>   {
>    < 0.0, 0.0, 0.0 > Sphere_Diameter, DarkPower
>    scale < 1.0, Sphere_Y, 1.25 >
>    texture { Middle_Constructions }
>    translate < (-1 *Translate_X), Translate_Y, Translate_Z >
>   }
>   sphere // Middle Constructions (+X +Y -Z)
>   {
>    < 0.0, 0.0, 0.0 > Sphere_Diameter, DarkPower
>    scale < 1.0, Sphere_Y, 1.25 >
>    texture { Middle_Constructions }
>    translate <(-1 *Translate_X), Translate_Y, (-1*Translate_Z) >
>   }
>   sphere // Middle Constructions (-X -Y -Z)
>   {
>    < 0.0, 0.0, 0.0 > Sphere_Diameter, DarkPower
>    scale < 1.0, Sphere_Y, 1.25 >
>    texture { Middle_Constructions }
>    translate < Translate_X, (-1*Translate_Y), Translate_Z >
>   }
>   sphere // Middle Constructions (-X -Y +Z)
>   {
>    < 0.0, 0.0, 0.0 > Sphere_Diameter, DarkPower
>    scale < 1.0, Sphere_Y, 1.25 >
>    texture { Middle_Constructions }
>    translate < Translate_X, (-1*Translate_Y), (-1*Translate_Z) >
>   }
>   sphere // Middle Constructions (+X -Y -Z)
>   {
>    < 0.0, 0.0, 0.0 > Sphere_Diameter, DarkPower
>    scale < 1.0, Sphere_Y, 1.25 >
>    texture { Middle_Constructions }
>    translate < (-1 *Translate_X), (-1*Translate_Y), Translate_Z >
>   }
>   sphere // Middle Constructions (+X -Y -Z)
>   {
>    < 0.0, 0.0, 0.0 > Sphere_Diameter, DarkPower
>    scale < 1.0, Sphere_Y, 1.25 >
>    texture { Middle_Constructions }
>    translate <(-1 *Translate_X), (-1*Translate_Y), (-1*Translate_Z) >
>   }
>   #declare Plus_X = RRand(75, 150, Random_1);
>   #declare Line_X = Line_X + Plus_X;
>  #end
>  #if (ShowTexture=yes)
>   texture { Hull_Texture_Side scale 20000.0 translate < -10000.0, 0.0, 0.0 > }
>  #end
> }
> #end
>
> ------------------------------------
>
> And I am calling the macro this way:
>
> #macro Cut_Hull(ShowTexture)
> difference
> {
>  object { Full_Hull(ShowTexture) }
>  .
>  .
>  .
> }
>
> ------------------------------------
>
> And that one I call this way:
>
> #declare Ship = union
> {
>  object
>  {
>   Cut_Hull(yes)
>  }
>  .
>  .
>  .
> }
>
> Any ideas what I'm doing wrong? Thanks.

Hi Sven,
you haven't declared an object identifier. Your macro returns simply a blob
object but not an identifier. In your macro Cut_hull you can use the macro as it
is (without the "object {}") or you have to use something like


#macro Cut_Hull(ShowTexture)
   #declare FH=Full_Hull(ShowTexture) // this introduces the object
                                      // identifier FH which identifies
                                      //  your blob
   difference
   {
      object { FH } // now you can use the identifier
      .
      .
      .
   }
#end

Best regards,
Michael


Post a reply to this message

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