POV-Ray : Newsgroups : povray.general : ERROR: blob seems to be no object identifier Server Time
29 Jul 2024 06:23:21 EDT (-0400)
  ERROR: blob seems to be no object identifier (Message 1 to 10 of 12)  
Goto Latest 10 Messages Next 2 Messages >>>
From: Sven Littkowski
Subject: ERROR: blob seems to be no object identifier
Date: 31 Jan 2013 13:55:01
Message: <web.510abceecc4417dc32076fd10@news.povray.org>
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.


Post a reply to this message

From: MichaelJF
Subject: Re: ERROR: blob seems to be no object identifier
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

From: MichaelJF
Subject: Re: ERROR: blob seems to be no object identifier
Date: 31 Jan 2013 14:50:01
Message: <web.510aca86baf748952f465fd30@news.povray.org>
The idea behind it is that you can use your object again and again in a scene
without having to define it every time. E.G.:

#declare Zufall=seed(317);
#declare Count=0;
#while (Count<10)
   object { FH translate <rand(Zufall)*10,0,rand(Zufall)*10> }
   #declare Count = Count + 1;
#end

This would place the object FH ten times at random positions about the origin in
the x-z-plane.

Best regards,
Michael


Post a reply to this message

From: Sven Littkowski
Subject: Re: ERROR: blob seems to be no object identifier
Date: 31 Jan 2013 15:00:01
Message: <web.510acd0fbaf7489532076fd10@news.povray.org>
Hmmmm, unfortunately still the same error.

I followed your advice:

#macro Cut_Hull(ShowTexture)
#declare FH = Full_Hull(ShowTexture)
difference
{
 object { FH }
....
}

If you like, I can post here the entire scene, no problem. Please let me know.


Post a reply to this message

From: Trevor G Quayle
Subject: Re: ERROR: blob seems to be no object identifier
Date: 31 Jan 2013 15:40:01
Message: <web.510ad602baf7489581c811d20@news.povray.org>
"Sven Littkowski" <nomail@nomail> wrote:
> Hmmmm, unfortunately still the same error.
>
> I followed your advice:
>
> #macro Cut_Hull(ShowTexture)
> #declare FH = Full_Hull(ShowTexture)
> difference
> {
>  object { FH }
> ....
> }
>
> If you like, I can post here the entire scene, no problem. Please let me know.

Post the whole scene. I can't get it to error with what you have posted.

-tgq


Post a reply to this message

From: Sven Littkowski
Subject: Re: ERROR: blob seems to be no object identifier
Date: 31 Jan 2013 21:55:01
Message: <web.510b2df7baf7489532076fd10@news.povray.org>
I put back to my original code, removing (for now) the DECLARE version you
suggested. This way, you can see the original file.

Sven

--------------------------------------

#version 3.6;

#declare MyRadiosity = no; // yes

global_settings
{
 assumed_gamma 1.0
 #if(MyRadiosity)
  radiosity
  {
   pretrace_start 0.08
   pretrace_end   0.015
   count 400
   error_bound 0.75
   recursion_limit 1
  }
 #end
}

#include "SL - Space - Ship - Cargo - Type 001 - Sepaei.inc"


camera
{
 location  < -10000.0, 10000, -10000.0 >
 look_at   < 0.0, 0.0, 0.0 >
}

light_source { < -50000, 50000, -50000 >  White * 1.0 }
/*
sky_sphere
{
 pigment
 {
  planar
  color_map
  {
   [ 0.0 color < 0.0, 0.0, 0.0 > ]
   [ 1.0 color < 0.0, 0.0, 0.0 > ]
  }
 }
}
*/
// Full Hull
#declare Pseudo_Hull = 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, 2.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 >
 }
}

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

// Full Hull
#macro Cut_Hull(ShowTexture)
difference
{
 object { Full_Hull(ShowTexture) }
 union
 {
  cylinder
  {
   < -20000.1, 0.0, 0.0 > < -7500.0, 0.0, 0.0 > 2000.0
  }
  cylinder
  {
   < 7500.0, 0.0, 0.0 > < 20000.1, 0.0, 0.0 > 2000.0
  }
  texture { Hull_Texture_Top scale 20000.0 translate < -10000.0, 0.0, 0.0 > }
 }
 #declare Trace_Start = < -1000.0, 50.00001, -3000.0 >;
 #declare Trace_Direction = < -1000.0, 50.00001, 0.0 >;
 #declare Trace_Norm = < 0.0, 0.0, 0.0 >;
 #declare Maximum = trace (Full_Hull(ShowTexture), Trace_Start,
Trace_Direction-Trace_Start, Trace_Norm).y - 750.0;
 cylinder
 {
  < 0.0, -50.0, Maximum > < 0.0, 50.0, Maximum > 999.99999
  texture { Inside scale 1.0 translate < 0.0, 0.0, 0.0 > }
 }
 cylinder
 {
  < 0.0, -50.0, (-1 * Maximum) > < 0.0, 50.0, (-1 * Maximum) > 999.99999
  texture { Inside scale 1.0 translate < 0.0, 0.0, 0.0 > }
 }
 cylinder
 {
  < 0.0, -49.99999, Maximum > < 0.0, 50.0, Maximum > 1000.0
  texture { Hull_Texture_Center_Side scale 20000.0 rotate < 90.0, 0.0, 0.0 > }
 }
 cylinder
 {
  < 0.0, -49.99999, (-1 * Maximum) > < 0.0, 50.0, (-1 * Maximum) > 1000.0
  texture { Hull_Texture_Center_Side scale 20000.0 rotate < 90.0, 0.0, 0.0 > }
 }
}
#end

#declare Up_Low_Hull = difference
{
 object { Cut_Hull(no) }
 box { < -7500.0, -1400.0, -1700.0 > < 7500.0, 1400.0, 1700.0 > }
 scale < 1.0, 1.0000000001, 1.0 >
 texture { Hull_Texture_Top scale 20000.0 translate < -10000.0, 0.0, 0.0 > }
}

// 4x Hull Ends
#declare Hulls_End = union
{
 #declare Random_1 = seed(0);
 #declare Random_2 = seed(12345);
 #declare Count = 0;
 #declare Trace_Start = < -7499.99999, 2000.0, 0.0 >;
 #declare Trace_Direction = < -7499.99999, 0.0, 0.0 >;
 #declare Trace_Norm = < 0.0, 0.0, 0.0 >;
 #declare Maximum = trace (Cut_Hull, Trace_Start, Trace_Direction-Trace_Start,
Trace_Norm).y - 750.0;
 #declare Minimum = 100.0;
 #declare Maximum_Inner = Maximum-Minimum;
 #declare Maximum_Outer = Minimum;
 torus { Maximum-Minimum, Minimum rotate < 0.0, 0.0, 90.0 > }
 cylinder { < -100.0, 0.0, 0.0 > < 0.0, 0.0, 0.0 > Maximum-Minimum }
// #while (Count < 10)
//  #declare Outer=RRand(Minimum, Maximum_Outer, Random_1);
//  #declare Inner=RRand(Minimum, Maximum_Inner, Random_1);
//  #if (Outer+Inner<=Maximum)
//   #declare Count=Count+1;
//  #end
// #end
 texture { Hull_Texture_End scale 20000.0 translate < -10000.0, 0.0, 0.0 > }
}

// 4x Hangar Light bars
#declare Hangar_Light_Bars = union
{
 #declare Thickness = 1.0;
 #declare Axis_X = -1000.0;
 #while (Axis_X < 1000.0)
  #declare Trace_Norm = < 0.0, 0.0, 0.0 >;
  #declare Trace1_Start = < Axis_X, 50.00001, -3000.0 >;
  #declare Trace1_Direction = < Axis_X, 50.00001, 0.0 >;
  #declare Axis_Z1 = trace (Cut_Hull, Trace1_Start,
Trace1_Direction-Trace1_Start, Trace_Norm).z;
  #declare Trace2_Start = < (Axis_X+10.0), 50.00001, -3000.0 >;
  #declare Trace2_Direction = < (Axis_X+10.0), 50.00001, 0.0 >;
  #declare Axis_Z2 = trace (Cut_Hull, Trace2_Start,
Trace2_Direction-Trace2_Start, Trace_Norm).z;

  sphere { < Axis_X, 50.0, Axis_Z1 > Thickness }
  cylinder { < Axis_X, 50.0, Axis_Z1 > < (Axis_X+10.0), 50.0, Axis_Z2 >
Thickness }
  sphere { < Axis_X, -50.0, Axis_Z1 > Thickness }
  cylinder { < Axis_X, -50.0, Axis_Z1 > < (Axis_X+10.0), -50.0, Axis_Z2 >
Thickness }

  sphere { < Axis_X, 50.0, (-1 * Axis_Z1) > Thickness }
  cylinder { < Axis_X, 50.0, (-1 * Axis_Z1) > < (Axis_X+10.0), 50.0, (-1 *
Axis_Z2) > Thickness }
  sphere { < Axis_X, -50.0, (-1 * Axis_Z1) > Thickness }
  cylinder { < Axis_X, -50.0, (-1 * Axis_Z1) > < (Axis_X+10.0), -50.0, (-1 *
Axis_Z2) > Thickness }

  #declare Axis_X = Axis_X + 10.0;
 #end
 #declare Trace2_Start = < (Axis_X+10.0), 50.00001, -3000.0 >;
 #declare Trace2_Direction = < (Axis_X+10.0), 50.00001, 0.0 >;
 #declare Axis_Z2 = trace (Cut_Hull, Trace2_Start,
Trace2_Direction-Trace2_Start, Trace_Norm).z;
 sphere { < (Axis_X+10.0), 50.0, Axis_Z2 > Thickness }
 sphere { < (Axis_X+10.0), -50.0, Axis_Z2 > Thickness }
 sphere { < (Axis_X+10.0), 50.0, (-1 * Axis_Z2) > Thickness }
 sphere { < (Axis_X+10.0), -50.0, (-1 * Axis_Z2) > Thickness }
 texture { Hangar_Light_Stripe }
}

#declare Ship = union
{
 object
 {
  Cut_Hull(yes)
 }
 object
 {
  Up_Low_Hull
 }
 object
 {
  Hulls_End
  translate < -7500.0, 750.0, 0.0 >
 }
 object
 {
  Hulls_End
  translate < 7500.0, 750.0, 0.0 >
 }
 object
 {
  Hulls_End
  translate < -7500.0, -750.0, 0.0 >
 }
 object
 {
  Hulls_End
  translate < 7500.0, -750.0, 0.0 >
 }
 object
 {
  Hangar_Light_Bars
 }
}

union
{
 object
 {
  Ship
 }
}


Post a reply to this message

From: MichaelJF
Subject: Re: ERROR: blob seems to be no object identifier
Date: 1 Feb 2013 05:10:00
Message: <web.510b93c8baf74895fcf1693e0@news.povray.org>
"Sven Littkowski" <nomail@nomail> wrote:
> I put back to my original code, removing (for now) the DECLARE version you
> suggested. This way, you can see the original file.
>

Hi Sven,

you used the macros within the trace-commands. trace() needs an object
identifier. Below is the code I got running. I had to change the colors a bit.

Best regards,
Michael

/**********************************************************/



#version 3.6;

#include "colors.inc"
#include "rand.inc"

#declare MyRadiosity = no; // yes

global_settings
{
 assumed_gamma 1.0
 #if(MyRadiosity)
  radiosity
  {
   pretrace_start 0.08
   pretrace_end   0.015
   count 400
   error_bound 0.75
   recursion_limit 1
  }
 #end
}

//#include "SL - Space - Ship - Cargo - Type 001 - Sepaei.inc"


camera
{
 location  < -10000.0, 10000, -10000.0 >
 look_at   < 0.0, 0.0, 0.0 >
}

light_source { < -50000, 50000, -50000 >  White * 1.0 }
/*
sky_sphere
{
 pigment
 {
  planar
  color_map
  {
   [ 0.0 color < 0.0, 0.0, 0.0 > ]
   [ 1.0 color < 0.0, 0.0, 0.0 > ]
  }
 }
}
*/
// Full Hull
#declare Pseudo_Hull = 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, 2.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 >
 }
}

// Full Hull
#macro Full_Hull(Showtexture)
   #declare Full_HullObj=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 >
            pigment { color Green } // 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 >
            pigment { color Green } // 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 >
             pigment { color Green } // 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 >
            pigment { color Green } // 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 >
            pigment { color Green } // 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 >
            pigment { color Green } // 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 >
            pigment { color Green } // 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 >
            pigment { color Green } // 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)
       pigment { color Green } // texture { Hull_pigment { color Green } //
texture_Side scale 20000.0 translate < -10000.0, 0.0, 0.0 > }
    #end
   }
#end



// Full Hull
#macro Cut_Hull(Showtexture)
   #declare Cut_HullObj = difference {
      Full_Hull(Showtexture)
      object { Full_HullObj }
      union
      {
         cylinder
         {
            < -20000.1, 0.0, 0.0 > < -7500.0, 0.0, 0.0 > 2000.0
         }
         cylinder
         {
            < 7500.0, 0.0, 0.0 > < 20000.1, 0.0, 0.0 > 2000.0
         }
         pigment { color Green } // texture { Hull_pigment { color Green } //
texture_Top scale 20000.0 translate < -10000.0, 0.0, 0.0 > }
     }
     #declare Trace_Start = < -1000.0, 50.00001, -3000.0 >;
     #declare Trace_Direction = < -1000.0, 50.00001, 0.0 >;
     #declare Trace_Norm = < 0.0, 0.0, 0.0 >;
     #declare Maximum = trace (Full_HullObj,
Trace_Start,Trace_Direction-Trace_Start, Trace_Norm).y - 750.0;
     cylinder
     {
        < 0.0, -50.0, Maximum > < 0.0, 50.0, Maximum > 999.99999
        pigment { color Green } // texture { Inside scale 1.0 translate < 0.0,
0.0, 0.0 > }
     }
     cylinder
     {
        < 0.0, -50.0, (-1 * Maximum) > < 0.0, 50.0, (-1 * Maximum) > 999.99999
        pigment { color Green } // texture { Inside scale 1.0 translate < 0.0,
0.0, 0.0 > }
     }
     cylinder
     {
        < 0.0, -49.99999, Maximum > < 0.0, 50.0, Maximum > 1000.0
       pigment { color Green } // texture { Hull_pigment { color Green } //
texture_Center_Side scale 20000.0 rotate < 90.0, 0.0, 0.0 > }
     }
     cylinder
     {
        < 0.0, -49.99999, (-1 * Maximum) > < 0.0, 50.0, (-1 * Maximum) > 1000.0
        pigment { color Green } // texture { Hull_pigment { color Green } //
texture_Center_Side scale 20000.0 rotate < 90.0, 0.0, 0.0 > }
     }
   }
#end

#declare Up_Low_Hull = difference {
   // object { Cut_Hull(no) }
   Cut_Hull(no)
   object { Cut_HullObj }
   box { < -7500.0, -1400.0, -1700.0 > < 7500.0, 1400.0, 1700.0 > }
   scale < 1.0, 1.0000000001, 1.0 >
   pigment { color Green } // texture { Hull_pigment { color Green } //
texture_Top scale 20000.0 translate < -10000.0, 0.0, 0.0 > }
}

// 4x Hull Ends
#declare Hulls_End = union {
   #declare Random_1 = seed(0);
   #declare Random_2 = seed(12345);
   #declare Count = 0;
   #declare Trace_Start = < -7499.99999, 2000.0, 0.0 >;
   #declare Trace_Direction = < -7499.99999, 0.0, 0.0 >;
   #declare Trace_Norm = < 0.0, 0.0, 0.0 >;
   #declare Maximum = trace (Cut_HullObj, Trace_Start,
Trace_Direction-Trace_Start,Trace_Norm).y - 750.0;
   #declare Minimum = 100.0;
   #declare Maximum_Inner = Maximum-Minimum;
   #declare Maximum_Outer = Minimum;
   torus { Maximum-Minimum, Minimum rotate < 0.0, 0.0, 90.0 > }
   cylinder { < -100.0, 0.0, 0.0 > < 0.0, 0.0, 0.0 > Maximum-Minimum }
// #while (Count < 10)
//  #declare Outer=RRand(Minimum, Maximum_Outer, Random_1);
//  #declare Inner=RRand(Minimum, Maximum_Inner, Random_1);
//  #if (Outer+Inner<=Maximum)
//   #declare Count=Count+1;
//  #end
// #end
   pigment { color Green } // texture { Hull_pigment { color Green } //
texture_End scale 20000.0 translate < -10000.0, 0.0, 0.0 > }
}

// 4x Hangar Light bars
#declare Hangar_Light_Bars = union
{
 #declare Thickness = 1.0;
 #declare Axis_X = -1000.0;
 #while (Axis_X < 1000.0)
  #declare Trace_Norm = < 0.0, 0.0, 0.0 >;
  #declare Trace1_Start = < Axis_X, 50.00001, -3000.0 >;
  #declare Trace1_Direction = < Axis_X, 50.00001, 0.0 >;
  #declare Axis_Z1 = trace (Cut_HullObj,
Trace1_Start,Trace1_Direction-Trace1_Start, Trace_Norm).z;
  #declare Trace2_Start = < (Axis_X+10.0), 50.00001, -3000.0 >;
  #declare Trace2_Direction = < (Axis_X+10.0), 50.00001, 0.0 >;
  #declare Axis_Z2 = trace (Cut_HullObj,
Trace2_Start,Trace2_Direction-Trace2_Start, Trace_Norm).z;

  sphere { < Axis_X, 50.0, Axis_Z1 > Thickness }
  cylinder { < Axis_X, 50.0, Axis_Z1 > < (Axis_X+10.0), 50.0, Axis_Z2 >
Thickness }
  sphere { < Axis_X, -50.0, Axis_Z1 > Thickness }
  cylinder { < Axis_X, -50.0, Axis_Z1 > < (Axis_X+10.0), -50.0, Axis_Z2 >
Thickness }

  sphere { < Axis_X, 50.0, (-1 * Axis_Z1) > Thickness }
  cylinder { < Axis_X, 50.0, (-1 * Axis_Z1) > < (Axis_X+10.0), 50.0, (-1 *
Axis_Z2) > Thickness }
  sphere { < Axis_X, -50.0, (-1 * Axis_Z1) > Thickness }
  cylinder { < Axis_X, -50.0, (-1 * Axis_Z1) > < (Axis_X+10.0), -50.0, (-1 *
Axis_Z2) > Thickness }

  #declare Axis_X = Axis_X + 10.0;
 #end
 #declare Trace2_Start = < (Axis_X+10.0), 50.00001, -3000.0 >;
 #declare Trace2_Direction = < (Axis_X+10.0), 50.00001, 0.0 >;
 #declare Axis_Z2 = trace (Cut_HullObj,
Trace2_Start,Trace2_Direction-Trace2_Start, Trace_Norm).z;
 sphere { < (Axis_X+10.0), 50.0, Axis_Z2 > Thickness }
 sphere { < (Axis_X+10.0), -50.0, Axis_Z2 > Thickness }
 sphere { < (Axis_X+10.0), 50.0, (-1 * Axis_Z2) > Thickness }
 sphere { < (Axis_X+10.0), -50.0, (-1 * Axis_Z2) > Thickness }
 pigment { color Green } // texture { Hangar_Light_Stripe }
}

#declare Ship = union
{
// object
// {
  Cut_Hull(yes)
// }
 object
 {
  Up_Low_Hull
 }
 object
 {
  Hulls_End
  translate < -7500.0, 750.0, 0.0 >
 }
 object
 {
  Hulls_End
  translate < 7500.0, 750.0, 0.0 >
 }
 object
 {
  Hulls_End
  translate < -7500.0, -750.0, 0.0 >
 }
 object
 {
  Hulls_End
  translate < 7500.0, -750.0, 0.0 >
 }
 object
 {
  Hangar_Light_Bars
 }
}

union
{
 object
 {
  Ship
 }
}


Post a reply to this message

From: Sven Littkowski
Subject: Re: ERROR: blob seems to be no object identifier
Date: 2 Feb 2013 17:10:01
Message: <web.510d8e75baf7489532076fd10@news.povray.org>
Hi, thanks for the sample text. But still, the code creates errors. Did you post
the latest version?

Maybe a problem is, that this web page inserts line breaks, and plenty lines are
not the way they should. If you like, I could give you my e-mail address, and
you e-mail me the code. Is that okay with you?


Post a reply to this message

From: clipka
Subject: Re: ERROR: blob seems to be no object identifier
Date: 2 Feb 2013 18:34:07
Message: <510da26f$1@news.povray.org>
Am 02.02.2013 23:08, schrieb Sven Littkowski:
> Hi, thanks for the sample text. But still, the code creates errors. Did you post
> the latest version?
>
> Maybe a problem is, that this web page inserts line breaks, and plenty lines are
> not the way they should. If you like, I could give you my e-mail address, and
> you e-mail me the code. Is that okay with you?

how about attaching it to a post in povray.binaries.scene-files?


Post a reply to this message

From: MichaelJF
Subject: Re: ERROR: blob seems to be no object identifier
Date: 3 Feb 2013 13:50:02
Message: <web.510eb0d5baf748959b9378020@news.povray.org>
clipka <ano### [at] anonymousorg> wrote:
> Am 02.02.2013 23:08, schrieb Sven Littkowski:
> > Hi, thanks for the sample text. But still, the code creates errors. Did you post
> > the latest version?
> >
> > Maybe a problem is, that this web page inserts line breaks, and plenty lines are
> > not the way they should. If you like, I could give you my e-mail address, and
> > you e-mail me the code. Is that okay with you?
>
> how about attaching it to a post in povray.binaries.scene-files?

A fine idea. But since Sven reports problems I will verify the code before
posting. Unfortunatelly I have a longer rendering under way, so please be
patient till tomorrow...

Best regards,
Michael


Post a reply to this message

Goto Latest 10 Messages Next 2 Messages >>>

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