![](/i/fill.gif) |
![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Hi group,
following problem:
I want to make an object of a csg to have an individual pigment, but the
normal pattern of the whole csg (with all translations and rotations).
here is an (simplified) example of what i mean:
union{
sphere{x,1 pigment{ rgb<0,1,0>} } /* I want this sphere to have the
parent's bumps AND to be green!!*/
sphere{-x,1}
pigment{rgb <1,0,0>}
normal{bumps scale .1 }
}
There are several objects in my csg, and all are translated in a different
way, so i cannot use a #declared normal pattern.
I hope someone can help me...
TIA, Daniel
--
Daniel Pirch
nap### [at] linux zrz tu-berlin de
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Daniel Pirch wrote:
>
> Hi group,
> following problem:
> I want to make an object of a csg to have an individual pigment, but the
> normal pattern of the whole csg (with all translations and rotations).
> here is an (simplified) example of what i mean:
>
> union{
> sphere{x,1 pigment{ rgb<0,1,0>} } /* I want this sphere to have the
> parent's bumps AND to be green!!*/
> sphere{-x,1}
> pigment{rgb <1,0,0>}
> normal{bumps scale .1 }
> }
>
> There are several objects in my csg, and all are translated in a different
> way, so i cannot use a #declared normal pattern.
>
> I hope someone can help me...
> TIA, Daniel
>
> --
> Daniel Pirch
> nap### [at] linux zrz tu-berlin de
If I understand your question correctly what you are looking for is several
objects that have their own pigment and then you want to apply a global normal
pattern to the entire csg'd object. This can be done quite simply using the
following method.
union {
sphere { x,1 pigment <1,0,0> }
sphere {-x,1 pigment <1,1,0> }
sphere { y,1 pigment <0,1,0> }
sphere {-y,1 pigment <0,0,1> }
normal { bumps 1 scale 1 }
}
In the above operation you apply the normal to the csg constuct as opposed
to one or several of the individual components.
By the way you can use a declared normal pattern anywhere a normal would
normaly be used. For example:
#declare My_Normal = normal { bumps 1 scale 1 }
union {
sphere { x,1 pigment <1,0,0> }
sphere {-x,1 pigment <1,1,0> }
sphere { y,1 pigment <0,1,0> }
sphere {-y,1 pigment <0,0,1> }
normal { My_Normal }
}
If I have missed your intent please try to describe again what it is you
are looking for.
--
Ken Tyler
mailto://tylereng@pacbell.net
http://home.pacbell.net/tylereng/links.htm
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Ken wrote:
>
> Daniel Pirch wrote:
> >
>
> If I understand your question correctly what you are looking for is several
> objects that have their own pigment and then you want to apply a global normal
> pattern to the entire csg'd object. This can be done quite simply using the
> following method.
>
> union {
> sphere { x,1 pigment <1,0,0> }
> sphere {-x,1 pigment <1,1,0> }
> sphere { y,1 pigment <0,1,0> }
> sphere {-y,1 pigment <0,0,1> }
> normal { bumps 1 scale 1 }
> }
>
I'm sorry but this won't work (or I am getting real perception problems).
I've had this problem more then once. If you stick a pigment on a part of a csg
(or blob) the normal or finish you use for the whole object doesn't apply there.
Remco
http://www.xs4all.nl/~remcodek/softmach.html
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Remco de Korte wrote:
> I'm sorry but this won't work (or I am getting real perception problems).
> I've had this problem more then once. If you stick a pigment on a part of a csg
> (or blob) the normal or finish you use for the whole object doesn't apply there.
>
> Remco
> http://www.xs4all.nl/~remcodek/softmach.html
Then what is the solution ? Should we just use softext instead and forget
about normals and them other pesky primitives ?
--
Ken Tyler
mailto://tylereng@pacbell.net
http://home.pacbell.net/tylereng/links.htm
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Remco de Korte wrote:
> I'm sorry but this won't work (or I am getting real perception problems).
> I've had this problem more then once. If you stick a pigment on a part of a csg
> (or blob) the normal or finish you use for the whole object doesn't apply there.
If at first you don't succeed... you use the other workable solution. This
following example clearly shows that you can maintain even distribution of
a normal pattern for each object in the csg operation and it looks kool too !
camera {location<0,0,-5>look_at 0}
light_source {<0,0,-20> rgb 1}
#declare Norm = normal { gradient x+y 1 rotate 45*x+y scale .5 frequency 2}
union {
sphere { 0, 1 pigment { rgb<1,0,0> } translate<-1, 0,0>normal {Norm} }
sphere { 0, 1 pigment { rgb<1,1,0> } translate< 1, 0,0>normal {Norm} }
sphere { 0, 1 pigment { rgb<0,1,0> } translate< 0,-1,0>normal {Norm} }
sphere { 0, 1 pigment { rgb<0,0,1> } translate< 0, 1,0>normal {Norm} }
}
--
Ken Tyler
mailto://tylereng@pacbell.net
http://home.pacbell.net/tylereng/links.htm
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
But if the objects are part of other transplated CSGs?
#declare spheres = union{
sphere{ -2*x, 1 pigment{ rgb<1,0,0>}}
sphere{0, 1 pigment{rgb <0,1,0>}}
sphere{ 2*x,1 pigment{ rgb<0,0,1>}}
}
union{
object{spheres translate 2*z}
object{spheres}
object{spheres translate -2*z}
normal{Norm}
}
Ken <tyl### [at] pacbell net> wrote in message
news:379291CD.8C1026CE@pacbell.net...
>
>
> Remco de Korte wrote:
>
> > I'm sorry but this won't work (or I am getting real perception
problems).
> > I've had this problem more then once. If you stick a pigment on a part
of a csg
> > (or blob) the normal or finish you use for the whole object doesn't
apply there.
>
> If at first you don't succeed... you use the other workable solution. This
> following example clearly shows that you can maintain even distribution of
> a normal pattern for each object in the csg operation and it looks kool
too !
>
> camera {location<0,0,-5>look_at 0}
> light_source {<0,0,-20> rgb 1}
>
> #declare Norm = normal { gradient x+y 1 rotate 45*x+y scale .5 frequency
2}
>
> union {
> sphere { 0, 1 pigment { rgb<1,0,0> } translate<-1, 0,0>normal {Norm} }
> sphere { 0, 1 pigment { rgb<1,1,0> } translate< 1, 0,0>normal {Norm} }
> sphere { 0, 1 pigment { rgb<0,1,0> } translate< 0,-1,0>normal {Norm} }
> sphere { 0, 1 pigment { rgb<0,0,1> } translate< 0, 1,0>normal {Norm} }
> }
>
> --
> Ken Tyler
>
> mailto://tylereng@pacbell.net
> http://home.pacbell.net/tylereng/links.htm
--
Daniel Pirch
nap### [at] linux zrz tu-berlin de
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Daniel Pirch wrote:
> But if the objects are part of other transplated CSGs ?
Then you end up giving Ken a big pain in his head :(
If I come up with anything I will get back to you.
--
Ken Tyler
mailto://tylereng@pacbell.net
http://home.pacbell.net/tylereng/links.htm
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Ken wrote:
>
> Remco de Korte wrote:
>
> > I'm sorry but this won't work (or I am getting real perception problems).
> > I've had this problem more then once. If you stick a pigment on a part of a csg
> > (or blob) the normal or finish you use for the whole object doesn't apply there.
> >
> > Remco
> > http://www.xs4all.nl/~remcodek/softmach.html
>
> Then what is the solution ?
The thing I do is to put the normals and finishes at the same place the pigments
are declared. Too bad, because it needs a little work and perhaps a lot (extra)
memory.
Should we just use softext instead and forget
> about normals and them other pesky primitives ?
I don't see how this relates to the problem here? If you don't want me to bring
it up anymore I won't.
Bye,
Remco
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Remco de Korte wrote:
>> Should we just use softext instead and forget
> > about normals and them other pesky primitives ?
> I don't see how this relates to the problem here? If you don't want me to bring
> it up anymore I won't.
Easy there Remco. I simply forgot to add the :) to the end of that last
comment. You can plug your useful utility as much as you see fit and it
will not bother me in the least.
--
Ken Tyler
mailto://tylereng@pacbell.net
http://home.pacbell.net/tylereng/links.htm
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Ken wrote:
>
> Easy there Remco. I simply forgot to add the :) to the end of that last
> comment. You can plug your useful utility as much as you see fit and it
> will not bother me in the least.
>
I'm a bit (over-)sensitive about it since the first time I brought it up I was
criticized over it being just a windows-program, while I just wanted to share a
sorry utility I developed for my own use (hence no docs and stuff and only a
modest registration-fee ;-))
Remco
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |