|
|
The kindly Rev. overheard pet### [at] usanet (Peter Popov) saying on
20 Oct 2000:
>>Yeah, VRML's just a *teensy* bit different from QTVR. The former is
>>geometry-based, and the latter is photo-based.
>>
>>The only thing that's worth translating at all, imho, is triangle
>>meshes. It should be fairly easy with perl or awk or a little piece
>>of C to turn POVRay triangle meshes into VRML IndexedFaceSets.
>
>Doesn't the latest 3DWin read/write from/to Warp's compressed mesh
>format?
Yeah, but I thought Warp's compressed mesh format was also binary
compressed. Was I mistaken? I'm embarrassed to say I haven't looked at
it yet.
Somehow I have this weird feeling that we're talking about two different
things. Please bear with me, on the off chance you don't already know
this much better than I do.
The .wrl file format is for Virtual Reality Modeling Language (VRML).
It's a text format (to be specific, UTF8).
The original question was, unless that bad acid is kicking in again, can
you convert from POVRay to VRML?
Ken answered no, and I agreed with him in the main. While you do have
cones, spheres, cylinders, and blocks in both VRML and POVRay, VRML has
no toruses (or Tauruses), no CSG, no blobs, no computed surfaces, and on
and on.
But there's two ways to build POVRay scenes: by hand and with a
modeler. And since modelers often product lots of triangles and smooth
triangles, I just wanted to point out that you could, in that subset of
POVRay scenes, convert a trangle mesh or smooth triangle mesh to a VRML
IndexedFaceSet, provided you were willing to write a little text
manipulation program to play around with the text in the POVRay file.
You could even do it by hand in a text editor if you were far more
careful and patient than I am.
In the case of triangles, you'd simply take out all the coordinates,
stick them in an array, and then create coordinate indexes 0 1 2, 3 4 5,
and so on (in the VRML syntax, each coordIndex ends with a -1 as a
punctuation mark).
In the case of smooth triangles, you'd take the normal fields and create
an array of them as well, setting normalPerVertex true. That ought to
look pretty good.
But in any case, it's just plain text manipulation, and all the
information is already there in the .pov or .inc file. You don't have
to triangulate or do anything fancy since POV declares one triangle at a
time.
Now that I think of it, you'd have to change the signs of all the Z
values. I'll have to think for a minute about what that means for the
normals.
If it turns out Warp's compressed format is actually text and lets you
specify coordinate arrays, coordinate indexes, and indexed arrays of
vertex or face normals, than I'm the one who doesn't know what's going
on, and it should be miles easier to convert from that format to VRML.
As to using a cylinder to project an image on in VRML, I've seen it done
on the Mars Rover images, and it was awful. You get all the slow
download speed of bitmap graphics *and* you get crummy looking
rendering, because VRML has got to project the bits into the viewing
plane of the browser, which is invariably at the wrong distance and at
the wrong angle for them to show up very well. Or will be, as soon as
the visitor to the VRML world moves.
Now I see what you were talking about when you mentioned projecting the
scene on a cylinder and using it in QTVR. If you use SkyPaint
<http://www.wasabisoft.com/>, you could in fact create a LivePicture
scene. I don't know about QTVR itself, though.
--
Rev. Bob "Bob" Crispen
crispen at hiwaay dot net
Grabel's Law: 2 is not equal to 3 - not even for very large
values of 2.
Post a reply to this message
|
|