This is Interesting: Free Magazines for Graphics designers and webmasters
Home > Archive > VRML > December 2006 > Relative paths in urls, in linked protos.
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Relative paths in urls, in linked protos.
|
|
| simon 2006-11-05, 11:33 pm |
| i've just found out that relative links in protos are meant to change
their base target address depending on the place they are linked from,
meaning different locations for all the resources for each linking
location.
this appears to make proto libraries impossible.
could someone explain if this really is true, because i thought
libraries of protos was an evowed target of vrml development, and i
myself have spent a lot of time trying to produce the most general and
reusable protos.
to find out the language inexplicable prevents this is staggering.
simon.
| |
| simon 2006-11-05, 11:33 pm |
| how i see the light
see;
http://xsun.sdct.itl.nist.gov/~mkas...XTERNPROTO.html
according to the interpretation here, the special rules regarding
relative URL's are about the string at the end of an EXTERNPROTO
statement and its interpretation as a URL, and has nothing to do with
URL's in the body of the proto.
simon.
| |
| zarkov 2006-12-06, 7:36 pm |
|
simon wrote:
> i've just found out that relative links in protos are meant to change
> their base target address depending on the place they are linked from,
> meaning different locations for all the resources for each linking
> location.
>
Proto uses url relative to the path where is the instance of it not
where is the definiton of the prototype. Easiest work around for that
would be to put urls of used resources as exposedFields inside proto
declaration but in that case you would have to type those urls every
time
you use an externproto.
And for the libraries using absolute path makes more sens anyway, IMHO.
Zlatomir
> this appears to make proto libraries impossible.
>
> could someone explain if this really is true, because i thought
> libraries of protos was an evowed target of vrml development, and i
> myself have spent a lot of time trying to produce the most general and
> reusable protos.
>
> to find out the language inexplicable prevents this is staggering.
>
> simon.
| |
|
| >
> Proto uses url relative to the path where is the instance of it not
> where is the definiton of the prototype. Easiest work around for that
> would be to put urls of used resources as exposedFields inside proto
> declaration but in that case you would have to type those urls every
> time
> you use an externproto.
>
> And for the libraries using absolute path makes more sens anyway, IMHO.
>
the problem is when you try to use a proto library, which is located
somewhere remote from you, one you didn't develop, then when the
relative links are based on the instance location you will have to copy
any resources in the library ( including sub protos ) to your own site
to get them to work, and if these resources are being reused in
multiple places in the remote library ( like a common texture ) and are
kept in some common resource folder, then you have to make the exact
same directory structure on your machine, apart from being a big waste
of time, it is not going to always be possible.
This, i think, has come to be through a mistaken interpretation of the
VRML97 spec. which was only referring to the url of the prototype, when
used inside another prototype, and not url of a resource contained
within it, the X3D spec makes this clear.
check the recent long thread about this.
but as we stand, Cosmo and blaxxun do it by instance location, so does
the latest Cortona ( but not any of the older ones.) and Flux does it
by the resource location directly, which is making a lot of efficient
and advanced worlds incompatible.
|
|
|
| | Copyright 2003 - 2008 forum4designers.com Software forum Computer Hardware reviews |
|