Search Home Members Contacts
About Us
Products
Downloads
Community
Support
Pages: [1]
  Print  
Author Topic: tvm to obj?  (Read 6785 times)
kTecH
Customers
Community Member
*****
Posts: 132


« on: January 06, 2010, 04:40:02 PM »

Hello Community!

please give me a hint... is there a posibilyty to convert tvm back into obj?
I'm not reallyt a rocket in coding.... so I hope comeone can help me

thank you in advanced

Sim
Logged
uncasid
Community Member
*
Posts: 109


« Reply #1 on: January 06, 2010, 06:58:53 PM »

I think this is possible, I assume you use c#:

object obj = (object)TVM;
Logged
Hypnotron
Customers
Community Member
*****
Posts: 1050


« Reply #2 on: January 06, 2010, 10:56:38 PM »

I think he means converting a tvm to the wavefront .obj model format.

Yes this is quite possible.  I've written my own .obj importer and i havent gotten around to writing an exporter but i can say that .obj format is one of the easiest model formats out there.  I had the geometry importer and texture and material loading in a couple of days.  You'll find that .obj format spec shows some blocks that are hardly ever used (eg. nurbs)so it'll be up to you to decide just how much of the spec you want to support.   
Logged
kTecH
Customers
Community Member
*****
Posts: 132


« Reply #3 on: January 14, 2010, 07:49:42 AM »

Yhm, I see...
If I could code better I surly would write something like this but... I can't Sad
So even Sylvain has no software to convert tvm's ??
Damn... I'm so stupid loosing my whole "meta" files -.-
Logged
SylvainTV
Administrator
Community Member
*****
Posts: 4971


WWW
« Reply #4 on: January 15, 2010, 06:40:59 AM »

No we don't have software to convert the file back.
However you can get everything in the TVMesh, use GetGeometry / GetTexture / GetMaterial and write it back to any format yourself
Logged

Regards

Sylvain Dupont
TrueVision3D Developer
sylvain@truevision3d.com

TV3D IRC at http://chat.truevision3d.com or on server irc.truevision3d.com #Truevision3D. Come talk with us !
Lenn
Customers
Community Member
*****
Posts: 876

+/-


« Reply #5 on: January 15, 2010, 10:28:16 AM »

Hmm maybe you can hack it out using

http://www.3ds.com/products/3dvia/3d-xml/3dvia-printscreen/

and then converting from the 3d xml format to max using:

http://www.4shared.com/dir/5807782/1c394251/KoichiSenada.html

or you can also do 3dxml -> virtools -> obj
« Last Edit: January 15, 2010, 10:32:51 AM by Lenn » Logged

TV3D 6.5 Community Docs - Read, use and please contribute!
Mithrandir
Community Member
*
Posts: 326


« Reply #6 on: January 15, 2010, 12:52:07 PM »

You can get the D3DMesh using TVInternalObjects class and then use its save function:

Code:
Microsoft.DirectX.Direct3D.Mesh myD3DMesh = new Microsoft.DirectX.Direct3D.Mesh(TVIinternal.GetD3DMesh(my_mesh_id));

myD3DMesh.Save(...)

I am not sure how to use D3DXMesh.Save though but you can google something for sure.

[EDIT]
Sorry I meant this for different topic but you can use it as well. When you get the model in DirectX format you can import it into 3d studio.
« Last Edit: January 15, 2010, 12:55:00 PM by Mithrandir » Logged
bloomk
Customers
Community Member
*****
Posts: 81


« Reply #7 on: January 15, 2010, 02:48:25 PM »

k, i am writing a converter (and i can shae it when i am done).

One problem.. the myD3DMesh.Save requires several things that we don't have..

here is the function overloads available..

public void Save(string, GraphicsStream, ExtendedMaterial[], EffectInstance[], XFileFormat); 
public void Save(string, GraphicsStream, ExtendedMaterial[], XFileFormat); 
public void Save(string, int[], ExtendedMaterial[], EffectInstance[], XFileFormat); 
public void Save(string, int[], ExtendedMaterial[], XFileFormat); 


-----


as you can see, we need ExtendedMaterial and graphic stream.. whatever those are.. sorry, never worked with managed directx..
Logged

Street Challenge LLC
Multiplayer Drag Racing
http://www.streetchallenge.info/
Mithrandir
Community Member
*
Posts: 326


« Reply #8 on: January 15, 2010, 05:32:38 PM »

Well you can generate adjacency array using Mesh.GenerateAdjacency and ExtendedMaterial array may theoretically be an empty array (just my guess).

I was just trying to create the actual D3DMesh object (Microsoft.DirectX.Direct3D.Mesh) to test it out but I'm getting AccessViolationException.
Logged
bloomk
Customers
Community Member
*****
Posts: 81


« Reply #9 on: November 16, 2010, 07:12:42 PM »

anyone successful?
Logged

Street Challenge LLC
Multiplayer Drag Racing
http://www.streetchallenge.info/
Pages: [1]
  Print  
 
Jump to:  

Powered by SMF 1.1.3 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks