Hi, i have created some faces (TIndexedFaceSetNode) by code and assigned it to a TShapeNode.Geometry.
then i created a TAppearanceNode and Assigned that to the ShapeNode.Appearance and further i created a TImageTextureNode and assigned that to the Texture property of the AppearanceNode.
It is working but looks very bad.
where can i define how the Texture is spawned over the faces.
Please define what it means “looks very bad” Texture just interacts with the material, multiplying proper material parameters (Appearance.texture
multiplies colors of Material.diffuseColor
or PhysicalMaterial.baseColor
or UnlitMaterial.emissiveColor
; you can assign textures within material nodes too, to multiply any other material parameter, see material nodes in X3D spec: Extensible 3D (X3D), ISO/IEC 19775-1:202x, 12 Shape component ).
By “how the Texture is spawned over the faces”, do you mean texture coordinates? These are specified in texCoord
field of IndexedFaceSet. Example how to assign texture coordinates in Pascal are in
TIndexedFaceSet.texCoord Field was what i am looking for. Looks bad was meaning my texture has a Picture of 1m x 1m. My face is 20m x 8m. if no texCoord is assigned the Texture would be stretched over the entire face.
thank you very much!