|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Hello,
recently I get the message "no pgment type given" when I use materials - I
have no idea what to do about it or where to look for bad progrtamming. The
help on the scene language doesn't help me either. Help!
Sander
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
OK, I use Povray 3.1g!
Sander <san### [at] the-internet> schreef in berichtnieuws
37cf91bf@news.povray.org...
> Hello,
> recently I get the message "no pgment type given" when I use materials - I
> have no idea what to do about it or where to look for bad progrtamming.
The
> help on the scene language doesn't help me either. Help!
> Sander
>
>
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Sander wrote:
>
> Hello,
> recently I get the message "no pgment type given" when I use materials - I
> have no idea what to do about it or where to look for bad progrtamming. The
> help on the scene language doesn't help me either. Help!
> Sander
If your scene is a small one post the code you are having problems with.
If it is a big scene try to isolate which part of the scene is causing the
warning by commenting out sections at a time and then post the code that
is causing the error. We can then help you isolate which object is causing
the problem. It usualy occurs when you are creating objects with CSG
operations and forget to attach a pigment to one of them. Sometimes they
are easy to locate and other times they can hide rather effectively. I've
been using the program for few years now and still get that warning on
occasion.
For example this should cause a warning like you are seeing:
intersection {
sphere { <0,0,0>,1 pigment { rgb 1 }}
plane { y,0 }
}
As you can see the plane has no pigment so the parser issues a no pigment
warning. You could get around this by specifying a pigment for both objects
or even more effeciently by adding a pigment to the intersection instead.
example:
intersection {
sphere { <0,0,0>,1 }
plane { y,0 }
pigment { rgb 1 }
}
--
Ken Tyler
See my 850+ Povray and 3D Rendering and Raytracing Links at:
http://home.pacbell.net/tylereng/index.html
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Hello Ken,
You are quick!
I hope this isn't too large.
I get 3 times the message "No pigment type given."
It must be in the material "Kolom_M", but I don't see it.
Thanks for your answers!
Sander
////////////////////////////////////////////////////////////////////////////
////////
#include "colors.inc"
#declare Kolom_M =
material{
texture{
finish{
reflection 0.1
diffuse 0.09
specular 0.2
roughness 1/2
ambient 0.15
phong 0.1
}
pigment{color <0.8,0.8,0.6>}
}
}
sky_sphere // sky-sphere
{
pigment{
gradient y
color_map{
[ 0.5 color <0.61,0.85,0.94> ]
[ 1.0 color <0.61,0.85,0.94>*1.5 ]
}
scale 2
translate -1
}
}
#declare COL =
union{
cylinder{ <0, 0, 0>,<0, 5, 0>, 30
material{ Kolom_M }
}
cylinder{ <0, 25, 0>, <0, 100, 0>, 22
material {Kolom_M }
}
scale 2
}
camera{
location <2600, 150, 20600>
look_at <5300, 50, 20000>
angle 15
}
light_source { <2300, 1000, 20700> color <1, 1, 1> area_light x*300, z*300, 3, 3
looks_like{sphere{0,20pigment{color White*10}}}}
light_source { <2300, 1000, 18800> color <1, 1, 1> area_light x*300, z*300, 3, 3
looks_like{sphere{0,20pigment{color White*10}}}}
polygon {5, <-13000, 0.0, -13000>,
<-13000, 0.0, 37000>,
< 37000, 0.0, 37000>,
< 37000, 0.0, -13000>,
<-13000, 0.0, -13000>
pigment{color Yellow}
}
object{ COL translate < 5300, 0, 20000 > }
object{ COL translate < 5800, 0, 20000 > }
object{ COL translate < 4800, 0, 20000 > }
////////////////////////////////////////////////////////////////////////////////
Ken <tyl### [at] pacbellnet> schreef in berichtnieuws 37CF9459.AAAC70B9@pacbell.net...
>
>
> If your scene is a small...
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
If you substitute this:
: #declare COL =
: union{
: cylinder{ <0, 0, 0>,<0, 5, 0>, 30
: material{ Kolom_M }
: }
: cylinder{ <0, 25, 0>, <0, 100, 0>, 22
: material {Kolom_M }
: }
: scale 2
: }
with this:
: #declare COL =
: union{
: cylinder{ <0, 0, 0>,<0, 5, 0>, 30
: }
: cylinder{ <0, 25, 0>, <0, 100, 0>, 22
: }
: material {Kolom_M }
: scale 2
: }
It doesn't complain anymore.
However, it shouldn't complain in the previous case either. Is this a bug?
--
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Sander wrote:
>
> Hello Ken,
> You are quick!
I know :)
> I hope this isn't too large.
> I get 3 times the message "No pigment type given."
> It must be in the material "Kolom_M", but I don't see it.
> Thanks for your answers!
> Sander
Your example is well within the acceptable size limits for this group.
I am not sure why you are getting that warning with your current use
of material. It really should work from what I can tell. Anyway there
are two ways to get rid of the warnings. Either move the materials from
within the cylinder statements to the end of the union as illustrated or
remove them completely from the entire union and attach them to the objects
when they are used. I have also illustrated how this should be done.
Memory wise if you had 1000's of objects you would be better off adding
the material statement to the end of the union instead of adding them to
the individual pieces.
#declare COL =
union{
cylinder{ <0, 0, 0>,<0, 5, 0>, 30
// material{ Kolom_M }
}
cylinder{ <0, 25, 0>, <0, 100, 0>, 22
// material {Kolom_M }
}
scale 2
material {Kolom_M } }
camera{
location <2600, 150, 20600>
look_at <5300, 50, 20000>
angle 15
}
object{ COL translate < 5300, 0, 20000 > }// material {Kolom_M } }
object{ COL translate < 5800, 0, 20000 > }// material {Kolom_M } }
object{ COL translate < 4800, 0, 20000 > }// material {Kolom_M } }
As far as educational purposes go you can eliminate the material statement
altogether from your scene. The material statement was added to Pov so that
you could pre-declare textures that need an interior statement i.e:
Declare Glass =
texture {
pigment { rgbf 1 }
finish { ambient .3 diffuse .12 specular 1 roughness .0001 }
}
#declare My_Glass =
material {
texture { Glass }
interior { ior 1.33 }
}
sphere { 0,1
material { My_Glass }
}
There is no real reason to use it except in these cases and it was not
intended to be used otherwise. In your case you can use the texture as
a wrapper by itself without the need for the material statment being in
there.
--
Ken Tyler
See my 850+ Povray and 3D Rendering and Raytracing Links at:
http://home.pacbell.net/tylereng/index.html
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Nieminen Juha wrote:
> However, it shouldn't complain in the previous case either. Is this a bug?
I question that myself... Hmmmm....
--
Ken Tyler
See my 850+ Povray and 3D Rendering and Raytracing Links at:
http://home.pacbell.net/tylereng/index.html
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Hello N.J.,
Thank you, yes, that works. But I really need two different materials in the
union, and according to Ken I don't need materials at all, textures wouls be
fine. This I did and everything is OK.
Thanks, Sander
Nieminen Juha <war### [at] cctutfi> schreef in berichtnieuws
37cfb4cd@news.povray.org...
>
> If you substitute this:
>
> : #declare COL =
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Hello Ken, thanks a lot. Yes, I see now. I use now textures and all is fine.
I really neede different textures in the union, that in the complete form
contains many objects of different textures. I didn't read up carefully on
materials. What a nice way of getting solutions to problems! Thanks,
Sander
Ken <tyl### [at] pacbellnet> schreef in berichtnieuws
37CFB5CC.FFF231B4@pacbell.net...
>
>
}
>
> There is no real reason to use it except in these cases and it was not
> intended to be used otherwise. In your case you can use the texture as
> a wrapper by itself without the need for the material statment being in
> there.
>
> --
> Ken Tyler
>
> See my 850+ Povray and 3D Rendering and Raytracing Links at:
> http://home.pacbell.net/tylereng/index.html
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Looks suspicious.
I can't test it myself right now. Does it still complain when you flip the
finish and pigment blocks?
Just an idea.
Margus
Nieminen Juha wrote:
>
> However, it shouldn't complain in the previous case either. Is this a bug?
>
> --
> main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
> ):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|