Page 1 of 1

.X3D in browser

PostPosted: Sep 9, 2010 9:42 pm
by rlboyce
Okay, this is and isn't cave related.

Why it's not:
I'm trying to find out if I can put an .x3d file on a webpage via a java applet or something so that others can view this .x3d file without having to download any software. Maybe this is impossible, or maybe this is the sole purpose of .x3d's... I simply don't know.

Why it is:
The .x3d file is actually a point cloud of a cave passage that has been ripped from a Photosynth. I'm experimenting with these point clouds to see if they are a viable alternative to surveying and generating a 3D model of a cave... all by just taking regular pictures.

So, does anybody have experience with .x3d files? I've seen .x3d files displayed in applets before, so I know it can be done.

Re: .X3D in browser

PostPosted: Sep 10, 2010 1:04 pm
by Steven Johnson
What format is .X3D (i.e., is there a spec somewhere you can link to)?

Re: .X3D in browser

PostPosted: Sep 10, 2010 1:14 pm
by Steven Johnson
Steven Johnson wrote:What format is .X3D (i.e., is there a spec somewhere you can link to)?


Responding to myself... I presume it's this: http://en.wikipedia.org/wiki/X3D

A quick google doesn't turn up much. I'd have thought there would be Flash-based renderers for it, but the only one I could turn up appears to be abandonware from a few years ago: http://www.opensourcery.net/flax3d/

Re: .X3D in browser

PostPosted: Sep 10, 2010 1:22 pm
by rlboyce
Yeah, that's the link I was going to give you. I think .x3d is pretty much the successor to VRML, and I'm starting to think you can embed these files in webpages but the browser has to have a plugin to view it. I think another way to get around this is to use some sort of java applet to load the file into, and as long as the person trying to view it has java, they can view the model.

Unfortunately, I do not own flash, otherwise that would be ideal for what I'm trying to do.

Ultimately, this will probably be just one of those things that I'll have to forget about. It just seems to be either too much work or expensive to do it, and it's not super important.

Thanks for the help!

Re: .X3D in browser

PostPosted: Sep 10, 2010 1:50 pm
by LukeM
It seems a Java applet implementation may be the most realistic option for the time being, until browser developers and the HTML5 working group decide to inherently support X3D. If you haven't already check out http://www.xj3d.org/. I checked out the browser applet tutorial but didn't have any luck loading it in my versions of FF and IE.

Your experiment sounds very interesting. Good luck with it.

Re: .X3D in browser

PostPosted: Sep 10, 2010 1:59 pm
by LukeM
Also, can't you export in another format? You can display an OBJ file using HTML5's canvas although I'm not sure if there's any freely available code examples showing how to do this.

Re: .X3D in browser

PostPosted: Sep 10, 2010 3:04 pm
by rlboyce
Hmm... I've been to the xj3d website, and to be honest I don't understand what it even is. From your description it sounds like that's what I've been looking for, but it also sounds like it would take some figuring out too. I'll probably fool with it over the weekend.

As a matter of fact, yes, I can also export to OBJ as well as PLY and VRML. Unfortunately, I don't know how to put these on a webpage either. As an OBJ there is a loss of color information, but that's acceptable if I can make it work. I'll also have to check out the HTML5 canvas as you recommended.

Feels like someone has given me all the pieces of a car and told me to put it together. I have the vision of the car and generally how it goes together... but when I get down to "attach A to B"... I get kind of lost. I guess this is why the people who normally fool with this kind of 3D modeling stuff go to school for it. :big grin:

Re: .X3D in browser

PostPosted: Sep 12, 2010 7:00 pm
by rlboyce
I decided just to take a video screen shot. It was the simplest way. Another person won't be able to turn it any way they want, but the video does the job as far as demonstration purposes are concerned.

If you're interested, I've uploaded the video to YouTube.



I have to say, this project looks like it might end up being rewarding, but I need to put a lot more time into it to know how to get a better looking model. I still haven't tested it yet to see if the model is distorted or if it's a completely accurate representation. Something tells me Photosynth might have problems with passage bends if you don't take enough pictures. At this point though, it appears to be identical to the real thing, save for the surface texture.

Re: .X3D in browser

PostPosted: Sep 15, 2010 11:44 am
by WVCaver2011
The more pictures the better!! Depending on your RAM Photsynth can upload a lot of photos... I've uploaded 750 at one time. It takes a while but it's worth it. If we try to stay in a localized area and move around while taking pictures (within that localized area) we should be able to get a good cluster of points within the point cloud. Now if only we could find some way to stitch these things together... :shrug: .

If we can get this to work out fairly well we should be able to create a brand new way to survey a cave IF we can also find someway to include the distance and depth of a cave. There's definitely nothing wrong with experimentation. I figure the software were using can do that easily. Its just one of those things that takes time and experimentation to figure out.

Re: .X3D in browser

PostPosted: Sep 16, 2010 11:51 am
by fritzFilter
just try the x3dom.org system which allows to embed x3d data inside of any html page.
It uses webgl or an optional plugin for rendering and they even support meshlab outputs:

http://www.x3dom.org/?p=836

Re: .X3D in browser

PostPosted: Sep 20, 2010 2:17 pm
by rlboyce
Thanks! I'll have to try that out.

Re: .X3D in browser

PostPosted: Feb 14, 2011 10:05 am
by john
Here are another couple of examples of X3D in a web browser using Java Applets.

http://dl.dropbox.com/u/5095342/web3d/web9.html

http://dl.dropbox.com/u/5095342/Xj3DApp ... llery.html

To get it to work you will need Java on your computer, which most desktop computers already have. You can check which version of java you are running at this link.

http://www.java.com/en/download/installed.jsp