How do i get multiple UV Channels into SceneKit from Cinema 4D?

This is really frustrating.

i know in SceneKit editor in Xcode there is an option to select a uv channel to apply a texture to, but i can't see how to bring in a model with multiple UVs

i'm working in cinema 4d, i can add multiple uv tags and export as FBX and it keeps multiple UV channels intact. But i can't import FBX into SceneKit. Other formats like USD (ugh), Collada, etc only keep 1 channel map.

does anyone know the correct workflow to go from C4D to SceneKit with multiple maps per model?

  • edit. i tried reality converter with an FBX with multiple UVs and it too ignores them all and just keeps 1.

Add a Comment

Replies

what i got so far, i hope it helps others.

you can edit USD, OBJ and DAE files to add extra uv channels manually. not ideal but you can. all of them involve having duplicate geometry each with the set of uv channels you want to merge

the easiest to change is the USD file. open file in text editor and copy these 2 sections from the other mesh objects

texCoord2f[] primvars:st

int[] primvars:st:indices

paste those in the mesh object you want to add them to. they will need unique variable names, i just add numbers like this

texCoord2f[] primvars:st2

int[] primvars:st2:indices

save file and done

for OBJs there is only one section per map but there are more numbers to change

you'll want to copy the section "# 88 texture coordinates", the lines look like this and there are many of them,

vt 0.419371 0.134602 0.000000

vt 0.410308 0.142855 0.000000

paste that at the end of the mesh and change the vt to be unique for every texture map like this,

vt2 0.419371 0.134602 0.000000

vt2 0.410308 0.142855 0.000000

DAE files are the most versatile but harder to judge how the maps relate. as with USD there are 2 sets to copy but sectioned of in tags