Workspace OBJ Import success

About Truespace Archives

These pages are a copy of the official truespace forums prior to their removal somewhere around 2011.

They are retained here for archive purposes only.

Workspace OBJ Import success // SDK, Plug-in & 3rd Party Area

1  2  |  

Post by frootee // Feb 24, 2009, 9:38am

frootee
Total Posts: 2667
pic
Ok everyone. I just wanted to show you a snapshot of

a successful OBJ file import on the Workspace side.


I wish to sincerely thank RichLevy here on the forums for donating the mesh so I could test the plugin. :)


I have quite a bit to do still. But the rest should be relatively easy. Just follow the pattern...


Anyway, here's the picture.

I reused the fluid sim importer code. I only modified one source code file. Such is the power of the SDK. Once you have a full working package, you can make small modifications for a different purpose.

Post by JimB // Feb 24, 2009, 9:45am

JimB
Total Posts: 341
pic
Hi frootee is it better than the Model side LUUV plugin?



Jim

Post by Jack Edwards // Feb 24, 2009, 9:46am

Jack Edwards
Total Posts: 4062
pic
Better is such a relative term... :p

If you have files you want Froo to test, I'm sure he'd be happy to accept them. ;)

Post by JimB // Feb 24, 2009, 10:00am

JimB
Total Posts: 341
pic
Better is such a relative term... :p



If you have files you want Froo to test, I'm sure he'd be happy to accept them. ;)


Thank you Jack :D



Jim

Post by Jack Edwards // Feb 24, 2009, 10:03am

Jack Edwards
Total Posts: 4062
pic
Glad to help :D

Post by frootee // Feb 24, 2009, 10:43am

frootee
Total Posts: 2667
pic
hehe thanks Jim and Jack.

I'll need to compare LUUV with this one, using some meshes that caused issues with LUUV. That's a good 'Litmus test'. :)


Yes, if anyone has meshes they had trouble importing into truespace (Model side) using LUUV please get in touch with me.


Currently I am just reading the mesh data; but I'll be adding support for UV mapping, vertex normals, etc.


One thing I am Really interested in is, geometry with 'holes' since I've heard some triangulation algorithms have issues with that.

Post by Asem // Feb 24, 2009, 12:31pm

Asem
Total Posts: 255
You would be looking for ear-clip triangulation are trapezoidal triangulation. I've actually implemented it not to long ago but only the first part of ear-clip algorithm it's not the fastest but it's the simplest to implement the other is faster but takes some work to implement I've read.

I don't think you would have to do this though as the exported object should be triangulated already. Unless you mean triangulating curves?

Post by frootee // Feb 24, 2009, 2:21pm

frootee
Total Posts: 2667
pic
Thanks Asem.

The SDK has a Triangulation function. I am interested to see if it handles polygons with holes and such.


thanks,


Froo

Post by frootee // Apr 8, 2009, 12:06pm

frootee
Total Posts: 2667
pic
Ok minor update on this.

I had some concerns and questions about grouping which I was able to resolve today. I figured there were two possibilities: one very easy one, and one nearly impossible one. Fortunately, the solution is the easy one. :)


Anyways. I will be incorporating the grouping solution shortly. Won't take too long. Materials are pretty straightforward as well.

Post by jamesmc // Apr 8, 2009, 12:13pm

jamesmc
Total Posts: 2566
Great news!

The universe of 3D should all be OBJ format imo. :D

Post by frootee // Apr 11, 2009, 2:30am

frootee
Total Posts: 2667
pic
Ok I moved the OBJ file processing code into another class,

in a more relevant location. Though currently, the Group

processing logic is flawed. I'll get that straightened out though.

Post by frootee // Apr 13, 2009, 5:51am

frootee
Total Posts: 2667
pic
Found the problem.

Working it now.

Post by frootee // Apr 14, 2009, 4:51pm

frootee
Total Posts: 2667
pic
Groups are working well now.


funny thing is, Non-Grouping is screwed up. I can load one OBJ file that way.

Then when I try again, TS crashes. Hummmmmm......... Time for a Diff.

Post by frootee // Apr 15, 2009, 4:22am

frootee
Total Posts: 2667
pic
Crash Resolved.

Code which clears out the primary vectors (data structures) was commented out for testing. I forgot

to uncomment that code. Works fine now.

Post by Mr. 3d // Apr 15, 2009, 5:27am

Mr. 3d
Total Posts: 747
pic
It's nice to know that you are working so hard to make this a reliable and fully finished package for presentation !!!;):)
What's next ?

Post by frootee // Apr 15, 2009, 6:02am

frootee
Total Posts: 2667
pic
Thanks Mr. 3d.


Up next, I have to fix some bugs, and test.

Then, Materials, and supporting 'negative vertex indices'.

In an OBJ file, a negative index is allowed. That just means I have to read 'up' a number of lines to get the vertex data. Then more testing, and release.


After this, an OBJ exporter will be written.


Then, I may have some updates for the fluid sim. I am not sure yet; I need to check.

Post by noko // Apr 15, 2009, 7:38am

noko
Total Posts: 684
Great news! Can't tell you how much I want and need this tool.

Post by Tiles // Apr 15, 2009, 7:54am

Tiles
Total Posts: 1037
pic
Me too, me too ;)

Post by frootee // Apr 15, 2009, 5:09pm

frootee
Total Posts: 2667
pic
Thanks guys. I do not have an exact price yet but it will be around the same price as the fluid sim plugin.


I got the groups working for sure now.

Post by Breech Block // Apr 16, 2009, 3:10am

Breech Block
Total Posts: 844
pic
Great work frootee, this is definately on my wish list.

Post by frootee // Apr 16, 2009, 8:50am

frootee
Total Posts: 2667
pic
Couple minor updates.


1. Got the Progress bar working, to show the status of the import. This comes in handy for larger files.


2. Added functionality to handle 'negative indices' for vertices, uv's, and normals.


Last thing to add is Material support.

Post by frootee // Apr 25, 2009, 4:50pm

frootee
Total Posts: 2667
pic
Got Material handling working now. Not yet complete,

but I just successfully loaded an OBJ with textures. Many thanks to stan, Jack, and Clintonman for troubleshooting. :)

Post by Jack Edwards // Apr 25, 2009, 5:09pm

Jack Edwards
Total Posts: 4062
pic
Glad you got it figured out! :D

Post by frootee // May 5, 2009, 1:15pm

frootee
Total Posts: 2667
pic
ok I've settled on a materials solution.
This approach is much cleaner and more solid than earlier attempts.

Next step: assemble the D3D material which will be used as the basis.
I'll be including it as a resource, and making modifications per the MTL file
specified in the OBJ file.

This one's almost finished.

Post by Stem // May 7, 2009, 2:52pm

Stem
Total Posts: 199
Hello frootee,


I dont know how I missed this thread.


This ability is what I have been looking for.


Is there a beta version available, or pre-sale to get the beta?



- Stem

Post by frootee // May 7, 2009, 3:06pm

frootee
Total Posts: 2667
pic
not yet, but I was going to see if you were interested in trying to destroy

er I mean, test it. :)


1 thing to add: material index per triangle


I thought I added that earlier this week, or at least started to.

Now I can't find it (I think I removed it). No problem. I remember what to do now.


I added a toolbar (single icon really).

So far I can render with Vray and Lightworks

added a scale textbox for the model scale to the dialog (needs a little work)


*other things which may be added later as part of another package

Post by Stem // May 7, 2009, 3:43pm

Stem
Total Posts: 199
not yet, but I was going to see if you were interested in trying to destroy

er I mean, test it. :)


Yes, certainly.


Should I PM you my e-mail?



- Stem

Post by frootee // May 7, 2009, 4:56pm

frootee
Total Posts: 2667
pic
Sounds good.

Thanks!

Post by GraySho // May 8, 2009, 6:57am

GraySho
Total Posts: 695
pic
I´m not sure what you mean by meshes with holes. It would be as simple as deleting a face, or am I missing something? Maybe I can offer a troublesome mesh, have to check which of mine were causing LUUV to struggle.


Good tool addition btw, this one is really essential, as are layers ;)

Post by frootee // May 9, 2009, 2:14am

frootee
Total Posts: 2667
pic
thanks Graysho.

Yes, if you have a mesh which is troublesome with LUUV, could you post it?


thanks!


Froo
Awportals.com is a privately held community resource website dedicated to Active Worlds.
Copyright (c) Mark Randall 2006 - 2024. All Rights Reserved.
Awportals.com   ·   ProLibraries Live   ·   Twitter   ·   LinkedIn