POV-Ray : Newsgroups : povray.general : Status of Moray? : Re: New SDL for POVRay Server Time
5 Jul 2025 22:51:16 EDT (-0400)
  Re: New SDL for POVRay  
From: Alain
Date: 9 Oct 2007 19:49:03
Message: <470c136f@news.povray.org>
Patrick Elliott nous apporta ses lumieres en ce 2007/10/08 17:58:
> In article <4709fc49@news.povray.org>, war### [at] tagpovrayorg says...
>> Patrick Elliott <sel### [at] rraznet> wrote:
>>> And I don't think you have *at all* addressed what I was getting at. How 
>>> do you do something like IK, without either a) allowing an object like 
>>> reference system *which keeps track of* which order the transforms took 
>>> place in, such that if you move something, then rotate it, you don't 
>>> want to later just rotate it, and assume its going to produce the same 
>>> result, or b) limiting the types of transforms that *are* possible to an 
>>> already parsed object, or c) reparsing every damn thing in the script, 
>>> so you can recalculate just what the heck the object is described doing 
>>> *in that frame*?
>>   You don't need to reparse the entire object if you simply want to apply
>> some new transformations to it. What you do is to reset its transformation
>> matrix and apply the new transformations to it. That's it.
>>
>>   If what you are doing requires remembering and applying a set of
>> transformations in order, you can simply create an array or whatever
>> with these transformations, or whatever you like. However, that's
>> completely irrelevant from the point of view of the object itself.
>>
>>   The only thing you have to be able to specify is whether a transformation
>> is applied to the object only, the texture only, or both.
>>
>>   You don't seem to understand how transformations work.
>>
> I know damn well how they work. And you don't solve the problem by 
> reverting things. How do you revert **only** to the Nth transform so 
> that you change only that one? You are assuming, I think wrongly, that 
> no combination of transforms can produce a situation where the result 
> cannot be reset, then some arbitrary transform reapplied to make the one 
> change needed. Worse, your assertion that all you need to do, if it is a 
> problem, is keep every transform in some sort of array, then reapply 
> them from that, is... What they frack do you think I have been saying? 
> The only difference between your array and mine is that I separate 
> "types" of transforms so you don't have to remember if the second 
> translate is the 6th transform in the array, not the 5th. The point is 
> to still track those transforms in an array of some type, so they can be 
> reapplied, *if* you have to manage them that way. Your, "just make some 
> separate transform array", just obfuscates what is going on, by 
> separating the transforms from the object they effect, when they should, 
> logically be considered "part" of the final object (especially if its a 
> compound object and things like "how" the texture is applied is changed 
> dependent on the position of those sub-objects in some way, as a result 
> of those transforms).
> 
> I think you are badly missing my point, both in terms of what I mean and 
> how any such system would end up looking from a user standpoint.
> 
There are NO list/array of transformations, just one and only one transform 
matrix that hold the CUMULATIVE result of every transformation thet was applied 
to your object. You always only apply ONE cumulative transform. Fast and effecient.
If you were to keep a list of transforms, it would be memory ineffecient and 
slow. You would have to always apply every transformations for every ray that 
encounter the object. Direct rays, refracted rays, reflected rays and shadow 
tests. You will also need to apply all of those listed transformations for any 
CSG operation you want to do with the transformed object(s). SLOW and ineffecient.

ALL object always have a texture, even if you don't provide one: There is 
something called a Default Texture. Any texture you supply replace the parts of 
that default texture with those you define. Any left over part remains that of 
the default.
If you apply the texture before the transform, then the transform also apply to 
the texture, and you can considere the texture as "part" of the object.
If you apply the transform before you apply the texture, that transform don't 
apply to the texture. If you apply another transformation, then that last 
transformation will also apply to the texture. The texture is still an integral 
part of the object.

-- 
Alain
-------------------------------------------------
You know you've been raytracing too long when you can recite your high school 
Trig book from memory.


Post a reply to this message

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