[x3d-public] an issue with a Vrml2.0Sourcebook x3d file - image scope and DEF/USE

Don Brutzman brutzman at nps.edu
Sat May 28 19:12:16 PDT 2016


Even more interesting... I doubled back to perform X3D Validator checking within X3D-Edit, which pointed out that these images were each contained within separate ProtoDeclare declarations and thus were not legally able to reference each other.

Fixed that prior mistake, and added comment.

<!-- Note that each prototype declaration has independent scope, and so DEF/USE is not possible for sharing.  DEF remains a good way to identify the image file however. -->

Updated scene attached along with pretty-print documentation.

Taking one step back:  it is totally cool that advanced VRML content from ~19 years ago still works perfectly, and still reinforces key lessons learned in X3D language design.  Uhh, kinda like html web pages.  Yes it is very nice for authors when the tools catch up.

Onward we go.  Have fun with X3D!  8)


On 5/28/2016 6:57 PM, Don Brutzman wrote:
> Good catch.  Not sure how it got like that, possibly a search/replace operation gone sideways.
>
> I've fixed this a different way, applied DEF/USE to minimize duplicative image loading.  Better practice and silences a warning.  Modification attached and checked in, will be included in next upload, action complete.
>
>
>
> On 5/26/2016 7:49 AM, Roy Walmsley wrote:
>> Hi John,
>>
>>
>>
>> Yes, this file is missing from this directory. There are several files in the examples folder called wood_g.jpg. I didn’t check that they may be duplicates.
>>
>>
>>
>> However, I referenced the original  VRML Sourcebook source files, and downloaded the version from Chapter 31. I have stored it in the directory. I’ll commit it to SourceForge if Don is OK with that.
>>
>>
>>
>> Regards,
>>
>>
>>
>> Roy
>>
>>
>>
>> *From:*John Carlson [mailto:john at carlsonsolutiondesign.com]
>> *Sent:* 26 May 2016 01:41
>> *To:* Don Brutzman; Roy Walmsley
>> *Cc:* X3D Graphics public mailing list
>> *Subject:* an issue with a Vrml2.0Sourcebook x3d file (which creates a minor problem rendering).
>>
>>
>>
>> The JPEG:
>>
>>
>>
>> <ImageTexture DEF='wood_g' url='"wood_g.jpg" "http://www.web3d.org/x3d/content/examples/Vrml2.0Sourcebook/Chapter31-Prototypes/wood_g.jpg"’/>
>>
>>
>>
>>  is mentioned in
>>
>>
>>
>> examples/Vrml2.0Sourcebook/Chapter31-Prototypes//Figure31.4WoodAppearancePrototypesLibrary.x3d (and .json)
>>
>>
>>
>> But wood_g.jpg can’t be found.   There are two wood_g.jpg’s mentioned in the file.  The other one is in Chapter17.  I am not sure what is intended.  But it appears like two types of Oak (possibly transformed).
>>
>>
>>
>> I believe in X3DOM, if an image can’t be found, it says “Loading…” with a spinner.
>>
>>
>>
>> I don’t believe Cobweb loads this image either, but it gets further through the scene.  InstantPlayer doesn’t load the image and reports:
>>
>>
>>
>> LOG    OpenSG          GL Vendor/Renderer: Intel Inc./Intel HD Graphics 4000 OpenGL Engine
>>
>> FATAL           Avalon            Image download failed: file:///Users/johncarlson/Downloads/x3d-code/www.web3d.org/x3d/content/examples/Vrml2.0Sourcebook/Chapter31-Prototypes/wood_g.jpg <file:///\\Users\johncarlson\Downloads\x3d-code\www.web3d.org\x3d\content\examples\Vrml2.0Sourcebook\Chapter31-Prototypes\wood_g.jpg>
>>
>> WARNING    OpenSG          Invalid mimeType text/html in getFileType()
>>
>> FATAL           OpenSG          JPG: Not a JPEG file: starts with 0x3c 0x21
>>
>> FATAL           Avalon            Image download failed: http://www.web3d.org/x3d/content/examples/Vrml2.0Sourcebook/Chapter31-Prototypes/wood_g.jpg
>>
>>
>>
>>
>>
>> Example scene I am loading is: examples/Vrml2.0Sourcebook/Chapter31-Prototypes/Figure31.5WoodAppearanceExternalPrototypes.json (or .x3d for InstantPlayer).
>>
>>
>>
>> John
>>
>
>
> all the best, Don


all the best, Don
-- 
Don Brutzman  Naval Postgraduate School, Code USW/Br       brutzman at nps.edu
Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA   +1.831.656.2149
X3D graphics, virtual worlds, navy robotics http://faculty.nps.edu/brutzman
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Figure31.4WoodAppearancePrototypesLibrary.x3d
Type: model/x3d+xml
Size: 3995 bytes
Desc: not available
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20160528/fa096005/attachment-0001.x3d>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20160528/fa096005/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Figure31.4WoodAppearancePrototypesLibrary.wrl
Type: model/vrml
Size: 3234 bytes
Desc: not available
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20160528/fa096005/attachment-0001.wrl>


More information about the x3d-public mailing list