|
![](/i/fill.gif) |
Roland Mas wrote:
Ok, here I go again :-)
> Spider <spi### [at] bahnhof se> writes:
>
> > > > Now, what we can't do with the current version is this:
> > > >
> > > > #declare SomeSphere.position=SomeSphere.position+<0,1,0>;
> > >
> > > #declare SomeSphere = object { SomeSphere translate y }
> > > Does exactly it.
> > Sure, but you can't do
> > #declare SomeSphere.position.y = SomeSphere.position.x;
> > #declare SomeSphere.position.x = SomeSphere.position.z;
>
> True, even if I can't see the use of such a thing.
Ok, but it was the point that was meant. The possibility to access an objects
current position without having to use a variable for each value. I know I am
lazy, but I still want to be able to do this:
light_source {
location camera.location
colour rgb 1
shadowless
spotlight
point_at camera.look_at
radius...
}
Without declaring the variables
#declare scCameraLocation = <-1200, 105, 1000>;
#declare scCameralookAt = <...>;
and so on..
And the other places it would be nice in can be a include file accessing the
camera postition for placing items, (like a lens-flare) as well as light_sources
positions. (now here is a hazzle, how to access the RIGHT light_source ? add
them in an array? Give them a name identifier?
> > yes, but if I want a nifty shader done on the object depending on
> > its position? That would turn out pretty nasty(Sure, use a texture,
> > but that woudln't suit in all cases. (ie. the whole objects pigment
> > depends on it y value(gradient y) )
> I'm afraid I don't understand that sentence.
If you take a look at my world macro, the boxes have an height value.
if I take this a few steps further, and want to give more objects a pigment
depending on the distance from the camera, I'd either have to declare all the
object points in variables(arrays) or start adding vlength(pos-campos)
everywhere. This is just one use that hits me now.
>
> > > Anyway, what's the use of all that? Want to have another sphere,
> > > redeclare it. Or better, if it's another sphere, use another object.
> > It's not another sphere. It's the SAME sphere. That's the point with
> > oo.
>
> If it's the same, why did you declare it wrongly in the first place?
> Declare it with the correct parameters...
But that's the nasty point...
It may not be possible to do so at all, but to have to go with #declares, yes.
say I want to use simpsons method to integrate a point on a curve. (it's a
recursive algorithm, using the last values for computing)
just one idea for use.
--
//Spider
[ spi### [at] bahnhof se ]-[ http://www.bahnhof.se/~spider/ ]
What I can do and what I could do, I just don't know anymore
"Marian"
By: "Sisters Of Mercy"
Post a reply to this message
|
![](/i/fill.gif) |