Create and customize T-shirt using SceneKit

32 views Asked by At

I have an iOS App for clothes shops. and I want to render a 3D model for a t-shirt. I will use Scenekit to render this 3D model. Now I want to let the user (customer) customize this T-shirt by selecting some attributes and switching it on/off. let's say the user wants to select a collar from a list of predefined collars, and when the user selects it I have to display this selection in our 3D model. I assume that we have one 3D model, and inside it, there are all predefined attributes. and we can hide/display attributes depending on user selection. now my question is this the best practice to implement it, I mean add all attributes inside the 3D model? And how to hide/display it using a 3D model? Should it be a list of nodes and loop through it then hide/display it?

I display a 3D model (.obj) inside SCNView. But I can't access to the nodes. and I don't know that this is the right way.

1

There are 1 answers

0
codetiger On

There are different ways to achieve this.

  1. Load the base mesh which is common to all variations in a separate mesh node. Other variation can be in individual mesh obis and when the user selects a variation, you can load the mesh dynamically and add it to the scene as separate node.

  2. You can create a Obj that has a superset of all variations and you can apply transparent texture to show variations.

  3. You can load the Obj with multiple mesh buffers and change the material properties for each submesh for hiding the variations.

  4. You can also have each variations in different OBJ is you don't have too many permutations and combinations based on your usecase.