0

When I try to export simple TINs (or documents which contain TINs) from my ArcScene to .wrl the export fails.

I have the following table (xlsx):

X   Y   hoehe

28  -2  0
-2  -2  0
28  48  0
-2  48  0

I import it into ArcScene through add xy data. Then I build a Tin from it using hoehe as height field (There is no difference between using python or going manually):

arcpy.CreateTin_3d(r'C:\Users\aasen\Documents\ArcGIS\Default.gdb\floor_tin', '#',
'Tabelle1$ Events' hoehe Mass_Points <None>", 'DELAUNAY')

Doing this I get a nice flat TIN. Now I'm exporting the TIN with 3D -> VRML where I select the options:

Indent text [check]
visible layers [check]
GeoVRML [no check]
Center [no check]
ElevationGrid [check]
JPEG Quality = high

The resulting VRML (attached as unbenannt.rar) is incomplete. freeWRL is giving me the following error code:

FreeWRL expected library version freeWRL version 1.22.12, got libfreeWRL version
 1.22.12...
windir path=[C:\Windows]
get_current_dir returns[C:/Users/aa/Desktop/]
argv[0]=C:\Program Files (x86)\freeWRL\freeWRL\freeWRL.exe
argv[1]=C:\Users\aa\Desktop\Unbenannt.wrl
posixlycorrect=[(null)]
starting createWindow32
wm_create
starting createcontext32
got hdc
Depth Bits = 24
created context
made a window
resize_GL
showed window
updated window - leaving createwindow
opengl version=3.3.0
ERROR: Expected a closing brace after fields of a node; at: "400
             diffuseColor     1,000 1,000 1,000
             emissiveColor    0,000 0,000 0,000
             shininess        1,000
..."error in parser_fieldValue by call 2
Expected sfnode Value for a fieldtype! at: "400
             diffuseColor     1,000 1,000 1,000
             emissiveColor    0,000 0,000 0,000
             shininess        1,000
..."ERROR: Expected a closing brace after fields of a node; at: "400
             diffuseColor     1,000 1,000 1,000
             emissiveColor    0,000 0,000 0,000
             shininess        1,000
..."error in parser_fieldValue by call 2
Expected sfnode Value for a fieldtype! at: "400
             diffuseColor     1,000 1,000 1,000
             emissiveColor    0,000 0,000 0,000
             shininess        1,000
..."ERROR: Expected a closing brace after fields of a node; at: "400
             diffuseColor     1,000 1,000 1,000
             emissiveColor    0,000 0,000 0,000
             shininess        1,000
..."ERROR:Expected "]" before end of MF-Value at: "400
             diffuseColor     1,000 1,000 1,000
             emissiveColor    0,000 0,000 0,000
             shininess        1,000
..."ERROR: Expected a closing brace after fields of a node; at: "400
             diffuseColor     1,000 1,000 1,000
             emissiveColor    0,000 0,000 0,000
             shininess        1,000
..."ERROR:Expected "]" before end of MF-Value at: "400
             diffuseColor     1,000 1,000 1,000
             emissiveColor    0,000 0,000 0,000
             shininess        1,000
..."ERROR: Expected a closing brace after fields of a node; at: "400
             diffuseColor     1,000 1,000 1,000
             emissiveColor    0,000 0,000 0,000
             shininess        1,000
..."ERROR:Expected "]" before end of MF-Value at: "400
             diffuseColor     1,000 1,000 1,000
             emissiveColor    0,000 0,000 0,000
             shininess        1,000
..."ERROR: Expected a closing brace after fields of a node; at: "400
             diffuseColor     1,000 1,000 1,000
             emissiveColor    0,000 0,000 0,000
             shininess        1,000
..."ERROR:Expected "]" before end of MF-Value at: "400
             diffuseColor     1,000 1,000 1,000
             emissiveColor    0,000 0,000 0,000
             shininess        1,000
..."ERROR: Expected a closing brace after fields of a node; at: "400
             diffuseColor     1,000 1,000 1,000
             emissiveColor    0,000 0,000 0,000
             shininess        1,000
..."Parsing complete, but have unrecognized data at end of input:"400
             diffuseColor     1,000 1,000 1,000
             emissiveColor    0,000 0,000 0,000
             shininess        1,000
             specularColor    0,000 0,000 0,000
 ....)?¤"Parser Unsuccessfulresize_GL

1 Answer 1

3

I used to export 3D scenes a lot from ArcScene and I usually found the ArcScene did a pretty good job of creating the VRML. However, I would sometimes encounter similar problems with one viewer but not in another one, depending on how strictly the programmers had implemented the VRML specification for a given viewer.

The problem will most likely lie not in the creation of the TIN but in either the export to VRML or the viewer itself. To test this I suggest you try a few different viewers (e.g. Octaga Player or Cortona). If these also report the same problem, then it is likely to be the way ArcScene exported the TIN to VRML. That would suggest a bug, which you will need to report to ESRI.

That said, sometimes the export of the VRML from ArcScene was indeed incomplete. You can easily check this by opening the VRML in a text editor and scrolling to the bottom. You should see a nice neat set of closing braces (curly and square) coming into the margin. If you don't have that and you see an 'un-closed' node, then ArcScene probably bailed while writing the VRML. The only way I found to cure this was to either use a smaller area or resample the raster/TIN to a lower resolution. However, I tended to get the error when exporting scenes approximately over 15km square with a DTM resolution of 50m - that should give you an indication of what I would expect ArcScene to be able to export. I suspect the issue was ArcScene running out of memory. However, note that seeing neatly closed braces does not necessarily rule out a corrupt file by itself! It's just a quick sanity check.

I also recommend getting a copy of Chisel. Chisel is a free VRML Optimizer that can detect and correct many errors. It was getting a bit old when I last used it and I don't think it has been updated recently. That said, the VRML coming out of ArcScene should be within its capabilities as it won't be that complex. There may well be other optimizers available, but this was THE one, when I was playing with VRML (even so, it could be glitchy!). Even if Chisel can't solve your problem, optimizing your VRML can reduce its size and load times significantly, which is a great improvement short of converting to another 3D format.

While we're on the subject of VRML, when I last used ArcScene (a few years ago - I do things very differently now) there was talk of ESRI supporting X3D. X3D is the much more modern successor of VRML. It is much better in many ways. Development stopped on VRML many years ago in favour of X3D. So, I would recommend checking firstly whether ESRI have added the capbaility to export to X3D. If so, try exporting to X3D instead of VRML. Chisel's last implementation supported X3D (though that would be an early version). Most of the decent VRML viewers support X3D.

Whether for X3D or VRML, the Web 3D Consortium is THE place to go to look for tools for optimization, conversion, editing and checking VRML and X3D. My link for 'X3D' with take you to the X3D developers page where you will find all sorts of tools and viewers you can try. If you check the vertical menu on the right, at the bottom is a link to the VRML archive. Follow that to find the old equivalent pages for VRML fro when it was still under development.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.