Updated VRML Exporter for Blender

myself using it for creating web3d content like this:
http://www.area42.de/_2004/_media/rudi/

or this:
http://www.neeneenee.de/vrml/worlds/3dwin.php?theSrc=area42

I ever dreamed about a perfect VRML exporter, with Blender i got the chance to make this dream real.

Uploaded even now a new version and think this is RC3 and after that comes final:
http://www.neeneenee.de/blender/x3d/vrml97_export150.py.txt

Bart I ran into a couple of exports that would not display in Blaxxun Contact5.1 Interestingly they displayed fine in spazz3d2.5c Even when I exported them as vrml files from spazz they would not display in blaxxun. It might be a plugin issue but if you are interested I could zip up the files and put them on some webspace I have so you can see the code.

hello shaba, i was a littlte bit away from the computer. of course i’m interested about your files and sources for testing. you can drop me line to bart at neeneenee dot de

Again a new version:
http://www.neeneenee.de/blender/x3d/vrml97_export150.py.txt

and some upadted help docs:
http://www.neeneenee.de/blender/x3d/exporting_web3d.html

I just want to confim that I succesfully exported a single mesh after some frustration with the version 1.4. The object had a jpg texture uv mapped to it.
Then I could visualise it with VizUp standalone demo program. It didn’t load in Octaga, but plenty of other wrl don’t, I don’t know why.
I had to tweak the ambientIntensity from 0.25 to 1 and the headlight to TRUE in the Venues plugin to IE to see the object because it displayed black.
Thank you!
resserva

I always have this problem with Blaxxun Contact 5.1. If I leave blender’s default lights set to 1.0 the vrml scene comes exports with almost all of this objects a glaring white color. I just turn down the intensity of the lamp to somthing between 0.25 and 0.5 and then export. If the scene is not lit the way I want it I then go back into blender and adjust again and export again.

How many lights you put into the scene? What kind of lights? Can i have the scenes for developing?

Normally you can preview your scene using the internal renderer and turn occamb and shadows off.

Please don’t forget ambientIntensity using ambient color of the world. Don’t use more the 8 lights in a scene. The lightning model of VRML/ X3D is another then Blenders. I can tweak it more but for that i need testing scenes.

Just another hint: Blaxxun 5.1 is old and dead, for testing i use Contact VRML/X3D 6.1 or 6.2 (succsessor of Blaxxun Contact) and Cortona 4.1. Sometimes i got problems with scenes that made for rendering and have to much lights but scenes that comes with good lightning looking great in VRML/ X3D too.

i want the vrml

do you?

1 just delete txt

2 stick in python script folder

is it for a specific version of blender?

For Blender 2.35 and above

Edwin are you saying you want the actual vrml code? If so just open up the wrl file in any text editor and there it is. WRL files can also be saved in gzip format to save space when tranfering over the net. This was important back in 1997 when not many people had broadband connections. The brower plugin then ungzips the file on the fly. BUT I do not think Barts exported writes anything other then staight ascii/utf text with a .wrl extension.

ok im using an a program that draws houses in 3d

punchpro as3000
the only formal it exports besides its propietry?

one is vrml…wrl extenstion

i want to import it in blender;for some reason the other vrml import
gives me junk …just dots for a 3d model thats fine in cortona plugin

Bart, I had to make a small change to get it to run, I mentioned it on www-vrml.

can’t find your post, tell me about the changes.
What Blender version? Operation System? Python version (or not installed)?

Bart I did some work with the made by the exporter. Its had no purpose just me making stuff up as I felt like it and exporting it with your script. So no critisisms :). You need to cut and paste the link into your broswer brinkster does not allow hotlinking. Its at:

This was done with three blender lamps with the intensity at ~ 1.0 on each.

http://www28.brinkster.com/sysop83/objects1.wrl

This was done with the same three lamps but with each of two of them set to .25 and the third set to .5 to make the total 1.0.

http://www28.brinkster.com/sysop83/objects2.wrl

In blaxxun the first on looks too bright there is lots of glare. The second one look better and more as I intended the scene to be.

Python 2.3.4 installed as normal on Debian GNU/Linux sid (unstable version), and Blender 2.35

The change wavs on line 252, a variable
‘vislimit’ is passed to the round() function, but vislimit was initialized to
the string “0”. I changed it to the float 0.0, and it worked OK.

It also took a pretty long time to run.

@reed:
Thanx for your reply, checked it and changed it. The problem about the speed of exporting is that it is just a python script and it is ascii. I did a speed about about the original script because values for vertices, mapping and color are written directly in a line without a formating function.

@shaba:
took a look at your files and at the source code i saw you used the old vrml 2.0 export and not mine.

Uploaded the current version (05/04/01) into the web:
http://www.neeneenee.de/blender/x3d/vrml97_export150.py.txt

At my point now time to freeze the development, making X3D version and writing docs.

I got confused about the “VRML 2.0” script vs. your “VRML97” script, you might want to give it a new name like “VRML97 (by Bart 2005)” or something.

Reed

The standard is called VRML97 and not VRML 2.0 that’s one of the changes. VRML 2.0 is wrong. It is like you calling X3D as XML.