Features

Download

Online

Gallery

Blog

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

Sweet Home 3D Forum



Member(s) browsing this thread: Qrystal
Thread Status: Active
Total posts in this thread: 15
Posts: 15   Pages: 2   [ 1 2 | Next Page ]
[ Jump to Last Post ]
Post new Thread
Author
Previous Thread This topic has been viewed 25680 times and has 14 replies Next Thread
hansmex
Advanced Member
Member's Avatar

Netherlands
Joined: Sep 26, 2009
Post Count: 3063
Status: Online
Reply to this Post  Reply with Quote 
Export OBJ without floor

Emmanuel:

Is it possible to add a (small?) feature?

When exporting a model with walls, SH3D automatically includes the floor. Is it possible to add a check box in the export window so that the floor is not included?

The advantages are:
- Avoid "floor collisions" when importing a model with a floor. (see example)
- It would make it easier to build models consisting of more than one floor.
- It would make it easier to build custom furniture using SH3D (which probably many people do).

Hans
----------------------------------------
Attachment spiral staircase.sh3d (142447 bytes) (Download count: 899)

[Feb 15, 2010 4:17:40 PM] Show Printable Version of Post    View Member Profile    Send Private Message    Hidden to Guest [Link] Report threatening or abusive post: please login first  Go to top 
Puybaret
Expert
Member's Avatar

France
Joined: Nov 7, 2005
Post Count: 5837
Status: Offline
Reply to this Post  Reply with Quote 
Re: Export OBJ without floor

Reading version history again, I see that I programed Export to OBJ (version 1.4) before room's floor (version 1.5).
Then, as users can now create surfaces at floor level in Sweet Home 3D, I would suggest to simply remove this automatically computed floor in export to OBJ, instead of adding an option. What do you think?
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D developer
[Feb 22, 2010 10:40:44 PM] Show Printable Version of Post    View Member Profile    Send Private Message    Hidden to Guest    http://www.eteks.com [Link] Report threatening or abusive post: please login first  Go to top 
hansmex
Advanced Member
Member's Avatar

Netherlands
Joined: Sep 26, 2009
Post Count: 3063
Status: Online
Reply to this Post  Reply with Quote 
Re: Export OBJ without floor

Emmanuel:

Floors can only be applied to the ground level. So I think I would like to be able to export my "second floor object" WITH a floor texture. But what I don't like is that SH3D automatically inserts a rectangular floor that has the size of the largest objects. So, if a house has a bay window, not only does the bay window have a floor, but the entire side of the house gets an "external" floor that has the depth of the bay window and the length of the largest wall.

Using a textured box instead is not an option, I think: floor textures repeat, but object textures do not repeat.

Ideally, only user defined floors (meaning: rooms) should be included in the exported object.

By the way, thank you for the stream of new features. Not a day passes or you have a new version with new features! Applause!!

Hans
[Feb 23, 2010 12:13:43 AM] Show Printable Version of Post    View Member Profile    Send Private Message    Hidden to Guest [Link] Report threatening or abusive post: please login first  Go to top 
Puybaret
Expert
Member's Avatar

France
Joined: Nov 7, 2005
Post Count: 5837
Status: Offline
Reply to this Post  Reply with Quote 
Re: Export OBJ without floor

Hans,
Here is a simple tip to remove this rectangular floor in the current version:
1. Edit the generated OBJ file with any text editor
2. Search the first line starting by "g wall"
3. Remove all the lines that precede that line and start by a f letter
4. Save and import your edited OBJ file.
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D developer
[Feb 23, 2010 8:56:07 AM] Show Printable Version of Post    View Member Profile    Send Private Message    Hidden to Guest    http://www.eteks.com [Link] Report threatening or abusive post: please login first  Go to top 
hansmex
Advanced Member
Member's Avatar

Netherlands
Joined: Sep 26, 2009
Post Count: 3063
Status: Online
Reply to this Post  Reply with Quote 
Re: Export OBJ without floor

Emmanuel:

Thank you!
So, if I find "g wall" twenty times, only the first time I delete it, together with the preceding f-lines?

g wall_5_185; g wall_6_201; etc etc

The first instance has approx. 44 f-lines before it; the other ones only two f-lines.

Hans
[Feb 23, 2010 9:44:41 AM] Show Printable Version of Post    View Member Profile    Send Private Message    Hidden to Guest [Link] Report threatening or abusive post: please login first  Go to top 
Puybaret
Expert
Member's Avatar

France
Joined: Nov 7, 2005
Post Count: 5837
Status: Offline
Reply to this Post  Reply with Quote 
Re: Export OBJ without floor

Don't remove the line starting with "g wall", remove only the ones starting with a "f" and preceding that line.
A f-line defines a face and the number of f-lines to delete depends on the shape of the rooms you created. The simplest ground is a rectangle made of two triangles i.e. only two f-lines.
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D developer
[Feb 23, 2010 10:05:48 AM] Show Printable Version of Post    View Member Profile    Send Private Message    Hidden to Guest    http://www.eteks.com [Link] Report threatening or abusive post: please login first  Go to top 
hansmex
Advanced Member
Member's Avatar

Netherlands
Joined: Sep 26, 2009
Post Count: 3063
Status: Online
Reply to this Post  Reply with Quote 
Re: Export OBJ without floor

Emmanuel:

Let us assume that I delete ALL the f-lines from the OBJ-file. That means I would create an object that has no "bottom" faces, and therefore also doesn't have the unwanted "extra" floor.

The price is that I also lose those floors that I DO want to have.

If I were to create an in-between layer that consists only of the textured floors, then again I have the problem of the extra floor that follows the extreme points in the design. The only advantage would then be, that there are less floors, and it might be easier to find out which floor is the unwanted one.

I shall keep this in mind, and maybe experiment a bit.

Hans
[Feb 23, 2010 11:53:13 AM] Show Printable Version of Post    View Member Profile    Send Private Message    Hidden to Guest [Link] Report threatening or abusive post: please login first  Go to top 
Puybaret
Expert
Member's Avatar

France
Joined: Nov 7, 2005
Post Count: 5837
Status: Offline
Reply to this Post  Reply with Quote 
Re: Export OBJ without floor

I you remove all the f-lines from an OBJ file, you create an empty model! laughing
"f" means face not floor.
If you removed the f-lines I indicated to you, you won't remove the floor of the rooms you created with Create rooms tool.
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D developer
[Feb 23, 2010 1:16:10 PM] Show Printable Version of Post    View Member Profile    Send Private Message    Hidden to Guest    http://www.eteks.com [Link] Report threatening or abusive post: please login first  Go to top 
hansmex
Advanced Member
Member's Avatar

Netherlands
Joined: Sep 26, 2009
Post Count: 3063
Status: Online
Reply to this Post  Reply with Quote 
Re: Export OBJ without floor

Emmanuel:

I'm afraid I can't follow your explanation :-(

When I open a file, I find many-many lines that start with "g wall_xx_xx" where xx_xx are numbers. In that particular file the first "g wall" is preceded by 44 lines that start with "f". I assume those are the faces of the walls I have drawn at the start of the project.

All the other occurences of "g wall" are preceded by only 2 lines that start with "f".

So, how can I determine which f-lines to delete?
Should there be one (and one only) wall that starts with "g wall" and has no numbers following?

I don't have the patience to use the trial-and-error method and delete each (pair of) f-line(s) to find out which line is the unwanted floor. Sorry for that.

Hans
[Feb 23, 2010 2:43:42 PM] Show Printable Version of Post    View Member Profile    Send Private Message    Hidden to Guest [Link] Report threatening or abusive post: please login first  Go to top 
Puybaret
Expert
Member's Avatar

France
Joined: Nov 7, 2005
Post Count: 5837
Status: Offline
Reply to this Post  Reply with Quote 
Re: Export OBJ without floor

As I wrote before, remove only the f-lines before before the first "g wall" line.
For example, the file:

#
# Generated by Sweet Home 3D - mar. feb. 23 17:34:33 CET 2010
# http://www.sweethome3d.eu/
#
mtllib test.mtl
g ground_1
usemtl ground_1
v 0.0 0.0 -3.9999998
v 0.0 0.0 3.9999998
v 200.0 0.0 3.9999998
v 200.0 0.0 -3.9999998
f 1 2 3
f 1 3 4
g wall_1_5
usemtl wall_1_5
v 0.0 0.0 -3.9999998
v 0.0 0.0 0.0
v 0.0 250.0 0.0
v 0.0 250.0 -3.9999998
v 200.0 0.0 0.0
v 200.0 250.0 0.0
v 200.0 0.0 -3.9999998
v 200.0 250.0 -3.9999998
vn -1.0 0.0 0.0
vn 0.0 0.0 1.0
vn 1.0 0.0 0.0
vn 0.0 0.0 -1.0
vn 0.0 0.0 0.0
f 5//1 6//1 7//1 8//1
f 6//2 9//2 10//2 7//2
f 9//3 11//3 12//3 10//3
f 11//4 5//4 8//4 12//4
v 0.0 0.0 -3.9999998
v 0.0 0.0 0.0
v 200.0 0.0 0.0
v 200.0 0.0 -3.9999998
vn 0.0 1.0 0.0
vn 0.0 0.0 0.0
f 13//6 14//6 15//6
f 13//6 15//6 16//6
v 0.0 250.0 -3.9999998
v 0.0 250.0 0.0
v 200.0 250.0 0.0
v 200.0 250.0 -3.9999998
vn 0.0 1.0 0.0
vn 0.0 0.0 0.0
f 17//8 18//8 19//8
f 17//8 19//8 20//8
g wall_1_21
usemtl wall_1_5
v 0.0 0.0 0.0
v 0.0 0.0 3.9999998
v 0.0 250.0 3.9999998
v 0.0 250.0 0.0
v 200.0 0.0 3.9999998
v 200.0 250.0 3.9999998
v 200.0 0.0 0.0
v 200.0 250.0 0.0
vn -1.0 0.0 0.0
vn 0.0 0.0 1.0
vn 1.0 0.0 0.0
vn 0.0 0.0 -1.0
vn 0.0 0.0 0.0
f 21//10 22//10 23//10 24//10
f 22//11 25//11 26//11 23//11
f 25//12 27//12 28//12 26//12
f 27//13 21//13 24//13 28//13
v 0.0 0.0 0.0
v 0.0 0.0 3.9999998
v 200.0 0.0 3.9999998
v 200.0 0.0 0.0
vn 0.0 1.0 0.0
vn 0.0 0.0 0.0
f 29//15 30//15 31//15
f 29//15 31//15 32//15
v 0.0 250.0 0.0
v 0.0 250.0 3.9999998
v 200.0 250.0 3.9999998
v 200.0 250.0 0.0
vn 0.0 1.0 0.0
vn 0.0 0.0 0.0
f 33//17 34//17 35//17
f 33//17 35//17 36//17

should become:

#
# Generated by Sweet Home 3D - mar. feb. 23 17:34:33 CET 2010
# http://www.sweethome3d.eu/
#
mtllib test.mtl
g ground_1
usemtl ground_1
v 0.0 0.0 -3.9999998
v 0.0 0.0 3.9999998
v 200.0 0.0 3.9999998
v 200.0 0.0 -3.9999998
g wall_1_5
usemtl wall_1_5
v 0.0 0.0 -3.9999998
v 0.0 0.0 0.0
v 0.0 250.0 0.0
v 0.0 250.0 -3.9999998
v 200.0 0.0 0.0
v 200.0 250.0 0.0
v 200.0 0.0 -3.9999998
v 200.0 250.0 -3.9999998
vn -1.0 0.0 0.0
vn 0.0 0.0 1.0
vn 1.0 0.0 0.0
vn 0.0 0.0 -1.0
vn 0.0 0.0 0.0
f 5//1 6//1 7//1 8//1
f 6//2 9//2 10//2 7//2
f 9//3 11//3 12//3 10//3
f 11//4 5//4 8//4 12//4
v 0.0 0.0 -3.9999998
v 0.0 0.0 0.0
v 200.0 0.0 0.0
v 200.0 0.0 -3.9999998
vn 0.0 1.0 0.0
vn 0.0 0.0 0.0
f 13//6 14//6 15//6
f 13//6 15//6 16//6
v 0.0 250.0 -3.9999998
v 0.0 250.0 0.0
v 200.0 250.0 0.0
v 200.0 250.0 -3.9999998
vn 0.0 1.0 0.0
vn 0.0 0.0 0.0
f 17//8 18//8 19//8
f 17//8 19//8 20//8
g wall_1_21
usemtl wall_1_5
v 0.0 0.0 0.0
v 0.0 0.0 3.9999998
v 0.0 250.0 3.9999998
v 0.0 250.0 0.0
v 200.0 0.0 3.9999998
v 200.0 250.0 3.9999998
v 200.0 0.0 0.0
v 200.0 250.0 0.0
vn -1.0 0.0 0.0
vn 0.0 0.0 1.0
vn 1.0 0.0 0.0
vn 0.0 0.0 -1.0
vn 0.0 0.0 0.0
f 21//10 22//10 23//10 24//10
f 22//11 25//11 26//11 23//11
f 25//12 27//12 28//12 26//12
f 27//13 21//13 24//13 28//13
v 0.0 0.0 0.0
v 0.0 0.0 3.9999998
v 200.0 0.0 3.9999998
v 200.0 0.0 0.0
vn 0.0 1.0 0.0
vn 0.0 0.0 0.0
f 29//15 30//15 31//15
f 29//15 31//15 32//15
v 0.0 250.0 0.0
v 0.0 250.0 3.9999998
v 200.0 250.0 3.9999998
v 200.0 250.0 0.0
vn 0.0 1.0 0.0
vn 0.0 0.0 0.0
f 33//17 34//17 35//17
f 33//17 35//17 36//17

----------------------------------------
Emmanuel Puybaret, Sweet Home 3D developer
[Feb 23, 2010 4:38:16 PM] Show Printable Version of Post    View Member Profile    Send Private Message    Hidden to Guest    http://www.eteks.com [Link] Report threatening or abusive post: please login first  Go to top 
Posts: 15   Pages: 2   [ 1 2 | Next Page ]
[ 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-2017 eTeks - All rights reserved