Joined: Oct 2, 2007
Post Count: 188
Status:
Offline
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]
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.
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.
Joined: Oct 2, 2007
Post Count: 188
Status:
Offline
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.
France
Joined: Nov 7, 2005
Post Count: 9419
Status:
Offline
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 creator
Joined: Oct 2, 2007
Post Count: 188
Status:
Offline
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
Joined: Oct 2, 2007
Post Count: 188
Status:
Offline
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.
France
Joined: Nov 7, 2005
Post Count: 9419
Status:
Offline
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 creator
Joined: Oct 2, 2007
Post Count: 188
Status:
Offline
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.
France
Joined: Nov 7, 2005
Post Count: 9419
Status:
Offline
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 creator