![](/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) |
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) |
|
![](/i/fill.gif) |
Daniel Pirch wrote:
> 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}
> }
What you wish to do is not possible because specifying a
pigment/normal/finish for an object is actually shorthand for specifying an
entire texture. In the examples you give above, the pigment statements
apply the default texture to each sphere, with the pigment changed as
desired. Similarly, the normal applied to the union is shorthand for the
default texture with a changed normal. CSG textures are only applied to
those child objects that don't have textures specified - and all the spheres
now do, thanks to the pigments.
One possible solution is to predeclare the normal, and apply it to each
object with the pigment. Or, you can take advantage of the default texture
I mentioned above, by specifying the changed normal *before* declaring the
spheres, eg:
default {normal {bumps .5}}
This saves typing because you don't need to add it to each object.
Unfortunately, neither method will allow you to transform copies of the
declared object without transforming the texture. For this, you need to
transform the object, and then apply the texture - perhaps you could use a
macro that creates and places the objects prior to texturing?
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) |
Have you tried using the #default directive?
Peter Popov
ICQ: 15002700
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) |