|
|
In article <483bb60c$1@news.povray.org>, sco### [at] scottcom says...
> > Umm. Comparison and contrast. First you mention the case where you thin
k
> > it "will" work, then you mention the one where your not so certain.
>
> A HUD is no different to a mesh with 2 triangles. Using the algorithm bo
th
> Darren and me explained it will just work.
>
Lol Think you are confusing *which one* I said would be the problem. The
HUD is also *basically* a box, so is, for all intents and purposes,
identical to its own bounding box. Obviously, and test against such a
bounding box "will" produce an identical result (or close enough) to the
one testing the *actual* object. Why would I think that HUDs would be
the problem?
> > This is a Windows, Mac *and* Linux client. OpenGL may have something
> > similar,
>
> If not, I suspect the algorithm is pretty simple for checking ray/triangl
e
> intersections - in fact the source for the DirectX implementation is
> available in the SDK. I guess POV has something similar in the source to
o.
>
Well, I am guessing it isn't "in" the API. There are a couple of pages I
found with it, which led me to conclude that they are "probably" already
using it in the client to test ray intersects for the mouse pointer. The
problem is, they may be doing that using one only the "yes it
intersected" result, not by returning the actual coordinates of the
intersect. Annoyingly (why do people have to make newbies lives so bad?)
the page that had the best explanation "also" said, "Of course, if you
want the coordinates instead, its trivial to return them." Uh... Right.
Because "everything" is trivial to the guy that goes looking for how
something works, but doesn't really know what they are doing. lol
> > but knowing what it is doesn't necessarily help if you don't
> > know how to get from that to the final result. lol I am sure its simple
> > math, but..
>
> It's very simple. If x,y are the barycentric coordinates returned from y
our
> triangle/ray intersection algorithm, the texture coordinates of the hit
> point are:
>
> Tu = x * V1.u + y * V2.u + (1-x-y) * V3.u
> Tv = x * V1.v + y * V2.v + (1-x-y) * V3.v
>
> Where V1.u is the texture x coordinate of vertex 1, etc.
>
Yep, absolutely simple. Now, can you translate it to English? ;)
Seriously though, the full algorithm returns (t,u,v), not just (Tu,Tv),
presuming you know how to get it to do so, otherwise is "apparently"
only returns (t), which is 0 (or maybe NULL??) if no intersect happened.
Probably NULL, since otherwise I don't get how you figure out if it
happened, should the (t) happen "at" 0.
> > Someone else has already suggested adding procedural textures as well,
> > as a means to bypass the issue of custom ones, in cases where its just
> > damn stupid to use them, like making rocks, or any other surface that
> > doesn't "need" hand drawn Photoshop images.
>
> That sounds a good idea, sending a few hundred bytes of pixel shader code
> seems more efficient than the textures. The engine on the client can the
n
> just render the texture and create the mipmaps locally once. Or, if "liv
e"
> textures are needed, the pixel shader can just be directly used in the ga
me,
> that would allow animated textures :-)
>
The only issue being, SL is "likely" avoiding it, since it can't be an
"asset" in the same way everything else is now. How do you "copyright" a
procedural? lol But yeah, its damn stupid feeding all the BS they do to
the client, especially since its all fed through using UUIDs, which the
client then has to, I am guessing, do a "please send me the asset
assigned to UUID blah", for every damn thing it displays. Not sure if
every object gets one, or just "final" objects, or how the server, if
its dealing with combined objects, figures out which ones to "send", all
are once, so only one ID is needed, or the main one, then all the linked
ones, or... One could have nightmares trying to work out how they manage
to make it work as well as it does, and it doesn't work *that* well. lol
--
void main () {
if version = "Vista" {
call slow_by_half();
call DRM_everything();
}
call functional_code();
}
else
call crash_windows();
}
<A HREF='http://www.daz3d.com/index.php?refid=16130551'>Get 3D Models,
3D Content, and 3D Software at DAZ3D!</A>
Post a reply to this message
|
|