Download

Online

Gallery

Blog

  Index  | Recent Threads  | List Attachments  | Search
 Welcome Guest  |  Register  |  Login
Login Name  Password
 

Sweet Home 3D Forum



No member browsing this thread
Thread Status: Active
Total posts in this thread: 3
[ Jump to Last Post ]
Post new Thread
Author
Previous Thread This topic has been viewed 2031 times and has 2 replies Next Thread
Keet
Advanced Member
Member's Avatar

Netherlands
Joined: Apr 8, 2022
Post Count: 754
Status: Offline
Reply to this Post  Reply with Quote 
Multiple selectable textures for a single object part

Is it possible to attach multiple textures to a single object face to make them selectable by the user?

Example: I created a start platform for a competition swimming pool. Those platforms have numbers 1 to 8. What I would like is to have a single object where the user can select the correct number for each copy of the platform. This requires that all number textures are embedded in the imported object and the user selects which one shows.

I can think of three solutions but neither are 'perfect':
1. create a separate platform object for each number
2. distribute the obj/mtl files and add all numbers textures. The user must import the correct number texture to show that number.
3. add 8 thin boxes, all at the same position and with a different number texture and box name. Export the object with all boxes visible. After import the user makes all but one box invisible.

I'm also thinking about clothing for characters where you can select different clothing embeded in the character object. Especially interesting with the connection to MakeHuman.

Any ideas if this is possible or maybe a better solution than I thought of?

Maybe a possible new feature using the library furniture editor where extra optional textures can be linked to a specific furniture part. This would keep the texures with the object and doesn't require an extra import and separate distribution of the textures.

Keet
[Aug 7, 2022, 2:08:05 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Puybaret
Expert
Member's Avatar

France
Joined: Nov 7, 2005
Post Count: 9141
Status: Offline
Reply to this Post  Reply with Quote 
Re: Multiple selectable textures for a single object part

Sorry, it's not possible to associate more than a material to each shape of a 3D model. But MTL, DAE and 3DS file formats allow to cite materials which are not actually used, so maybe using some special naming conventions on materials (like platform, platform_sweethome3d_alternative_platform2, platform_sweethome3d_alternative_platform3,...), the program could store these materials to show them in a new dropped down list in the Material choice dialog box.
In your case, this would imply to edit the MTL or DAE file accordingly (editing a 3DS file would be more difficult since it's a binary file), and pay attention not to lose these changes when you export again your 3D model after an update in the modeler program.
It could be also an interesting option for furniture makers if they want to limit the choice of materials on a piece of furniture, for example to let users choose only white, black or blue for a part of this piece.

Another solution I've been thinking for a while, would be to make your solution 3 more user friendly: instead of displaying the 8 numbers which gives an ugly model at screen in the hope that the user will make 7 of these materials invisible, Sweet Home 3D could allow to make visible some invisible materials (defined for example with d 0 in their MTL file). Therefore, your platform would look nicer when loaded, but the user will have to guess that there could be some invisible shapes that he could use instead of the default number.
I wanted to program this feature to propose a choice of different handles on kitchen cabinets showing a default handle when loaded. The problem of this feature is that it's quite advanced for the end user who has to explore the list in Material modification dialog box and guess that there are some invisible materials that could be made visible instead of other materials.

Hope that advanced users here understand all this wink
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D developer
[Aug 8, 2022, 11:09:47 AM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Keet
Advanced Member
Member's Avatar

Netherlands
Joined: Apr 8, 2022
Post Count: 754
Status: Offline
Reply to this Post  Reply with Quote 
Re: Multiple selectable textures for a single object part

Thank you Emmanuel, I did not expect it to be possible right now. I did know you could list materials in the mtl file that are not used, but as you said, you loose them when exporting. I just couldn't find a way to use them.

Displaying a dropdown list with extra materials listed in the mtl file associated with a specific furniture part is exactly what I'm looking for and I'm very hopefull knowing you are already looking for a solution.

Editing OBJ and MTL files is something I do all the time, so no problem there and I don't think other advanced users that create their own furniture would have any problems either. It's virtually unavoidable when you create furniture in Sweethome3D. It's probably easier than having four opening doors and two opening drawers in the same cupboard like I'm creating at the moment.

I would suggest to start with just the OBJ and MTL files since that is the base format for Sweethome3D and it would allow the OBJ exporter to be extended to include the alternatives so you don't loose them. We can't export to DAE or 3DS so I see no immediate use for it. In any case a solution shoudn't break the current feature that you can get rid of parts by exporting furniture with the unwanted parts made invisible. That's how you 'steal' a handle from one object to place it on another. Maybe marking alternatives with a sweethome3d prefix could avoid that since alternatives aren't really invisible, just 'not selected'.

The 'cabinet-handle' option you mentioned is also something I've been looking in to but I didn't want to ask for too much in one go laughing
Specifically for handles but also for different panels on door fronts or different legs under a table. Something I'm doing today could use this option: a cupboard with glass doors in the upper half where I created two shelves behind the glass doors at the same position: one solid and one glass. You have to make the solid shelf invisible to see the glass shelf, but since the glass shelf 'hides' completely within the solid shelf you wouldn't have to bother with hiding that. Switching the shelves like cabinet handles would be a much cleaner solution.

I'm looking forward too what you come up with in the hopefully near future. I have a lot of custom made furniture that could use it.

Keet
[Aug 8, 2022, 8:12:24 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
[ Jump to Last Post ]
Show Printable Version of Thread  Post new Thread

    Get Sweet Home 3D at SourceForge.net. Fast, secure and Free Open Source software downloads
   
© Copyright 2006-2024 eTeks - All rights reserved