Help - Search - Members - Calendar
Full Version: ViSTa to X3D
Unmanned Spaceflight.com > Mars & Missions > Past and Future > MER > Tech, General and Imagery
MaxSt
I'll post the converter soon (later today), I need to clean up the code a little...

Meanwhile, try this model.

You'll need the PNG texture from here:
http://anserver1.eprsl.wustl.edu/navigator...FL0500P1800L0M1

And X3D viewer. I used this one:
http://www.web3d.org/x3d/applications/xj3d/

------
I knew it would be fun, but playing with these models is much more fun than I expected! biggrin.gif
djellison
Woo yay, that works smile.gif

The format isnt great w.r.t getting creative - it's more an exported format more than the sort of format that gets imported into other tools - but I had a look with that java based viewer and it works a treat. I guess that's the highest LOD, I think that the lower LOD's would offer probably the same level of actual detail, but without the excess polys. Imagine a 'ring' of 8 or 9 of these for a full Nav-Pan and it'l going to be 2 megapolys ohmy.gif

Much kudos for getting it working though - it's been 2 years to get here, but now we're nearly there, the potential is utterly huge.

Doug
MaxSt
OK, here is the converter itself.

The model I posted isn't the highest level of details.
The highest level for this .vst file is LOD 6, which is like 50 times bigger - almost 1 megapoly!
Unfortunately, that Xj3D viewer is very RAM-hungry even for smaller LODs...

I hope 3DS Max can import X3D files.
djellison
QUOTE (MaxSt @ Mar 22 2006, 12:29 AM) *
I hope 3DS Max can import X3D files.


No - it can't, and infact I'm yet to find anything that can sad.gif It's just one of those formats that you can find dozens of exporters for, but no importers for.

I'm going to have a play with this though - find some interesting ones to have a hack with smile.gif

Doug
Pertinax
QUOTE
As for X3D, this file format is, in basic terms, an XML version of the VRML 2.0 file format (levels 1 and 2). To import X3D files, first convert the XML file (levels 1 and/or 2) to VRML 2.0 format and then import via Okino's VRML2 importer (which can handle all nodes of level 1 and 2 X3D files, as noted below). Okino presently does not provide or can recommend any X3D to VRML2 converters; such converters should become available in the future.


http://www.okino.com/conv/imp_vrml.htm

http://www.okino.com/conv/conv.htm?0 (PolyTrans Home)


I this does not look to be free, but wanted to note it on the off chance any may be interested.

-- Pertinax
djellison
I've used Polytrans quite a lot at work - but unfortunately, it doesnt do the job in this case. (I've tried alread

As I understand it - X3D is a derivative of VRML 2. PT can import VRML 2, but not X3D natively.

Their website says "Okino presently does not provide or can recommend any X3D to VRML2 converters; such converters should become available in the future."

Another tool to google for is Accutrans - but the same rules apply.

Doug
Pertinax
QUOTE (djellison @ Mar 22 2006, 09:42 AM) *
I've used Polytrans quite a lot at work - but unfortunately, it doesnt do the job in this case. (I've tried alread

As I understand it - X3D is a derivative of VRML 2. PT can import VRML 2, but not X3D natively.


I didn't fully appriciate the difficulty of X3D -> VRML2. Hopefully MaxSt can find a happier intermediate format. smile.gif

-- Pertinax
djellison
QUOTE (Pertinax @ Mar 22 2006, 04:00 PM) *
Hopefully MaxSt can find a happier intermediate format. smile.gif


I hope so - having them not viewable at all was bad - but having them viewable but not editable is even worse ohmy.gif

smile.gif

Doug
MaxSt
I'll try to find some other format.

3DS is limited to 64K polys per object, DXF is only for meshes (no texture mapping info), what other formats can 3DS Max import?
djellison
Looking at the help file.. Max can import...
3D Studio Mesh (3DS)
3D Studio Project (PRJ)
3D Studio Shape (SHP)
Adobe Illustrator (AI)
AutoCAD (DWG)
AutoCAD (DXF)
Autodesk Inventor (IPT, IAM)
Initial Graphics Exchange Standard (IGES)
FiLMBOX (FBX)
LandXML /DEM /DDF (DEM, XML, DDF)
Lightscape Solution (LS), Lightscape Preparation (LP), and Lightscape View (VW)
Motion Analysis Hierarchical Translation-Rotation (HTR)
Motion Analysis TRC (TRC)
Stereolithography (STL)
VRML (WRL, WRZ)

(BUT the WRL importer is bloody terrible - it couldnt handle the point clouds, anything more than 12 polygons gives it a minor heart condition.)

But let's not just limit to 3ds max, there must be Ligthwave/Blender/Maya/Bryce fans around - anything that Accutrans ( which is sort of free ) can do would be sensible, then as many people as possible can use them...
http://www.micromouse.ca/fileformats.html

Doug
Richard Trigaux
Hi Doug and all

I did not knew you were in 3D too. Great!

VRML2 and its newest version X3D have the immense advantage of being non-proprietary standardized 3D languages. It is when learning this that I decided to go into 3D.

If I remember well the free blender 3D modeler can import X3D... but not VRML2!

I did some 3d landscapes and scenes, related only by far to spaceflight. Enjoy: http://www.shedrupling.org/hallrose.wrl with Cortona VRML browser or any standard VRML/X3D browser
(With blacksun VRML browser use http://www.shedrupling.org/hallrosb.wrl instead)

I suddenly remember that I made a tremendous sky simulation, with sun motion, night/day depending on latitude, horizon haze and sunset colors, rotating planetary ring, planet shadow on the ring, moving planets and all. The 3D itself works fine, but there is still some work ahead to put it on line with the ground scene. The scene is real size, understand that the planets are at one billion kilometres, and the star sphere is 10 light years wide, real dimention in the 3D scene. Sorry I could not do it larger, as the browser don't accept it. But it is enough as the paralaxes of stars are not visible with the naked eye.
djellison
QUOTE (Richard Trigaux @ Mar 23 2006, 07:25 AM) *
Hi Doug and all

f I remember well the free blender 3D modeler can import X3D... but not VRML2!


I've tried that - no luck yet. I'm a totally newbie with blender, and I went thru what was seemingly the obvious menus to import something, without any luck.

( http://people.mech.kuleuven.be/~pissaris/m...blenderx3d.html might help - having a look now )


Doug
djellison
OK - trying to use the x3D importer for Blender......

http://www.blender.org/forum/viewtopic.php?p=51299#51299

I hope there's as much genius-per-member there as there is here, should have it sorted in a flash.

But - it'd be nice to have something that's not going to involve wads and wads of blender-loading-and-exporting smile.gif

smile.gif

Doug
MaxSt
OK, I tried OBJ format, because its syntax looked very simple.

It's not as efficient as X3D, so files are even bigger (!), but it appears to be very common.

Take a look...
djellison
Woo yay - I'm getting wedges.

I dont think they're retaining their orientation when imported into Max - it might be different with different importers. For now - I'm trying some single image sets etc.

Doug
djellison
Here's one for you smile.gif

At the top end of each folder ( i.e. http://pdsimg.jpl.nasa.gov/data/mer/mer2mw...ancam/site0011/ ) there are some VERY big files - are these essentially mosaics of terrain wedges?

Doug
djellison
Woo yay smile.gif
MaxSt
QUOTE (djellison @ Mar 23 2006, 06:22 PM) *
At the top end of each folder ( i.e. http://pdsimg.jpl.nasa.gov/data/mer/mer2mw...ancam/site0011/ ) there are some VERY big files - are these essentially mosaics of terrain wedges?


You mean .PFB files? Yes.
Theoretically you can view them and edit them if you have SGI Performer installed.

This 3d Viewer claim support for .PFB files, but it dosn't work for me. Maybe it needs SGI Performer installed anyway, or at least some libraries... I don't know.
djellison
Didnt work for me either. I wonder if theres an OS project for reading those somewhere.

MEANWHILE

I'm going to start my first little project with this stuff - reconstructing the area around the heatshield impact site using wedges from multiple view points to eliminate visibility shadows etc. I wont be using the highest res LOD - it's utterly utterly bonkers - but it'll all be Navcam stuff to start with, with, perhaps, Pancam imagery added later. Mainly it's for the april talk I'm giving to the BAA - it'll be a nice movie I think.

MaxSt - I can not thank you enough for your work in this. It's not perfect, it's not ideal - but it's wedges, in 3ds max, and it is STUNNING!!!

Thank you a thousand times over.

Doug
MaxSt
You're welcome! It's a great fun to "fly" aroung those wedges in realtime. smile.gif

Looking forward to see more of your videos...
djellison
Just a thought - would RAL png's be a suitable radiometricly calibrated alternative to the FFL's?

Doug
MaxSt
I guess so... At long as it is "L", linearized.

Try to edit material (.mtl) file - the PNG filename is stored there.

---

By the way, I figured how they triangulate for the meshes. I tried to display only vertices, and now it's very clear. smile.gif
djellison
Interesting - I've downloaded and installed the demo version of SGI OpenGL Performner, and indeed once you've done that - the PFB files just douple click and open up ( attached ) - you can scroll up and down the LOD - the LOD is then dynamically managed depending on range (close = high lod, far = low lod ) - and if you have the PFB and the RGB's of the site in the same folder, you get the whole thing textured as well.

The genius of this is that the PFB contains multple VST's all mosaiced into the right place. My experience so far with playing with these things is that getting the VST's into the right place is actually quite hard. Importing them with Blender, 3ds Max or Polytrans - they all end up being in the same 'place' and tilted 'down' by about 70 degrees.(also attached) Given that it happens across multiple platforms, would it be worth checking the obj convertor, see if there's something going on in there - of if we can move over to meshed-from-the-point-cloud XYL's which might be bettere referenced. . Alternatively - II wonder if the PFB's would be 'consumeable' by a derivative of the work you've done so far, given that they seem to essentially contain multple VST's bundled with their proper geometry. It would mean we could import and entire sequence in one shot instead of 3, 5 10 images etc.

Anyway - I've attached two piccies to show what I'm talking about. One is a PFB in Performer, and one an OBJ in Max.


Doug
djellison
This stuff is WAY too much fun. I'm finding that, suprisingly, the LOD2 is the best to use - the others probably do contain more geometric information, but not so much as to make the 10 fold increase in poly count worth it, and they have a lot more poly 'drop outs' so to speak. I've done a few bits and pieces with it - getting them aligned to one another is still a bit trickey (PFB's would be AWESOME for this) - but attached (later) will be two pictures, my 3ds max Eagle crater, and a PFB eagle crater. Yes, that is a frame number of an animation, yes, that is a MOC image underneath so yes, you can probably see where I'm going with this smile.gif

Doug
MaxSt
QUOTE (djellison @ Mar 30 2006, 06:16 AM) *
Interesting - I've downloaded and installed the demo version of SGI OpenGL Performner


Nice. I didn't know they had a demo version available. It propably won't let you export stuff to other formats, right?

QUOTE (djellison @ Mar 30 2006, 06:16 AM) *
My experience so far with playing with these things is that getting the VST's into the right place is actually quite hard. Importing them with Blender, 3ds Max or Polytrans - they all end up being in the same 'place' and tilted 'down' by about 70 degrees.(also attached)


What I can tell you is that VST's are definetely in camera coordinate system. In X3D at first I couldn't even find the model in the viewer, had to roll it in some random direction until I find it. But X3D format lets you to specify the camera position and orientation, so I put the camera in (0,0,0) and pointed it at negative Z direction, and everything worked - the view is just like from the left camera.

So I think you need to first compensate the elevation "tilt" by rotating the mesh around X axis, then compensate for azimuth by rotating it around vertical Y axis (I guess by 36 degrees to each other)

Let me know if that works. If not, maybe I could read the .IMG files instead of .PNG
IMG files contain stuff like this:

CODE
/* ARTICULATION DEVICE STATE: PANCAM MAST ASSEMBLY */

GROUP                             = PMA_ARTICULATION_STATE
  ARTICULATION_DEVICE_ID          = "PMA"
  ARTICULATION_DEVICE_NAME        = "PANCAM MAST ASSEMBLY"
  ARTICULATION_DEVICE_ANGLE       = (-2.09779 <rad>,-0.197983 <rad>,
                                     -2.09777 <rad>,-0.198054 <rad>,
                                     3.58163 <rad>,-0.298422 <rad>)
  ARTICULATION_DEVICE_ANGLE_NAME  = ("AZIMUTH-MEASURED",
                                     "ELEVATION-MEASURED",
                                     "AZIMUTH-REQUESTED",
                                     "ELEVATION-REQUESTED","AZIMUTH-INITIAL"
                                     ,"ELEVATION-INITIAL")
  ARTICULATION_DEVICE_MODE        = DEPLOYED
END_GROUP                         = PMA_ARTICULATION_STATE


And many more...
Maybe I could figure out that stuff and rotate OBJs so they're all in rover frame or site frame...
Meanwhile you can try to figure out that too, and use such angles (I think that info is in "PDS label" tab on anserver1.eprsl.wustl.edu site )

QUOTE (djellison @ Mar 30 2006, 06:16 AM) *
so yes, you can probably see where I'm going with this smile.gif


Something good, no doubt. smile.gif
algorimancer
QUOTE (djellison @ Mar 30 2006, 10:20 AM) *
This stuff is WAY too much fun. I'm finding that, suprisingly, the LOD2 is the best to use - the others probably do contain more geometric information, but not so much as to make the 10 fold increase in poly count worth it, and they have a lot more poly 'drop outs' so to speak. I've done a few bits and pieces with it - getting them aligned to one another is still a bit trickey (PFB's would be AWESOME for this) - but attached (later) will be two pictures, my 3ds max Eagle crater, and a PFB eagle crater. Yes, that is a frame number of an animation, yes, that is a MOC image underneath so yes, you can probably see where I'm going with this smile.gif

Doug

Impressive progress. Ultimately I have this fantasy notion of a complete virtual environment about each of the rovers' traverses, something very much to the "you are there!" effect. Seems feasible in the next 5-10 years. Possibly in time for the MSL. The trick will be to register all the 3D detail from all the images throughout the traverses, probably overlaid on orbiter imagery and terrain models. Put on the glasses, step onto something like a 2-D treadmill (surface of a sphere?), and start walking... Some sort of dynamic texture underfoot and simulation of the sound of gravel crunching under your feet, perhaps a little high-pitched keening wind effect. We're drifting in that direction.

Looking forward to the animations smile.gif
jamescanvin
Yep, that's what we need, get to it Doug. wink.gif smile.gif
djellison
Well - I'm focussing on Opportunity first - as I want to do something with Eagle, Endurance, the Heatshield, possibly Fram, possibly Anatolia, and possibly Naturaliste and Purgatory (Purgatory in 3d sounds like a nice idea to me ) - for an April talk on Opportunity in Liverpool.

Then, I want to document the traverse from the Spirit lander to Bonneville. Thereafter, drives got too long to actually have navcam 'areas' that overlap from sol to sol - but again, some areas such as Larrys Lookout, or the foot of West Spur, might actually work as well.

Doug
MaxSt
I think that's the info you need, Doug:

CODE
/* DERIVED GEOMETRY DATA ELEMENTS: SITE FRAME */

GROUP                             = SITE_DERIVED_GEOMETRY_PARMS
  INSTRUMENT_AZIMUTH              = -72.0143 <deg>
  INSTRUMENT_ELEVATION            = -17.0026 <deg>
  REFERENCE_COORD_SYSTEM_INDEX    = 108
  REFERENCE_COORD_SYSTEM_NAME     = SITE_FRAME
  SOLAR_AZIMUTH                   = 292.33 <deg>
  SOLAR_ELEVATION                 = 47.7694 <deg>
END_GROUP                         = SITE_DERIVED_GEOMETRY_PARMS


CODE
/* DERIVED GEOMETRY DATA ELEMENTS: SITE FRAME */

GROUP                             = SITE_DERIVED_GEOMETRY_PARMS
  INSTRUMENT_AZIMUTH              = -36.0003 <deg>
  INSTRUMENT_ELEVATION            = -16.9959 <deg>
  REFERENCE_COORD_SYSTEM_INDEX    = 108
  REFERENCE_COORD_SYSTEM_NAME     = SITE_FRAME
  SOLAR_AZIMUTH                   = 292.1 <deg>
  SOLAR_ELEVATION                 = 47.4559 <deg>
END_GROUP                         = SITE_DERIVED_GEOMETRY_PARMS


CODE
/* DERIVED GEOMETRY DATA ELEMENTS: SITE FRAME */

GROUP                             = SITE_DERIVED_GEOMETRY_PARMS
  INSTRUMENT_AZIMUTH              = -0.000725621 <deg>
  INSTRUMENT_ELEVATION            = -17.011 <deg>
  REFERENCE_COORD_SYSTEM_INDEX    = 108
  REFERENCE_COORD_SYSTEM_NAME     = SITE_FRAME
  SOLAR_AZIMUTH                   = 291.97 <deg>
  SOLAR_ELEVATION                 = 47.2756 <deg>
END_GROUP                         = SITE_DERIVED_GEOMETRY_PARMS


That's camera data from PDS labels of 3 consecutive navcam images.
First you need to compensate for vertical tilt of (-17,-17,-17) degrees, then for azimuth of (-72, -36, 0) degrees.
I think wedges should align perfectly, if you do that.
djellison
QUOTE (MaxSt @ Mar 30 2006, 11:55 PM) *
Nice. I didn't know they had a demo version available. It propably won't let you export stuff to other formats, right?


Bingo - you can't export from it at all - but it is an excellent viewer. Long term - being able to convert from PFB's would cut the workload on these things by an order of magnitude - I would actually worship at the feet of anyone who could pull the info out of those. It would make Pancam wedges worth using - as they, obviously, are 9 wedges for every navcam equiv. wedge.and are just too much manual involvement at the moment. In terms of doing Endurance crater - I think Pancam is a must, simply to get the range I need - navcam wedges basically drop off after about 10m.

Trying to rotate the wedges using the header info is obviously doable, but to be honest, by the time I've done that, I'd have rotated them into postition manually anyway smile.gif


Meanwhile, just a bit of fun, 720p WMVHD - http://www.unmannedspaceflight.com/doug_im...le_rotate_1.wmv

Doug
djellison
Just as an aditional note - and you can probably see this in the two screeneis I posted earlier - I'm getting quite a few missing poly in the translation. Some have their normals facing the wrong way - (and infact about 1 in 3 meshes has all it's face normals facing the wrong way ) - but some are just empty. However, looking at the same VST's within the context of a performer file - there are no missing polygons at all.

Doug
MaxSt
QUOTE (djellison @ Mar 31 2006, 05:39 AM) *
Long term - being able to convert from PFB's would cut the workload on these things by an order of magnitude...


Reading PFB's directly is close to impossible, without the documentation and all... But tell me, does the 3D Viewer I mentioned earlier work now, that you have Performer installed? If so, then there maybe some hope, since it's basically an open source project. That's the only way I see.

QUOTE
Trying to rotate the wedges using the header info is obviously doable, but to be honest, by the time I've done that, I'd have rotated them into postition manually anyway smile.gif


Well, it's just for the future...
You'll still rotate them manually, but this way you'll know the exact angles.

BTW, the video is very nice. cool.gif

QUOTE (djellison @ Mar 31 2006, 08:46 AM) *
However, looking at the same VST's within the context of a performer file - there are no missing polygons at all.


They probably "fixed" them in Performer somehow. Filled the holes or something.
djellison
http://www.unmannedspaceflight.com/doug_images/fram.wmv (1meg) Another bit of fun smile.gif

That viewer that's supposed to load PFB's still wont load them. I'd like to see it load any PFB actually - as they're such an odd format ohmy.gif

Doug
MaxSt
That viewer is based on OpenSceneGraph project. Try OpenSceneGraph itself:

http://www.openscenegraph.org/index.php?pa...loads.Downloads

It suppose to load .PFB files, and also should be able to save them in some other format.
djellison
Oo - I'll give that a go.

Obviously - I've been playing "hunt the VST" for lots of interesting targets. I'm learning a few lessons

Pancam targetted observations don't tend to be done to wedges.
Pancam Panorama's are OK at Eagle, and the first two tiers on most pans - but aroudn Endurance they're useless - I hoped to make a 3d something of Endurance, but it looks fairly futile at this stage.
Anything over LOD2 is basically, a shameless, pointless Polygon whore that serves no real purpose smile.gif

Doug
MaxSt
An interesting document with some info about Endurance 3D model, among other things:

http://shoreline.eng.ohio-state.edu/public..._KaichangDi.pdf
slinted
QUOTE (MaxSt @ Apr 1 2006, 12:55 PM) *
That viewer is based on OpenSceneGraph project. Try OpenSceneGraph itself:
It suppose to load .PFB files, and also should be able to save them in some other format.


Unfortuntely, OSG can only load .pfb files if you have SGI Performer already installed.
MaxSt
QUOTE (slinted @ Apr 8 2006, 07:34 PM) *
Unfortuntely, OSG can only load .pfb files if you have SGI Performer already installed.


I heard that installing the demo version of SGI Performer should be enough...
djellison
The learning curve is WAAyyyyyyyyyyyyy up like that (poiints hand straight up) for a total non-code-monkey like me on this stuff.

Doug
MaxSt
What are you learning? I thought you only playing in 3DS and stuff like that...
djellison
Getting OSG to do anything smile.gif

I got as far as using osgconv in an OSG session box, but it didn't like me.

I'm happy with what I've got to play with courtesy of your efforts though - a thousand and one wedges, and so little time smile.gif

Doug
MaxSt
Oh... I thought it's something simple, like File/Load.

So it's not really user-friendly? Oh well...
djellison
Sadly not - it's more a dev kit and coding library.

Doug
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2024 Invision Power Services, Inc.