Question

Setting Appearances in FME

  • 22 April 2013
  • 3 replies
  • 15 views

Badge
Hi All,

 

I was wondering if anyone has got any experience with setting Appearances within FME?

 

I am in the process of converting an OS MasterMap Topo Layer ESRI Shape file, that has been converted to 3D (so, it has 3D vertices instead of 2D) to a Wavefront Obj file and want to style the resultant Obj file according to attribution contained within the file (these are the Descriptive Group/Term attributes).  

 

According to the Safe website, you need to create a new null geometry object using the Creator Transformer, you then create a new style using the AppearanceStyler transformer and you then add this style to your geometry using the AppearanceSetter transformer (previously called the AppearanceAdder).  Unfortunately, nothing seems to happen. I get my Obj file, but there are no appearances created.  Does anyone have any ideas why this might be?

 

 

cheers

 

 

Dave

3 replies

Badge +1
Hi Dave, can an obj file store colour information? I think you need to create a material file outside of FME and link it to your output.

 

 

It may be necessary to fanout your output to multiple obj files for each category (building, roads, etc) and create/reference different mtl files for each one
Badge
Hi Owen,

 

yes, Obj can store colour info, as either materials or textures. There is an associated .mtl file with the obj file that contains the colour info.  That should be created alongside the obj during the translation process.

 

Oddly, while just experimenting we had a obj file with some random 3d objects (sphere, cube and cone) created outside of FME.  Using just the ApperanceSetter I can successfully add an appearance/colour to the objects and write out an obj file.  When I have exactly the same settings in my AppearanceSetter in my original workspace it doesn't work. 

 

Since the only thing that is different between the 2 workspaces is the input dataset, i suspect it;s something to do with that and my guess is that it is the geometry. Do I have to force the geometry to anything in particular?

 

 

cheers

 

 

Dave
Badge +1
Hmmm. Its hard to say exactly, but the appearancesetter will be expecting a 3d object - you could try a 3dforcer or extruder

Reply