POV-Ray : Newsgroups : povray.newusers : How to locate/light this airplane skeleton? Server Time
23 Nov 2024 06:58:46 EST (-0500)
  How to locate/light this airplane skeleton? (Message 1 to 5 of 5)  
From: coltson
Subject: How to locate/light this airplane skeleton?
Date: 9 May 2021 23:05:00
Message: <web.6098a1dce5861cd1af42a94211da06af@news.povray.org>
Hello. I got the code to render the skeleton of an airplane. However, its only
the airplane's skeleton code, no "scene" code is there, so I cannot send povray
ro render it and see the results. So I used the menu and inserted two default
point light (changed one of them a bit) and "A typical camera".

However, the end result is nearly black, and nothing from the skeleton can be
seen:

https://i.postimg.cc/PqH85X1K/test.jpg

So I would like suggestions to locate the skeleton and light it

Here the code:

             // create a regular point light source
light_source {
  0*x                  // light's position (translated below)
  color rgb <1,1,1>    // light's color
  translate <-20, 40, -20>
}

light_source {
  0*x                  // light's position (translated below)
  color rgb <1,1,1>    // light's color
  translate <20, 40, 20>
}

// perspective (default) camera
camera {
  location  <0.0, 2.0, -10.0>
  look_at   <-3.0, 2.0,  0.0>
  right     x*image_width/image_height
}


#local R1  = 2.00;  // radius of the body outside Radius
#local R2  = 1.25;  // radius nose top y          Radius_Nose_TopY
#local R3  = 4.00;  // length nose                Length_Nose
#local R4  = 2.50;  // length forehead part       Length_Forehead
#local R5  = 9.50;  // length of tail part        Length_Tail

#macro Body(Radius, Radius_Nose_TopY, Length_Nose, Length_Forehead,
            Length_Tail)
union{
intersection{                                 //  nose lower part (1)
 sphere { <0,0,0>,1  scale <Length_Nose, Radius, Radius>}
 box    { <0,-1,-1>,<1,0,1> scale <Length_Nose, Radius, Radius>}
 }// -------------- end of intersection

intersection{                             // nose - forehead part (2)
 sphere { <0,0,0>,1  scale < Length_Forehead, Radius, Radius>}
 box    { <0,0,-1>,<1,1,1>  scale < Length_Forehead, Radius, Radius>}

 }// -------------- end of intersection
intersection{                            // nose front upper part (3)
 sphere { <0,0,0>,1  scale <Length_Nose, Radius_Nose_TopY, Radius>}
 box    { <0,0,-1>,<1,1,1> scale <Length_Nose, Radius, Radius>}
 }// -------------- end of intersection

intersection {                        // the tail of the airplane (4)
 sphere { <0,0,0>,1    scale < Length_Tail, Radius, Radius> }
 box    { <-1,-1,-1>,<0,1,1> scale < Length_Tail, Radius, Radius>}
 }// -------------- end of intersection
}// end of union
#end // ---------------------------------- end of macro "Body( ... )"

object { Body(R1, R2, R3, R4, R5)
        texture {
                pigment {
                        color_map {      // color map
                                [0.1 color red 1]
                                [0.5 color rgbf 1]
                        }
                }
                finish {diffuse 0.9 phong 1}
        }
}


Post a reply to this message

From: Thomas de Groot
Subject: Re: How to locate/light this airplane skeleton?
Date: 10 May 2021 02:27:17
Message: <6098d245$1@news.povray.org>
Op 10/05/2021 om 05:01 schreef coltson:
> Hello. I got the code to render the skeleton of an airplane. However, its only
> the airplane's skeleton code, no "scene" code is there, so I cannot send povray
> ro render it and see the results. So I used the menu and inserted two default
> point light (changed one of them a bit) and "A typical camera".
> 
> However, the end result is nearly black, and nothing from the skeleton can be
> seen:
> 
All elements to complete a scene are not present (sky, ground plane) and 
make seeing the plane more difficult. I would suggest the next 6 steps:

1- create a new scene

2- on the top toolbar, click on: "Insert" and then on: "Ready made scenes"

3- click for instance on: "Basic scene 02 - Desert with blue sky"

4- Insert the code of the plane at the end of the scene:
  #local R1  = 2.00;  // radius of the body outside Radius
  #local R2  = 1.25;  // radius nose top y          Radius_Nose_TopY
  #local R3  = 4.00;  // length nose                Length_Nose
  #local R4  = 2.50;  // length forehead part       Length_Forehead
  #local R5  = 9.50;  // length of tail part        Length_Tail

  #macro Body(Radius, Radius_Nose_TopY, Length_Nose, Length_Forehead,
               Length_Tail)
  union{
  intersection{                                 //  nose lower part (1)
    sphere { <0,0,0>,1  scale <Length_Nose, Radius, Radius>}
    box    { <0,-1,-1>,<1,0,1> scale <Length_Nose, Radius, Radius>}
    }// -------------- end of intersection

  intersection{                             // nose - forehead part (2)
    sphere { <0,0,0>,1  scale < Length_Forehead, Radius, Radius>}
    box    { <0,0,-1>,<1,1,1>  scale < Length_Forehead, Radius, Radius>}

    }// -------------- end of intersection
  intersection{                            // nose front upper part (3)
    sphere { <0,0,0>,1  scale <Length_Nose, Radius_Nose_TopY, Radius>}
    box    { <0,0,-1>,<1,1,1> scale <Length_Nose, Radius, Radius>}
    }// -------------- end of intersection

  intersection {                        // the tail of the airplane (4)
    sphere { <0,0,0>,1    scale < Length_Tail, Radius, Radius> }
    box    { <-1,-1,-1>,<0,1,1> scale < Length_Tail, Radius, Radius>}
    }// -------------- end of intersection
  }// end of union
  #end // ---------------------------------- end of macro "Body( ... )"

  object { Body(R1, R2, R3, R4, R5)
           texture {
                   pigment {
                           color_map {      // color map
                                   [0.1 color red 1]
                                   [0.5 color rgbf 1]
                           }
                   }
                   finish {diffuse 0.9 phong 1}
           }
  }

5- you may need either to scale, rotate, and/or translate the plane 
object itself, and/or

6- translate the camera backwards along the z-axis, to be able to see 
the whole plane.


-- 
Thomas


Post a reply to this message

From: Thomas de Groot
Subject: Re: How to locate/light this airplane skeleton?
Date: 10 May 2021 02:33:11
Message: <6098d3a7$1@news.povray.org>
Op 10/05/2021 om 08:27 schreef Thomas de Groot:

> 5- you may need either to scale, rotate, and/or translate the plane 
> object itself, and/or
> 
> 6- translate the camera backwards along the z-axis, to be able to see 
> the whole plane.
> 

I write "plane" here while meaning "airplane" of course!

-- 
Thomas


Post a reply to this message

From: Bald Eagle
Subject: Re: How to locate/light this airplane skeleton?
Date: 10 May 2021 06:30:00
Message: <web.60990abf8a98c5911f9dae3025979125@news.povray.org>
Looks to me like you airplane skeleton is obscuring your light sources.

A few things:

Move your light sources a lot farther away from the origin.   Just multiply the
locations you have by 10 and see if that helps.  If the light sources are being
overlapped by the object, then you can what you're seeing, or even just pitch
black, even though all of the requisite scene elements are present. (*)
You can also add no_shadow to you object, or shadowless to your light source(s).

Bring your camera at least 3-4 times farther back than the min_extent y
component.

Use a sky_sphere to bounce any light that you DO have around.

If still struggling, add a finish {emission 1} to your texture and then the
object will "light itself".


(*) You can know the limits of your objects by using min_extent and max_extent
to define vectors that you can output to the #debug stream and know where your
object is.


Post a reply to this message

From: Cousin Ricky
Subject: Re: How to locate/light this airplane skeleton?
Date: 11 May 2021 00:57:52
Message: <609a0ed0$1@news.povray.org>
On 2021-05-09 11:01 PM (-4), coltson wrote:
> Hello. I got the code to render the skeleton of an airplane. However, its only
> the airplane's skeleton code, no "scene" code is there, so I cannot send povray
> ro render it and see the results. So I used the menu and inserted two default
> point light (changed one of them a bit) and "A typical camera".
> 
> However, the end result is nearly black, and nothing from the skeleton can be
> seen:

Moving the lights and camera, or setting emission on the texture will
not help in this case (sorry, Bill).  Only creating an environment will
reveal the problem.

1. First declare the airplane, so its dimensions can be read.

2. Place the airplane in the scene.

3. Create a ground plane, using the airplane's dimensions as a guide.

4. Add a background.

----------[BEGIN CODE EXCERPT]----------
#declare Airplane =
object { Body(R1, R2, R3, R4, R5)
        texture {
                pigment {
                        color_map {      // color map
                                [0.1 color red 1]
                                [0.5 color rgbf 1]
                        }
                }
                finish {diffuse 0.9 phong 1}
        }
}
object { Airplane }
plane
{ y, min_extent (Airplane).y
  pigment { rgb 0.5 }
}
background { rgb <0.3, 0.5, 0.7> }
-----------[END CODE EXCERPT]-----------

As it turns out, your current camera shows enough of the airplane to
give you an idea of how to adjust it.

As you can see, the airplane really is black.  The reason is that the
pigment has no pattern on which to apply the color map.  The pigment
needs a pattern, such as gradient, marble, or wood.

You should have gotten a parse warning "Pigment type unspecified or not
1st item" or "No pigment type given" in the message window.


Post a reply to this message

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