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: 29
Posts: 29   Pages: 3   [ 1 2 3 | Next Page ]
[ Jump to Last Post ]
Post new Thread
Author
Previous Thread This topic has been viewed 59071 times and has 28 replies Next Thread
pencilart
Advanced Member
Member's Avatar


Joined: Oct 2, 2007
Post Count: 188
Status: Offline
Reply to this Post  Reply with Quote 
AOI - colored objects?

I've been trying to get my objects colored (in Art Of Illusion) so that when SH3D imports it, then the user does not have to set a color if they want. Each time I import the object, it is white instead of the color I thought I had set for it in A.O.I.

puybaret, how have you been doing it?




[Note: this thread was started on sourceforge.net forums]
[Oct 11, 2007, 11:01:00 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: AOI - colored objects?

Ok, I'll give here more details about the answer I posted yesterday at https://sourceforge.net/forum/message.php?msg_id=4562508

I you want to add colors to your OBJ models, you should open an OBJ file you generated in a text editor and study the tokens "g" and "usemtl" of the OBJ format described at http://download.java.net/media/java3d/javadoc...bjectfile/ObjectFile.html .

The token "g" followed by a text, describes the name of a part of the object.
For example in the railing.obj file you created, there is a line "g Cube_1".

To specify the color of a part, add a new line under a line starting by "g", and type in that line "usemtl" followed by a space and the name of one of the colors described in OBJ format. Here is the list of supported colors :
amber amber_trans aqua aqua_filter
archwhite archwhite2 bflesh black
blondhair blue_pure bluegrey bluetint
blugrn blutan bluteal bone
bone1 bone2 brass brnhair
bronze brown brownlips brownskn
brzskin chappie charcoal deepgreen
default dkblue dkblue_pure dkbrown
dkdkgrey dkgreen dkgrey dkorange
dkpurple dkred dkteal emerald
fgreen flaqua flblack flblonde
flblue_pure flbrown fldkblue_pure fldkdkgrey
fldkgreen fldkgreen2 fldkgrey fldkolivegreen
fldkpurple fldkred flesh fleshtransparent
flgrey fllime flltbrown flltgrey
flltolivegreen flmintgreen flmustard florange
flpinegreen flpurple flred fltan
flwhite flwhite1 flyellow glass
glassblutint glasstransparent gold green
greenskn grey hair iris
jetflame lavendar lcdgreen lighttan
lighttan2 lighttan3 lighttannew lightyellow
lime lips ltbrown ltgrey
meh metal mintgrn muscle
navy_blue offwhite.cool offwhite.warm olivegreen
orange pale_green pale_pink pale_yellow
peach periwinkle pink pinktan
plasma purple red redbrick
redbrown redorange redwood rubber
ruby sand_stone sapphire shadow
ship2 silver skin sky_blue
smoked_glass tan taupe teeth
violet white yellow yellow_green
yellowbrt yelloworng

For example in the railing.obj file you created, if you want the color of the part "Cube_1" be grey, you should add the line :
usemtl grey

As long as you don't add any other line starting by "usemtl" token, all the other following parts will be colored with the previously specified color.
Thus, if you want to change the colors of the other parts, you should add other lines starting by "usemtl".

Once, you have finished with these "usemtl" lines, save your file and try it in Sweet Home 3D Import furniture wizard.

To help you choose a color, please download the image http://sweethome3d.sourceforge.net/Java3DCubeColorsWithTransparency.png : it shows all the colors listed above.

You'll see that among these colors, some are transparent. You may use these colors for window panes.
You can also name a part with a name starting by "sweethome3d_window_pane" to make that part transparent, as in the example http://sweethome3d.cvs.sourceforge.net/sweeth...content-type=text%2Fplain , that matches the "Double window" of Sweet Home 3D.

Finally, don't hesitate to open the Sweet Home 3D OBJ files available at http://sweethome3d.cvs.sourceforge.net/sweeth...sweethome3d/io/resources/ , and the ones available at http://sweethome3d.sourceforge.net/importModels.html to view some real examples.




----------------------------------------
Emmanuel Puybaret, Sweet Home 3D developer
[Oct 12, 2007, 7:27:00 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
pencilart
Advanced Member
Member's Avatar


Joined: Oct 2, 2007
Post Count: 188
Status: Offline
Reply to this Post  Reply with Quote 
Re: AOI - colored objects?

Thank you so much! The coloring of the railing worked. I will look at the rest of what you told me about transparency in windows. I'm working on a really cool looking 5 pane window with a curved window above the main pane. They are rather popular in home construction in my area.

This is a preview of what I want it to look like (I'm not done with it yet):
http://www.storm-artists.net/view/39805

I'm sorry I didn't realize that you had to edit the text file itself. I thought it could be done by the Art Of Illusion program itself.


[Oct 12, 2007, 8:04:00 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: AOI - colored objects?

One more thing about windows : In the current version of Sweet Home 3D (and that probably won't change before a long time), the intersection between a window and a wall is computed from the bounding box of the window. This means that the hole in a wall where the window is placed is always rectangular.
For the windows set you want to create, you'll have to add in your 3D model some wall parts at the left and the right of the rounded part of the upper window, otherwise these parts will appear as holes in Sweet Home 3D. The drawback of this way of doing is that these two parts won't be automatically of the same color as the wall the window is placed into (personally, I would set a white color on these two parts, because most people have white painted walls).

I hope my explanations are clear enough... ;-)



----------------------------------------
Emmanuel Puybaret, Sweet Home 3D developer
[Oct 12, 2007, 10:00:00 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
pencilart
Advanced Member
Member's Avatar


Joined: Oct 2, 2007
Post Count: 188
Status: Offline
Reply to this Post  Reply with Quote 
Re: AOI - colored objects?

I've edited the .obj text file for the window panes but they still aren't transparent.
I've studied your example for the part:
g sweethome3d_window_pane
usemtl flltgrey
and I've made mine exactly like that but it's not working. The colors for the other parts work nicely though. :D




[Oct 12, 2007, 11:14:00 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
pencilart
Advanced Member
Member's Avatar


Joined: Oct 2, 2007
Post Count: 188
Status: Offline
Reply to this Post  Reply with Quote 
Re: AOI - colored objects- n/m

ok, I just tried changing the names of the window panes in the AOI program and THEN exporting it and then I plugged in the necessary changes for the window panes and wood areas. It works now, the panes are transparent.

Just like you said, the arched area had a hole in it, lol. I will fix that later according to your directions.

Thank you again!

Another question (sorry to keep you so busy)

About the depth:
When I import the window, the depth is extremely small (.0something), unlike yours, which is about 10 inches. I'm just wondering about that. I do make changes before finishing the import though.


[Oct 12, 2007, 11:51:00 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: AOI - colored objects?

> (sorry to keep you so busy)
Don't worry, answering your questions may help other users... ;-)

The depth (and other sizes) displayed in import furniture wizard comes directly from the OBJ file, and therefore from the sizes you used in Art Of Illusion. I added the ability to change the size of a model in the import wizard because most imported models haven't a realistic size.
Most models I designed have the same problem, but their size is set in a property file like this one : http://sweethome3d.cvs.sourceforge.net/sweeth...og.properties?view=markup



----------------------------------------
Emmanuel Puybaret, Sweet Home 3D developer
[Oct 13, 2007, 12:09:00 AM] 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: AOI - colored objects?

Maybe you should add a solid frame around your window, like I did for the double-hung window (see http://sweethome3d.cvs.sourceforge.net/sweeth...content-type=text%2Fplain for its OBJ file), and choose a depth for this frame equal to default wall thickness.


----------------------------------------
Emmanuel Puybaret, Sweet Home 3D developer
[Oct 13, 2007, 11:37:00 AM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
pencilart
Advanced Member
Member's Avatar


Joined: Oct 2, 2007
Post Count: 188
Status: Offline
Reply to this Post  Reply with Quote 
Re: AOI - colored objects?

I just tried that but it didn't work. The area inside the box was treated as a window also, not solid. I did not know (yet) the right way to add the solid box area around that curve.

btw, can you carve out an area (like a curve) from a solid box in AOI? If there is a way, I'd like to find the tutorial that tells you how.


[Oct 15, 2007, 5:17:00 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: AOI - colored objects?

I'm not sure I fully understand what you mean by "carve out", but I think you should use Tools > Boolean modelling menu :
- select all your objects and create a temporary object that matches the union of all these objects with Tools > Boolean modelling
- create a thin box around the objects
- select the union object and the thin box and use the option First - second or Second - first in Tools > Boolean modelling dialog
- hide or delete the union and the thin box


----------------------------------------
Emmanuel Puybaret, Sweet Home 3D developer
[Oct 16, 2007, 6:23:00 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Posts: 29   Pages: 3   [ 1 2 3 | 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-2024 eTeks - All rights reserved