magnalite
|
  |
| Joined: 18 Oct 2009 |
| Total Posts: 2467 |
|
|
| 13 Oct 2013 10:53 AM |
Yes I know this is easy to make but it is helpful to a lot of people and lots of fun to play with. I also feel it has the potential to improve the quality of games in roblox. So here it is, the public release of my obj importer.
First of all how to use it.
Simply copy and past the contents of a .obj and its accompanying .mtl file (it isn't required) into the two scripts inside the long string marks. NOTE: the obj file MUST BE TRIANGULATED.
Loadspeed is how fast it creates the mesh. I recommend somewhere around 100. Scale is the scale of the model. If it is two small or two big roblox become unstable very fast. Be careful. WrongAngleFixer flips the y and z axis's around due to varying standards. LoadColor should be true if you have a mtl file and false if you don't have one.
The other options are pretty self explanatory and just there for fun. shouldRenderFaces should normally be true with the other two options false.
And that is it! The script does the rest.
Here is a video Sparker22 did on it a while ago which should clarify most questions. http://www.youtube.com/watch?v=xLosN-2_gHM
Finally the model: http://www.roblox.com/obj-importer-v1-2-0-item?id=132434545
I hope this helps the roblox community. Have fun!
Credits go to oysi for his triangle function.
(NOTE I did make this a while ago. It is messy and if enough people complain I will rewrite it. However it gets the job done and isn't meant to be readable. Only the top bit it meant for users to see)
Potential FAQ-
Q:My output gets stuck on "Waiting for Mesh and Materials Data". A:You did not put the obj file or the mtl file in correctly.
Q: Roblox lags loads but I can't see my model. A: Change your scale. It is either too big or too small.
Q:It just errors A:You are probably using a unsupported obj. Sorry about that.
Q:My model has lots of bits missing. A:You are not using a triangulated obj file. |
|
|
| Report Abuse |
|
|
magnalite
|
  |
| Joined: 18 Oct 2009 |
| Total Posts: 2467 |
|
|
| 13 Oct 2013 11:02 AM |
| It also comes with an example file in it already. Don't change anything and hit play to see what it can do. |
|
|
| Report Abuse |
|
|
Xnite515
|
  |
| Joined: 18 Feb 2011 |
| Total Posts: 22763 |
|
|
| 13 Oct 2013 12:07 PM |
| Maximum limit before studio crashes? |
|
|
| Report Abuse |
|
|
magnalite
|
  |
| Joined: 18 Oct 2009 |
| Total Posts: 2467 |
|
|
| 13 Oct 2013 12:10 PM |
| I actually have no idea. It seems to vary with the model shape. It's managed to get to 80k faces but i would say keep it less than 40k to be safe. |
|
|
| Report Abuse |
|
|
Syrt
|
  |
| Joined: 30 Sep 2011 |
| Total Posts: 2745 |
|
|
| 15 Apr 2014 02:36 AM |
Where to actually get objects?
"And this is why we can't have nice things..." |
|
|
| Report Abuse |
|
|
|
| 15 Apr 2014 04:40 AM |
| Make them, or download them. |
|
|
| Report Abuse |
|
|
|
| 19 Apr 2014 04:24 PM |
Keeps on saying logging probability 0.92397839289529 not logging
Waiting for Mesh and Materials Data
17:23:50.832 - Workspace.MeshFile:47891: attempt to call field 'Mesh' (a nil value) 17:23:50.833 - Script 'Workspace.MeshFile', Line 47891 17:23:50.834 - stack end |
|
|
| Report Abuse |
|
|
|
| 04 May 2014 05:47 PM |
| Do you have to copy EVERYTHING in the file? |
|
|
| Report Abuse |
|
|
|
| 04 May 2014 11:03 PM |
@Syrt
TF3DM.
Google it. (It's a free 3D model website where people upload models) Sorry if this is against the rules in any way, but you asked. |
|
|
| Report Abuse |
|
|
inLua
|
  |
| Joined: 20 May 2010 |
| Total Posts: 156 |
|
|
| 12 May 2014 08:58 AM |
| I'm in a bit of a predicament; whenever I open a place up (even if it hasn't had this script in it at all) the standard model of it spawns. How do I stop this from happening? Thanks. |
|
|
| Report Abuse |
|
|
|
| 26 May 2014 10:37 AM |
i have every bit of information and code in my notepad from a c4d program where do i put it now does the .obj file even work in a .rblx script? |
|
|
| Report Abuse |
|
|
|
| 26 May 2014 11:02 AM |
what does triangulate mean? i loaded a landscape from an obj and it's like half way completed there's a bunch of triangles but the ones beside it arent fill in, only half are there i assume this has to have something to do with triangulating... |
|
|
| Report Abuse |
|
|
|
| 26 May 2014 11:08 AM |
ignore the first post i made on here i got that but yeah what is triangulating |
|
|
| Report Abuse |
|
|
digpoe
|
  |
| Joined: 02 Nov 2008 |
| Total Posts: 9092 |
|
| |
|
Swordize
|
  |
| Joined: 03 Jun 2013 |
| Total Posts: 13136 |
|
| |
|
Looah
|
  |
| Joined: 22 Feb 2013 |
| Total Posts: 922 |
|
| |
|
kanealiis
|
  |
| Joined: 12 Jan 2008 |
| Total Posts: 267 |
|
|
| 06 Jun 2014 07:38 PM |
| Crashes at about 330,000 faces |
|
|
| Report Abuse |
|
|
|
| 21 Jun 2014 02:33 PM |
| I've made an obj. but now whenever i try to open it up in studio the studio crashes... |
|
|
| Report Abuse |
|
|
Xeptix
|
  |
| Joined: 14 Mar 2013 |
| Total Posts: 1115 |
|
|
| 21 Jun 2014 02:49 PM |
@TehMightyGod
and you necrobumped this thread why? |
|
|
| Report Abuse |
|
|
| |
|
Xeptix
|
  |
| Joined: 14 Mar 2013 |
| Total Posts: 1115 |
|
|
| 21 Jun 2014 05:31 PM |
| oh, I don't know, maybe because it was 20 days old? |
|
|
| Report Abuse |
|
|
|
| 21 Jun 2014 05:56 PM |
| and... your point is? Also the fact that your complaining about that is quite humorous as there are much older threads that popup everyday because someone decided to post on on them. |
|
|
| Report Abuse |
|
|
|
| 23 Jun 2014 10:47 PM |
| What would be the correct .obj size for something that's 1600 meters long? |
|
|
| Report Abuse |
|
|
|
| 03 Jul 2014 09:27 PM |
| Someone make a video demonstation. |
|
|
| Report Abuse |
|
|
|
| 06 Jul 2014 06:14 PM |
How do you get the contents I have an obj and mtl of myself and I cant find the contents what program do I need. (I have blender right now)
вrιngιn 88' вacĸ 👌 |
|
|
| Report Abuse |
|
|