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: 4
[ Jump to Last Post ]
Post new Thread
Author
Previous Thread This topic has been viewed 4570 times and has 3 replies Next Thread
rennmoehre
Newbie




Joined: Jul 24, 2016
Post Count: 13
Status: Offline
Reply to this Post  Reply with Quote 
confused import Arbaro files with colors

Hi,

I tried to import on OBJ file from Arbaro, that works, but the tree has no colors. More precisely the leaves have the same color as the trunk.
How can I create a MTL file for the color?

Thomas
[May 27, 2017, 7:00:26 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
okh
Advanced Member




Joined: May 12, 2013
Post Count: 1545
Status: Offline
Reply to this Post  Reply with Quote 
Re: import Arbaro files with colors

Played with Arbaro a while back, but abandoned it because tree files in general, not only Arbaro, tend to be huge and bloat and slow down SH3D (see SF 3D models 261 for tiny, but not-so-pretty alternatives). That said, Arbaro really is a nice way of making custom trees. There may very well be an easier way of doing what you ask, but I had the same problem and simply made my own .mtl file based on the different materials (usemtl xxx) in the .obj file. For the Arbaro files I generated, there were always four materials used, trunk, stems_1, stems_2 and leaves. So I used a text editor to insert a first line to mytree.obj and create a corresponding mytree.mtl.

Add first line in mytree.obj file:
mtllib mytree.mtl

Create mytree.mtl (placed in the same directory as mytree.obj):
newmtl trunk
illum 1
Ka 0.39607844 0.29803923 0.0
Kd 0.39607844 0.29803923 0.0
Ks 0.0078125 0.0078125 0.0078125
Ns 1.0

newmtl stems_1
illum 1
Ka 0.5372549 0.40392157 0.0
Kd 0.5372549 0.40392157 0.0
Ks 0.0078125 0.0078125 0.0078125
Ns 1.0

newmtl stems_2
illum 1
Ka 0.65882355 0.49411765 0.0
Kd 0.65882355 0.49411765 0.0
Ks 0.0078125 0.0078125 0.0078125
Ns 1.0

newmtl leaves
illum 1
Ka 0.31764707 0.5529412 0.18039216
Kd 0.31764707 0.5529412 0.18039216
Ks 0.0078125 0.0078125 0.0078125
Ns 1.0


Provided there are no other options in Arbaro that I missed and you have used in terms of groups, the above mtllib mytree.mtl should work for any arbaro file that has a correct mtllib mytree.mtl as a first line. The files, of course, do not have to be called mytree.* - the point is that the reference in the .obj file must point to the .mtl file.

Once this was done, the tree imported with colours in SH3D and could be changed in the SH3D Modify furniture - Materials modify dialogue.

ok
[May 29, 2017, 9:59:34 AM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
okh
Advanced Member




Joined: May 12, 2013
Post Count: 1545
Status: Offline
Reply to this Post  Reply with Quote 
Re: import Arbaro files with colors

More compact tests: SF 3D models 261 with the help of arbaro and blender.

1) starting with Wolfram Diestel's quaking aspen xml. Like Puybarets version, only simplified a lot more (brutally) and converted to a birch. At 1071kB uncompressed, less than a third of the size of the original quaking aspen. Of course, not as rich in detal (like my garden birch).
2) a generic tree at < 300 kB uncompressed.

A lot fewer surfaces so these models can work better with SH3D on slower computers - and not bloat files.

Hope is to get a workable model with leaves down to half of the above sizes.

ok


[Nov 25, 2017, 3:37:22 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
okh
Advanced Member




Joined: May 12, 2013
Post Count: 1545
Status: Offline
Reply to this Post  Reply with Quote 
Re: import Arbaro files with colors

More on this and examples of lightweight trees (and how to edit) in thread 8110. ok
[Nov 30, 2017, 1:18:38 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
[ 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