Solved

Is it possible to export .obj file with multiple tiles with desire tile size (eg. 4096 x 4096) instead one giant texture file?

  • 30 September 2020
  • 6 replies
  • 5 views

Is it possible to export .obj file with multiple tiles with desire tile size (eg. 4096 x 4096) instead one giant texture file?
icon

Best answer by daveatsafe 1 April 2021, 23:42

View original

6 replies

Userlevel 2
Badge +17

Hi @chmielewskamag​ ,

 

It is possible, by tiling the texture image in FME before applying it to the surfaces.

 

If you could provide more information on your present export process, I may be able to provide more detailed instructions.

Hi @chmielewskamag​ ,

 

It is possible, by tiling the texture image in FME before applying it to the surfaces.

 

If you could provide more information on your present export process, I may be able to provide more detailed instructions.

Can you elaborate @daveatsafe​ how workflow should look like?

 

Basically I have aerial image that I want to drape it over DEM. I'm using AppearanceSetter transformer and it does the job but texture file is huge.

 

After adding RasterTiler transformer before AppearanceSetter (set Texture mapping mode: Top Down Georeferenced) translation failed.

Userlevel 2
Badge +17

Can you elaborate @daveatsafe​ how workflow should look like?

 

Basically I have aerial image that I want to drape it over DEM. I'm using AppearanceSetter transformer and it does the job but texture file is huge.

 

After adding RasterTiler transformer before AppearanceSetter (set Texture mapping mode: Top Down Georeferenced) translation failed.

Hi @chmielewskamag​ ,

After the RasterTiler, please use the RasterOnSurfaceOverlayer transformer from FME Hub to apply the tiles to the surface.

 

On second thought, the RasterTiler output may not be suitable, since some faces may span two tiles, which will result in an incomplete texture. We want an overlapping tile set instead. The best way to do this is the following:

  • Send the original image to a BoundingBoxReplacer
  • Send the bounding box to a Tiler to create tile boundary set
  • Use Bufferer to expand tile boundaries so they overlap. Buffer distance should be larger than face size.
  • Use Clipper to clip copy of original image by tile boundaries

The overlapping image tiles will increase the output size, but there should be no faces without a texture.

Can you elaborate @daveatsafe​ how workflow should look like?

 

Basically I have aerial image that I want to drape it over DEM. I'm using AppearanceSetter transformer and it does the job but texture file is huge.

 

After adding RasterTiler transformer before AppearanceSetter (set Texture mapping mode: Top Down Georeferenced) translation failed.

Hi @daveatsafe​  and thanks for getting back to me.

 

I actually manage to prepare raster tiles and apply it to the surface (drape it over DEM). All l looks good in Inspector (see below ) AppearanceSetter_Inspectorbut texture on exported OBJ file is not correctOBJ_in_CloudCompareThis is screenshot from exported .mtl file. As you can see it does contain information about all available texture map

list_of_created_textureMapHowever when I search for one of the texture name (for example noname01.png) in .obj file it can't find it. So it looks like only one texture map called noname.png is actually used for entire surface and other (like noname00.png, noname01.png etc.) are missing.searching_for_textureMap_called_noname01Those are the OBJ parameters that I've used.

OBJ_SettingsMagda.

Userlevel 2
Badge +17

Can you elaborate @daveatsafe​ how workflow should look like?

 

Basically I have aerial image that I want to drape it over DEM. I'm using AppearanceSetter transformer and it does the job but texture file is huge.

 

After adding RasterTiler transformer before AppearanceSetter (set Texture mapping mode: Top Down Georeferenced) translation failed.

Hi @chmielewskamag​ ,

The OBJ writer in FME 2019 and beta versions of FME 2020 did have a problem with multiple texture files. If you can, please update your FME to 2020.2 or 2021.0, which can be found at www.safe.com/download.

Can you elaborate @daveatsafe​ how workflow should look like?

 

Basically I have aerial image that I want to drape it over DEM. I'm using AppearanceSetter transformer and it does the job but texture file is huge.

 

After adding RasterTiler transformer before AppearanceSetter (set Texture mapping mode: Top Down Georeferenced) translation failed.

Updating FME to new version fixed problem. Thanks @daveatsafe​ 

Reply