Page 1 of 1

VRML97

Posted: Tue 12. Aug 2014, 14:02
by goetz
Hi there,

how is it possible to read vrml97 produced i.e. by 3ds max?

I tried the easy way based on your off-file-tutorial to handle wrl with this code:

Code: Select all

package mainpackage;

import java.io.IOException;
import java.net.URL;

import de.jreality.reader.Readers;
import de.jreality.scene.SceneGraphComponent;
import de.jreality.tutorial.intro.Intro04;
import de.jreality.util.Input;

public class CompensatorInit {

	public static void main(String[] args) {
		SceneGraphComponent testSGC = readWRL();

	}
	
	private static SceneGraphComponent readWRL() {
		URL url = CompensatorInit.class.getResource("test1.WRL");
		SceneGraphComponent scp = null;
		try {
			scp = Readers.read(Input.getInput(url));
			scp.setName("test");
		} catch (IOException e) {
			e.printStackTrace();
		}
		return scp;
	}

}
I got an exception, working on a windows 8.1 64bit machine.
SCHWERWIEGEND [ReaderVRML.setInput]: VRML 1 parsing failed, call ANTLR first!
In your documentation it is said that jReality is only able to handle vrml 1 data, but I see vrml97 (named there as vrml2) in your repository. Is there any way to parse a vrml97-file?

Thanks and greetings to berlin

Re: VRML97

Posted: Fri 15. Aug 2014, 15:08
by gunn
I'm not sure if this is relevant, but there is a VRML2 writer for jReality, but not a VRML2 reader. The VRML2 writer was added in order to be able to ship jReality files to the 3d printing facility in the same building as the math department (3D Labor at TU-Berlin). It would be nice to have a VRML2 reader of course.