|
Sweet Home 3D Forum » List all forums » » Forum: 3D problems » » » Thread: obj Transparency? |
|
| Print at Dec 19, 2025, 5:48:58 AM | |
| Posted by pencilart at May 21, 2014, 7:34:00 PM |
obj Transparency?I need to track down if this problem is in SweetHome 3D or AOI 3.0: 1) In AOI (3.0) make a cylinder (or any other shape) 2) assign a transparent texture to it (all else is default) 3) export it as .obj 4) import it into SweetHome 3D Notice the transparency is NOT transparent. This all used to work for me in the past with no problems with transparency exports. I have contacted the coders of Art Of Illusion too to see if the problem is there, but I just want to track this down. P.S. I am on Windows 8.1 using SH3D 4.3 and Java 7 update 55 |
| Posted by okh at May 21, 2014, 8:17:40 PM |
|
Re: obj Transparency? Hi Pencilart, I have not noticed any wrong interpretation of transparency values in sh3d. Not obj/mtl interpretation, not texture interpretation. 1) did you check the .mtl file that accompanies the .obj file? Correct transparency should be set as d value under the transparent material. Eg. d 0.0 (=fully transparent - invisible)2) did you check the texture file (if you use one - png/gif) to see whether it still has transparency after export? ok |
| Posted by pencilart at May 21, 2014, 9:58:11 PM |
|
Re: obj Transparency? the mtl says: #Produced by Art of Illusion 3.0, Wed May 21 16:44:58 EDT 2014 newmtl Default_Texture Kd 0.23 0.23 0.23 Ks 0 0 0 Ka 0 0 0 illum 1 Still no joy. Hopefully I will be able to attach a screenshot: ---------------------------------------- ---------------------------------------- |
| Posted by okh at May 22, 2014, 8:15:32 AM |
|
Re: obj Transparency? Your .mtl file (the material: Default_Texture) does not seem to contain reference to a texture graphics file. e.g: map_Kd xxxx.pngor transparency, e.g: d 0.5Therefore I guess there must be something in how AoI exports. I have practically no experience with AoI, but can the settings be changed to include the texture file in the export - or something? Failing that, you could try to add transparency (e.g. d 0.5) to the .mtl file yourself, like this: #Produced by Art of Illusion 3.0, Wed May 21 16:44:58 EDT 2014ok |
| Posted by pencilart at May 22, 2014, 1:21:51 PM |
|
Re: obj Transparency? ok, n/m. I figured it out. chalk that up to not making models for many months. |
| Posted by pencilart at May 26, 2014, 8:11:50 PM |
|
Re: obj Transparency? Therefore I guess there must be something in how AoI exports. I have practically no experience with AoI, but can the settings be changed to include the texture file in the export - or something? I just saw your reply after I had posted saying, never mind. I might try to edit the mtl file as you said. But one thing with Windows 8, which is very annoying: Once you edit a file in an app, Windows 8 automatically assigns that app to open as the default for that file. Then to correct the problem, you have to take quite a few steps, which is the annoying part. In AOI, this is in the exported .obj: and this is in the .mtl file: Anyway, here is the chandelier after I finally remembered that I have to rename all things transparent to (without the quote marks of course) "sweethome3d_window_pane" ![]() And this is the chandelier as rendered by Art Of Illusion: http://www.storm-artists.net/view/136785 (I know that sh3d's renderer won't give the same results) P.S. I tried to edit the .mtl but that did not make a difference...That's ok. |
| Posted by okh at May 28, 2014, 10:58:29 AM |
|
Re: obj Transparency? Nice chandelier. Glad it worked. But now you have me confused . It seems transparency can be achieved in two ways. Either
ok PS. Win is a strange beast. If it weren't for some vital software, I ditch it in a sec. However, if you open-with / drag-drop your .mtl files into an editor (Notepad/PSPad), surely the default doesn't change (?) |
| Posted by pencilart at May 28, 2014, 1:48:47 PM |
|
Re: obj Transparency? I had forgotten that transparency only works if the item is named sweethome3d_window_pane I'm not sure about the mtl file, I've never looked at it to compare. Editing the mtl file for transparency does not work for some reason. Dunno if that has something to do with what software was used to create the item or not. Right now, the mtl files and obj files are not assigned to any software on Windows 8, and as far as I know it should stay that way. But when you edit such files, Win8 will assign that app as default. SO annoying. So, Okh, have you ever done any 3d modeling yourself? If you haven't, try it! :-) |
| Posted by Puybaret at May 28, 2014, 7:12:54 PM |
|
Re: obj Transparency? sweethome3d_window_pane is just a way to set a shape as transparent. It was introduced in an old version of Sweet Home 3D before the MTL file and d parameter were supported. In the current version, its main drawback compared to d parameter in a MTL file is that it's fixed to 0.5 and that you can't change its appearance in the furniture Furniture materials dialog box. When changing individual materials wasn't available, it was handy because when you changed the color of the window, only its frame was changed and the pane remained uncolored. But in version 4.3, changing the material of a window pane won't have any effect, something that looks more buggy because it's not necessary for backward compatibility. I just fixed it in the Beta 15 of the version 4.4. I am wondering whether sweethome3d_window_mirror_xxx (reflection) can also be achieved with .mtl. It seems that "illum 3" in MTL file format could match the mirror effect, but I didn't investigate further when I programed the first mirror effect. The good thing with introducing special names for shapes, is that it can be easily supported in file formats afterwards.Conclusion: pencilart, using d parameter works, but mixing it with sweethome3d_window_pane name won't change transparency value. Hum, maybe I should fix that too! ![]() ---------------------------------------- Emmanuel Puybaret, Sweet Home 3D creator |
| Posted by sree.arun.kr at May 28, 2014, 8:16:25 PM |
|
Re: obj Transparency? Some times transparency need to be assigned manually in Sweet home 3D Try these steps, 1. Make/design your model at any 3d-modeling software 2. Apply transparency texture(color=black&white) to it( use *.png only to work with SweetHome3D). 3. Align UVW mapping. 4. Export as .obj(wavefrot OBJ) or .3ds (check Transparency texture must be added in the same folder ). 5. Import exported obj/3ds file in sketch-up/any other 3d model viewing application to check transparency map working or not.If transparency does not load you failed to create model correctly(Need re creation). 6. If transparency working correctly then Import 3d model as furniture in Sweet-home-3D. 7. Select imported furniture, go to Furniture -> Modify in main menu 8. Select materials radio button in color& texture, then click Modify 9. Select model material(your transparent object material) then select Texture radio button and click browse button. 10. In the new window click Import button & browse, open your texture map and click OK for all windows. ![]() *10. If object don't have a texture file, fully transparent like glass then select color radio button and select white color in modify Furniture material window. 11. Now render your image. TIP. If you want to hide(invisible in render) a particular part of an object then use my texture. ![]() (This file consist zero color pixel). ![]() ---------------------------------------- ![]() |
| Posted by pencilart at May 28, 2014, 10:00:25 PM |
|
Re: obj Transparency? Great replies! Well, I have been playing around with this and found that I had to go into the .obj and edit it like I used to when I got started with sh3d, so I did that for my chandelier. I will check out the newest version of sh3d soon. @sree: I didn't know that all that could be done. I will try it soon! ---------------------------------------- |
| Posted by sree.arun.kr at May 29, 2014, 6:00:59 AM |
|
Re: obj Transparency? I had to go into the .obj and edit it like I used to when I got started with sh3d, Its exactly that what I means. (I am not good in English)SH3D failed to pick transparency(a bug) so we need to do manually, by assigning with a color or texture to it. ---------------------------------------- ![]() |
| Posted by pencilart at Jun 1, 2014, 5:38:12 PM |
|
Re: obj Transparency? I just tried out the 4.4 beta. The glass looks nice, but not as transparent as I wanted. The glass in the chandelier should have a peach hue. The comparison set up... ![]() How it rendered in sh3d... ![]() Chandelier2 is the one that I went into the .obj and edited the color (usemtl amber_trans) ChandelierOriginal is the one I sent to Emmanuel Chanlight is the one I tried making the glass more transparent in Art Of Illusion (and a light, peachy color) |
| Posted by Puybaret at Jun 1, 2014, 9:35:58 PM |
|
Re: obj Transparency? The Chandelier2 version looks very nice. ![]() ---------------------------------------- Emmanuel Puybaret, Sweet Home 3D creator |
| Posted by pencilart at Jun 1, 2014, 11:01:24 PM |
|
Re: obj Transparency? ok, Emmanuel, I will send you that one soon. (the file size is large, that is why I am sending it to you.) |
| Posted by sree.arun.kr at Jun 2, 2014, 10:04:25 AM |
|
Re: obj Transparency? Edit/replace your .mtl file with following settings only for Chandelier glass material (that you want to render). Kd 0.784 0.337 0.368 (R G B: your wished peach colour ) Ka 0.784 0.337 0.368 Ni 2.5 d 0.86 save it. open it in SH3D Render it. If Render fail go modify furniture->material->modify color and change/pick glass color again to peach If failed render then attach .mtl file on next post ---------------------------------------- ![]() |
| Posted by pencilart at Jun 5, 2014, 3:37:06 PM |
|
Re: obj Transparency? I did the editing and rendering. I've noticed that: Glass in SH3D looks good in the 3d pane, even the color modification. For the (best and 2nd best) rendering, it's a different story: The glass named sweethome3d_window_pane looks like a proper glass (transparent) while the one that just had the mtl edited by adding: d 0.15 looks more solid, not transparent. Even with the mtl edited (as per sree's instructions) as: Kd 0.784 0.337 0.368 Ka 0.784 0.337 0.368 Ni 2.5 d 0.86 also renders in the best and 2nd best setting as solid, no transparency, while in the fast and next to fast renders as transparent as it should (but, of course, not with realistic looking lighting). ---------------------------------------- ---------------------------------------- |
| Posted by sree.arun.kr at Jun 5, 2014, 5:11:57 PM |
|
Re: obj Transparency? Glass in SH3D looks good in the 3d pane, even the color modification. Yes, I am talking about Glass transparency is working better only if you modify the color and this bug is fixed in version 4.4(Releasing soon). ---------------------------------------- ![]() |
| Posted by pencilart at Jun 5, 2014, 6:26:34 PM |
|
Re: obj Transparency? Those recent render were done in 4.4 beta. I am using 2 different glasses for my tests: For one, I edited the mtl file (the polymesh has a normal, name: polymesh) The other one is the one I renamed the object (in my 3d creation software) to "sweethome3d_window_pane" When I modified the furniture texture to select the color of the glass in sh3d, that did work nicely in the 3d view, but when rendered in the best setting of the renderer, the glass that had the .mtl file edited was not colored the way I wanted and not as transparent, whereas the glass that had been renamed to "sweethome3d_window_pane" in my 3d creation software worked nicely as I had expected. (I do not use image maps for simple color, I only use image maps for wood or marble texture and of course, I am not concerned about transparency with those) The renderer, when in best or nearly best mode is what is giving me that behavior. So, I don't know if you have any control over that. BTW, choosing a texture (such as the patterns) gives a cool, funky effect. I like that very much! ---------------------------------------- |
| Posted by sree.arun.kr at Jun 6, 2014, 9:50:04 AM |
|
Re: obj Transparency? Do you get the result when rendering with v4.4b20 ?. Or your looking for a result like this ?(External Link), then it required a detailed modeling. You can achieve a good result with tweaking .mtl file here is some helpful resource. ![]() ---------------------------------------- ![]() |
| Posted by pencilart at Jun 6, 2014, 7:25:34 PM |
|
Re: obj Transparency? Thanks for the resource Sree, I have bookmarked it and emailed that to myself for when I'm on another computer. I have just tried out v4.4b20 and I get the same result when using the "best" setting for the render: rendering in v20 is a lot faster (yay!) Only the glass that was named "sweethome3d_window_pane" in the modelling software is rendered correctly, the other two (both with edited .mtl files) don't render fully as transparent, only the bottom portion seems to render that way while the top is opaque. -- see screenshot ---------------------------------------- |
|
|
Current timezone is GMT Dec 19, 2025, 5:48:58 AM |