Friendlyskies AoI Forum

You are not logged in.

Announcement

#1 May 15, 2009, 9:56 am

lifebydesign
Undetermined Origin
From: United States
Registered: May 14, 2009,
Posts: 3
Reputation :   

Scripting for Total Dummies - HELP, Please.

Okay, after searching and more searching for the VERY FIRST place to start
learning how to write code, I give up.  Everything I find assumes I'm already
an expert or at least know something.  I know absolutely nothing. 
I'm praying someone will be kind and patient enough to at least tell me
where to start.

I've read the AoI tutotrial on script writing, but the ONLY thing I can do is
what the example shows (the random red/white/blue spheres).  I cannot
carry it forward to create MY OWN object mtl code. 

For instance, I am teaching myself how to create a simple Glass of Apple Juice.
If I want to write the mtl code for it (and I desperately do),  what will teach me
the very FIRST to the LAST line of code?   
 

Please, please, please share with me...  when YOU first set foot in a classroom
that taught you object modelling and how to write the mtl code for your models,
what did you have to know first and foremost?


****************

DiEdra

Offline

 

#2 May 15, 2009, 11:43 am

fpgui
Moderator
From: France
Registered: November 2, 2004,
Posts: 958
Reputation :   
Website

Re: Scripting for Total Dummies - HELP, Please.

First of all, we need to define what you're trying to achieve and the best way for it. Scripting, essentially, means writing s of Java code that do something to tedious or complex to do "by hand". In the case of the apple juice glass, it's a lot easier to define a curve and lathe it rather than define the points in a script.

You're quoting "mtl" code. What is that ? The only reference to mtl given 3D object context is the .mtl file format companion to the .obj format. AoI do import such files but don't "speak" .obj or .mtl. Once again, AoI scripts are written in Java (or actually a scripting language very close to it). So in any case the first step is to make sure you know basics of coding and the Java language (or a language akin to Java, eg C).


Francois

Offline

 

#3 May 16, 2009, 6:47 am

lifebydesign
Undetermined Origin
From: United States
Registered: May 14, 2009,
Posts: 3
Reputation :   

Re: Scripting for Total Dummies - HELP, Please.

Thank you so VERY much!


**  The problem I have relates to Sweet Home 3D and
the GLC_Player I installed to view objects.  I've found
some fantastic colored models online
(outside of the SH3D furniture catalog) which others have
created that I use in a house I'm designing.  However, upon
uploading them to SH3D, they appear WITHOUT the color...
as simple white shapes.  If I add color to them in SH3D,
the entire object is ONE color.  **
   
Maybe I am wrong to think that the "mtl" code
is what is necessary to make colors and textures
REMAIN APPLIED to an object so that it can be uploaded
to another program and appear exactly as it was created.

How do you get your models to remain the colors
and textures you create them so that you may upload them
to another program?

I will absolutely begin at once studying C
and Java.  In fact, I have already begun searching
for websites and books that teach the absolute basics
in the best way for me - those that assume I know
nothing about nothing.


Again, thank you so very much.
I cannot express enough appreciation for any amount of help.


****************

DiEdra

Offline

 

#4 May 16, 2009, 11:41 am

fpgui
Moderator
From: France
Registered: November 2, 2004,
Posts: 958
Reputation :   
Website

Re: Scripting for Total Dummies - HELP, Please.

I don't know anything about Sweet Home 3D, but here are some facts.

You're right in saying you need a .mtl file which is a file format describing color and/or textures to apply to an object which is usually described in a .obj file. The .obj/.mtl files go as a duo. Get a .obj file and no colouring nor texturing will be applied. A .mtl file alone is useless since you don't know anything about the object it is related to. I don't know how much of .mtl file Sweet Home 3D supports, but if the models you found online do have a .mtl file associated then it is possible that the .mtl file format implementation is incomplete in SH3D or that the .mtl files are not valid. Either way, you're stuck. You can try to import the files in AoI along with the .mtl file (it's automatic) and check the result against a simple rendering. You'll see if the objects look ok or if the colouring/texturing is wrong. You can also create a simple object in AoI, map an image and export .obj/.mtl files and import them in SH3D. These steps require some knowledge of AoI, you should read the manual. Prepare to spend some time learning the process even if there is nothing complex. Perhaps someone has a scene available from which you could easily export .obj/.mtl files to check SW3D.

There is absolutely no reason why you should learn and start scripting. .mtl is a file *format* not a language.

Finally there are softwares that convert between file formats. Depending on what formats SW3D supports, it could be interesting to export .obj/.mtl into antoher format. Vidiot may know about such software assuming you're running Windows (I'm not).


Francois

Offline

 

#5 May 17, 2009, 8:33 am

lifebydesign
Undetermined Origin
From: United States
Registered: May 14, 2009,
Posts: 3
Reputation :   

Re: Scripting for Total Dummies - HELP, Please.

Oh! 
I think I see where I'm confused.
I thought the .mtl file was what I had to write in the
"Create Scripted Object" area of AoI in order to apply color and texture
and make them stay applied when I import them to SH3D.  I'm wrong... I think.
And another "Oh!"... thank you for telling me .mtl was a file format and not a language.
I never differentiated between the two.  Wow, the things I DON'T know!

Yes, I already have tried creating simple objects in AoI to import to SH3D -
like the glass of apple juice - but it again appeared colorless.  So I know I'm doing something wrong, I just don't know what.

Thank you so much for telling me to try "Curve & Lathe". 
See, I'm so green that I didn't even know what those were, but I woke this morning and got right to it and I like it.  Have to play with it more to see what I can accomplish.

I also read the AoI manual - several times, but I suppose for me it will take more
reading and applying as I go along to really understand what I'm doing since I have ZERO training or experience with this sort of thing.   

Do I ever appreciate all your time and effort helping me.
I love AoI even if I don't know what the heck I'm doing - YET.   ;-)

A Thousand Thanks!

DiEdra


****************

DiEdra

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2005 Rickard Andersson