Problem with vrml 1.0 and 2.0

hi
i am trying to make my own world in vrml format with blender but unfortunately i have those problems:
1-i’ve tried to make a cube with a 187*187 pixels texture on ,i save my work in vrml 1.0 format and i go to watch it with cosmo player but…all the textures are gone and it remains just the rgb color that i set.

2-after that ive tried to use a script for vrml 2.0 and i’ve done everything
that is written here http://www.janw.gothere.uk.com/exportmesh.html#vrml1
about the wrlexport.py … but then when i go to export by the script
i got this mess.

attributeerror:getcurrentscene

at the end i ask…how can i make a cube with a texture in vrml format under blender?

THE_CONTE,
I can’t stand questions going unanswered in this forum. I may be able to help on this one…So here goes…
I tried to create a VRML plane with a texture in Blender just as you said, and I too got no texture.

So it’s time to look at the code and see what is up. Here is my sample.
Notice the filename path for the texture. (my texture is named 128x128)
I opened the .wrl file with textpad, notepad should work too.
Look at line 19

#VRML V1.0 ascii

# Blender V2.0

# 'Switch' is used as a hack, to ensure it is not part of the drawing

Separator {
Switch {
	DEF Material_001
	Material {
		diffuseColor 0.800000 0.800000 0.800000
		specularColor 1.000000 1.000000 1.000000
		shininess 0.500000 
		transparency 0.000000 
	}
	DEF Plane_001
	Separator {
		Texture2 {
			filename \Documents and Settings\mthoenes\Desktop\wrltest\128x128.jpg
			wrapS REPEAT 
			wrapT REPEAT 
		}
		Material {
			diffuseColor [
				 1.000000 1.000000 1.000000,
				 1.000000 1.000000 1.000000,
				 1.000000 1.000000 1.000000,
				 1.000000 1.000000 1.000000,
			]
		}
		MaterialBinding { value PER_VERTEX_INDEXED }
		Coordinate3 {
			point [
				 1.000000 1.000000 0.000000,
				 1.000000 -1.000000 0.000000,
				 -1.000000 -1.000000 0.000000,
				 -1.000000 1.000000 0.000000,
			]
		}
		TextureCoordinate2 {
			point [
				 0.000000 1.000000,
				 1.000000 1.000000,
				 1.000000 0.000000,
				 0.000000 0.000000,
			]
		}
		IndexedFaceSet {
			coordIndex [
				 0, 3, 2, 1, -1,
			]
		}
	}

	# Hidden Objects, in invisible layers

}

# Visible Objects

Separator {
	MatrixTransform {
	matrix 
		1.000000 0.000000 0.000000 0.000000
		-0.000000 0.310945 -0.950428 0.000000
		-0.000000 0.950428 0.310945 0.000000
		-0.404220 -2.782492 -13.219487 1.000000
	}
	PerspectiveCamera {
		focalDistance 3.500000
	}
	Separator {
		MatrixTransform {
		matrix 
			9.815659 -0.000000 0.000001 0.000000
			-0.000000 3.333677 9.232213 0.000000
			-0.000000 -9.232213 3.333677 0.000000
			-0.171372 3.027570 0.000000 1.000000
		}
		USE Plane_001
	}
}
}

Now that did not work… So let us correct the path info to read…(See line 18 )

#VRML V1.0 ascii

# Blender V2.0

# 'Switch' is used as a hack, to ensure it is not part of the drawing

Separator {
Switch {
	DEF Material_001
	Material {
		diffuseColor 0.800000 0.800000 0.800000
		specularColor 1.000000 1.000000 1.000000
		shininess 0.500000 
		transparency 0.000000 
	}
	DEF Plane_001
	Separator {
		Texture2 {
			filename 128x128.jpg
			wrapS REPEAT 
			wrapT REPEAT 
		}
		Material {
			diffuseColor [
				 1.000000 1.000000 1.000000,
				 1.000000 1.000000 1.000000,
				 1.000000 1.000000 1.000000,
				 1.000000 1.000000 1.000000,
			]
		}
		MaterialBinding { value PER_VERTEX_INDEXED }
		Coordinate3 {
			point [
				 1.000000 1.000000 0.000000,
				 1.000000 -1.000000 0.000000,
				 -1.000000 -1.000000 0.000000,
				 -1.000000 1.000000 0.000000,
			]
		}
		TextureCoordinate2 {
			point [
				 0.000000 1.000000,
				 1.000000 1.000000,
				 1.000000 0.000000,
				 0.000000 0.000000,
			]
		}
		IndexedFaceSet {
			coordIndex [
				 0, 3, 2, 1, -1,
			]
		}
	}

	# Hidden Objects, in invisible layers

}

# Visible Objects

Separator {
	MatrixTransform {
	matrix 
		1.000000 0.000000 0.000000 0.000000
		-0.000000 0.310945 -0.950428 0.000000
		-0.000000 0.950428 0.310945 0.000000
		-0.404220 -2.782492 -13.219487 1.000000
	}
	PerspectiveCamera {
		focalDistance 3.500000
	}
	Separator {
		MatrixTransform {
		matrix 
			9.815659 -0.000000 0.000001 0.000000
			-0.000000 3.333677 9.232213 0.000000
			-0.000000 -9.232213 3.333677 0.000000
			-0.171372 3.027570 0.000000 1.000000
		}
		USE Plane_001
	}
}
}

Now that did work!
This syntax gave me a plane with a texure in cosmo player…
After fixing the code, we also need to make sure that the image is in the same folder as the .wrl file, or if you specific folder path on your web server that you use for images, you could try that too. I am not sure what the correct syntax would be…

I don’t know much about programming, but the Blenderheads in the python forum could probably tell you where to put the file so blender would write the file reference correctly the first time…

This was a straight VRML 1 save out of Blender 225. No scripts were used.

thank u very much :smiley:

Is it a VRML2.0 export script for Blender 2.25 you want ?
Try this one or use it to improve it yourself
http://www.geocities.com/alexlinno/blender/wrl2export.py
/Alex

I do have the same problem. No Textures in an VRML1 file. But in my case, in the wrl file, there is no
Texture
or TextureCoordinate tag!
only the 3DCoordinates.
Does anyone know what i’m doing wrong?

cheers
Jochen