Raydium 3D Game Engine

Official forum for everything about Raydium, ManiaDrive, MeMak, ...
It is currently Thu Mar 28, 2024 3:13 pm

All times are UTC




Post new topic Reply to topic  [ 17 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Blender .tri export
PostPosted: Tue Nov 04, 2008 10:08 pm 
Offline

Joined: Sun Oct 09, 2005 10:46 pm
Posts: 759
Hello,

Here is the first try to have a more convenient blender export script. :?

http://ftp.cqfd-corp.org/triEXP-B2-36.v3.py

Download and install in blender .script directory.

This export script have few enhancement (i hope):
  • Each object is saved in his .tri file using the blender mesh name.
  • Texture are automaticaly converted to tga, power of 2 even if they are originaly jpeg (xfennec :P )
  • Texture are saved in tga format in the same directory as .tri file
  • Packed texture are saved in .tga format to disk.

Normaly this script will export everything in the right raydium way of life.
In some few new versions it will be possible to use a .blend file as container for graphic data.

tga conversion can be long, please patient.

Please make some tests and don't hesitate to report bugs, or problem.

File selection is not usefull, just define working directory.

Todo:
automatic convert from quads to triangle
correct use of smooth/solid flag
linked duplicate detection.

Have a nice day
Ouille.


Top
 Profile  
 
 Post subject: Re: Blender .tri export
PostPosted: Wed Nov 05, 2008 9:28 pm 
Offline

Joined: Sun Oct 09, 2005 10:46 pm
Posts: 759
Hello,

Here is a new version of the blender export script:

http://ftp.cqfd-corp.org/triEXP-B2-36.v4.py

Resolved some path problems, AND ...
Mesh are automaticaly triangulated.
Linked meshes are correctly handled.

Have a nice day.

Ouille.


Top
 Profile  
 
 Post subject: Re: Blender .tri export
PostPosted: Thu Nov 06, 2008 9:57 pm 
Offline

Joined: Sun Oct 09, 2005 10:46 pm
Posts: 759
Hello,

New version of the script.

No more problem with opengl lighting as in this thread

Blender Smooth or Solid option:

Image

Is now correctly handled (i hope so :? )

Here is raydium result:

Image

Waiting for feedback, or wishes before commit.

Have a nice day.
Ouille


Top
 Profile  
 
 Post subject: Re: Blender .tri export
PostPosted: Sat Nov 22, 2008 8:27 am 
Offline

Joined: Sat Nov 22, 2008 6:33 am
Posts: 68
Its a nice one.
The fourth script make my app hang when try to draw it. Version 3 is fine.


Top
 Profile  
 
 Post subject: Re: Blender .tri export
PostPosted: Sat Nov 22, 2008 3:29 pm 
Offline

Joined: Sun Oct 09, 2005 10:46 pm
Posts: 759
Hello,

Quote:
The fourth script make my app hang when try to draw it. Version 3 is fine.


What version on Blender dir you use, Blender 2.48 is porbably mandatory.

What do you mean by draw it ?

Can you post blend files used ?

Have a nice day.
Ouille


Top
 Profile  
 
 Post subject: Re: Blender .tri export
PostPosted: Tue Nov 25, 2008 1:29 am 
Offline

Joined: Sat Nov 22, 2008 6:33 am
Posts: 68
ouille wrote:
Hello,

Quote:
The fourth script make my app hang when try to draw it. Version 3 is fine.


What version on Blender dir you use, Blender 2.48 is porbably mandatory.

What do you mean by draw it ?

Can you post blend files used ?

Have a nice day.
Ouille


I used version 2.47.
This script is working http://ftp.cqfd-corp.org/triEXP-B2-36.v3.py but not the other.
What I mean by draw it is when I used the raydium_object_draw_name function, when I export it using the blender tri exporter version 3 my app not hang, but when I drawed it using the newer version my app hang. I dont know what happen.

Blend files? What is that?


Top
 Profile  
 
 Post subject: Re: Blender .tri export
PostPosted: Tue Nov 25, 2008 4:42 am 
Offline

Joined: Sat Nov 22, 2008 6:33 am
Posts: 68
Using blender 2.48a and everything works fine. Sorry if my post above make you cannot sleep :mrgreen: (But that is a risk for beeing smart). Thanks for your hardwork.


Top
 Profile  
 
 Post subject: Re: Blender .tri export
PostPosted: Tue Nov 25, 2008 11:33 am 
Offline

Joined: Sun Oct 09, 2005 10:46 pm
Posts: 759
Hello,

Script last version is now on the svn.

Quote:
New export script. With configuration popup. Can create file name based on mesh name. Export each object pos/rot. Automaticaly convert quad to tri. Automaticaly save texture in tga power of two format. File missing file even if file is packaged in blender file. List first in export menu.


Have a nice day.
Ouille


Top
 Profile  
 
 Post subject: Re: Blender .tri export
PostPosted: Thu Jan 01, 2009 10:14 pm 
Offline
User avatar

Joined: Sun Mar 16, 2003 2:53 am
Posts: 2591
Location: gnniiiii (Scrat)
Nice job ouille, for all this work around import/export scripts.

I had to do a lot of swaps between Blender and Raydium in the last few weeks, and it's way more pleasant to use, now. No more questions about TRI version, multi-layers, vertex-colors, ... like we used to with very firsts versions of these scripts.


Top
 Profile  
 
 Post subject: Re: Blender .tri export
PostPosted: Sun Jan 04, 2009 5:44 pm 
Offline

Joined: Sun Oct 09, 2005 10:46 pm
Posts: 759
Yes :D

No problem with indent :wink:

You forgot automatic triangulation !

Have a nice day.
Ouille


Top
 Profile  
 
 Post subject: Re: Blender .tri export
PostPosted: Sat Jul 04, 2009 1:29 pm 
Offline

Joined: Wed May 06, 2009 2:06 pm
Posts: 30
I'm trying to modify some track block with blender 2.48a.

I have import script triIMP-B2-31.py, which starts
Code:
Name: 'Raydium Import (.tri format)'
blender: 2.31


I got wania1.tri imported to blender, but when I try to export it:

with triEXP-B2-36.v5.py I got file which have only:
3
Mesh.003 0.000000,0.000000,0.000000,-0.000000,0.000000,-0.000000

with triEXP-B2-36.v3.py
I got file named Mesh.003.tri and it worked.

edit: added code block. I use blender 2.48a but import script is made for 2.31 and maybe export script is for 2.36.


Last edited by aapo on Sat Jul 04, 2009 9:22 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: Blender .tri export
PostPosted: Sat Jul 04, 2009 7:01 pm 
Offline

Joined: Sun Oct 09, 2005 10:46 pm
Posts: 759
Hello,

Can you be more precise about blender version 2.48a ou 2.31 ?

Anyway i'll have a look at it as soon as possible but it will be in quite long time sorry .

Have a nice day.
Ouille.


Top
 Profile  
 
 Post subject: Re: Blender .tri export
PostPosted: Sun Jul 05, 2009 3:35 pm 
Offline
User avatar

Joined: Sun Mar 16, 2003 2:53 am
Posts: 2591
Location: gnniiiii (Scrat)
Just tested with a simple mesh (clio_sp.tri), imported and exported perfectly with Blender 2.48a (Linux, shipped by Mandriva), using triIMP-B2-45.py and triEXP-full.py.

But ! There's a "but" :)

I had a trouble while trying to export a multi-layer mesh (cinemal.tri, dunno if it's on the R3S but the trouble should be the same with cocorobix.tri, for instance). It throws a Python error, about an invalid attribute. The valid_texture function seems to wait for some sort of "image object type". The multi-layer part of triEXP-full.py seems to call this function, providing not an object, but only a string with texture filename. I may have read the code too quickly, so I let you have a look at all this, ouille :)
Code:
[...]
def valid_texture(image,texture_list):
   file_name=basename(image.filename)
[...]
t=Blender.sys.basename(face.image.filename)
valid_texture(t,texture_list)
[...]


Top
 Profile  
 
 Post subject: Re: Blender .tri export
PostPosted: Sat Jul 11, 2009 10:58 am 
Offline

Joined: Sun Oct 09, 2005 10:46 pm
Posts: 759
Hello,

Can you package faulty multi layer mesh.

I 've made lots of test on cocorobix.tri to validate scritps.

I'll have a look ....

Have a nice day.
Ouille


Top
 Profile  
 
 Post subject: Re: Blender .tri export
PostPosted: Sun Jul 12, 2009 3:38 am 
Offline
User avatar

Joined: Sun Mar 16, 2003 2:53 am
Posts: 2591
Location: gnniiiii (Scrat)
You prefer an archive ? The mesh+textures are available on R3S. Just load "cinemal.tri" in any application (/load cinemal.tri in raydium_modler will work easily, too)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 17 posts ]  Go to page 1, 2  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 7 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group