Joined: Nov 24, 2013
Post Count: 3
Status:
Offline
How to import model of a cabinet with transparent glass panel?
Dear Forum Users,
I have created a 3D model of a cabinet which has a wooden body and as door a glass panel with a wooden frame. The model has been done in Art of Illusion V3.0 and exported from there as a OBJ-File enabling the option 'Write Textures to .mtl File' in the Art of Illusion Export-Dialog.
After this I imported the created OBJ-File in my Furniture Library using the Furniture Library Editor 1.12.
When using the Cabinet model in Sweet Home 3D Version 42 though, the glass panel in its door is just black and no more transparent as it was in Art of Illusion. To illustrate this I'll attache an image, showing the rendering of Art of Illusion on the left hand side and the result in Sweet Home 3D next to it.
Since there are some models having cabinets with transparent glass panels in the Libraries which are available for Download over the Sweet Home 3D Website there must be a way to do this... but how?
I searched a while on the forum here but did not find a proper post - so it would be great if somebody had me a hint!
Well, and since I am just writing another related question: it seems that the textures are being taken over at all, just the color: if you look on my image you can see a wood structure on the Art of Illusion rendering - but no more in Sweet Home 3D. This happened to all my own created and imported models up to now.
Joined: May 12, 2013
Post Count: 1545
Status:
Offline
Re: How to import model of a cabinet with transparent glass panel?
imported the created OBJ-File ... the glass panel in its door is just black ...
Your .mtl file appears to be imported without specifying transparency to your cabinet door.
How you deal with this in Art of Illusion, you may need to ask an Art of Illusion forum. However, you can quite simply edit the .mtl file and add transparency yourself so it works with SH3d.
Open your .mtl file with a text editor.
Each material has an entry with the name: newmtl name.
Listed below you will find the colour (Ka, Kd etc).
There SHOULD also be a transparency entry starting with d. e.g. d 0.45 for 45% opacity (if not there, object is not transparent)
Change or add this entry as you please.
Save file and reimport you model.
Now, this will also allow you to find out where your transparency disappears. Also, looking at the file will tell you whether there is a reference to the texture. Sorry if this is on the technical side. I am afraid you will have to ask someone knowledgeable about Art of Illusion, to fix the original export.
Joined: Nov 24, 2013
Post Count: 3
Status:
Offline
Re: How to import model of a cabinet with transparent glass panel?
Thanks a lot, your hint solved my issue! After adding the d parameter to the proper material within the .mtl file my glass panel is transparent now after importing the cabinet into Sweet Home 3D. Regarding Art of Illusion: Since Transparency seems to be set in the material properties, I most likely will have to file a bug affecting the exporter there. ... in fact I just discovered there even exists already one - bad thing is, it is already 4 years old
One question remains to me tough: I was expecting the .mtl file to keep information about the textures used for the model - in my cabinet example a wooden structure which I thought would be reflected in some sort of a texture image. This is not part of the .mtl file since it just looks like this (for the wooden texture called birch):
newmtl Birch Kd 0.94838 0.90947 0.85077 Ks 0 0 0 Ka 0 0 0 illum 1
So how do I transfer this texture information to the Furniture Library Editor? Should there be an image containing the structure? As a Jpeg? With the same name than the material in the .mtl file?
Thanks, Michael
P.S.: For some reasons it seems that it is not possible to display pictures located on DropBox directly in the post (or I don't know the correct syntax) - so just follow this link !
Joined: May 12, 2013
Post Count: 1545
Status:
Offline
Re: How to import model of a cabinet with transparent glass panel?
Good that transparency is solved, although I suspect you may do this from Art of Illusion somehow too. I had a quick look and noticed a number of material controls that might help.
As for the image file, you can add the texture from SH3d too. If you IMPORT the .obj (+.mtl) in SH3d, ADD TEXTURE with SH3d (edit furniture), SELECT your model and EXPORT (3d view menu) selected item to OBJ format. That should produce .obj file, .mtl file and one image file for each texture. These can be imported to the Furniture Library Editor. (I prefer zipping all files before import.)
If you want to play with the .obj/.mtl files, the simple explanation is that the image should be linked from the .mtl file, for instance like this.
newmtl Birch Kd 0.94838 0.90947 0.85077 Ks 0 0 0 Ka 0 0 0 illum 1 map_Kd birch_test.png
The image file name could be anything as long as it is the same as what is stated in map_Kd and the file could be .png, .jpg, .gif (avoid spaces and special characters in the file name). (The material itself could also be transparent/semi-transparent .png/.gif, but then the rendering issues in SH3d are a touch more complicated).
The former method gives you the advantage more control over the scaling of your texture, but neither method gives you the same kind of control over placement of complex textures as you should get with Art of Illusion.
Your model looks very nice. I hope you eventually share it. Good luck.
ok
PS Other general notes.
Some editing of the image file is not a bad idea. You usually get good results with scaled down, smaller image files. And you will not bloat your designs.
From another thread I noticed that is possible that the developers (Puybaret) will add transparency to future releases of SH3d colour dialogue.
What you cannot do with the .obj/.mtl file (to my knowledge) is adding a light source under or inside your cabinet. BUT you can add it later in SH3d (or even add it in the FurnitureLibrary properties, but that is a whole different story.... :-)
Joined: Nov 24, 2013
Post Count: 3
Status:
Offline
Re: How to import model of a cabinet with transparent glass panel?
Thanks for your explanation. Meanwhile I also found out that Art of Illusion is only able to export '2D textures'. The ones I have used are '3D', so I will have to try and develop a '2D' one.
When I searched this site with the search box on top I didn't find the existing tread of oversaw it somehow, sorry! (I did even serval runs with different criteria but maybe it was just too late in the evening)
Having discovered SH3D and AOI when looking for a tool to quickly plan the layout of our new apartment, I have so much fun to create some of our furniture that I probably have an own library after we have moved in. I think I will offer it to SH3D for sharing then but it probably will be march/april.
Joined: May 12, 2013
Post Count: 1545
Status:
Offline
Re: How to import model of a cabinet with transparent glass panel?
I have so much fun to create some of our furniture that I probably have an own library after we have moved in. I think I will offer it to SH3D for sharing then but it probably will be march/april..
:-) I know the feeling, it is quite addictive when you get started. For the models you share, be careful to use textures (and other elements) that are not copyright restricted. Good luck, and looking forward to seeing your collection.