Archived

This topic is now archived and is closed to further replies.

iplayfast

linux and blender and nehe

Recommended Posts

Export your blender data using Python scripts and use those exported files into your application.

You can either use exisiting exporters and you will have to learn how to integrate those file formats into your program.
Or you can write your own exporters in a home-made file format and use it easily in your application, but you need to learn a bit of Python to be able to write a decent exporter.
Personally I recommend the latter, but it''s just a matter of preference.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Hi you,

Blender rules!!!

ähm, what i wanted to say :
http://www.whosme.de/GL_exporter1.0.py <- That is a OpenGL exporter (for Blender 2.23). It s not written by me. He exports one Blender Mesh and his normals. And if you UV Texture your model in Blender 2.28 with a JPG and THEN open that file in Blender 2.23 he exports you uv Coordinates, too.

So you have everything you want, instead of animations for sure.

He will export you something like that:

glBegin(GL_QUAD);
glNormal3f(0,1,0);
glTexCoord2f(0.232, 0.34342); glVertex3f(0.31223, 0.312312, 0.13543);
.
.
.
glEnd();

With that Script you can see the functions Blender and Python uses. SO you can rewrite it to whatever you want.

MFG

Share this post


Link to post
Share on other sites
I remember I couldn''t put that script to work on windows, it said there is no blender210 module or something. I''m quite clueless about python...

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
You get that Message, when you don t have set you Python path correctly. You have to put the Python paths into you Systemvariables.

Of course, not just the C:\Python thing, you need nearly every every path: C:\Python\libs; C:\Python\dlls etc etc..

Then the script is working. btw you need that path for every Python Script

MFG

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
You need Blender 2.23 to export:

http://download.blender.pl/

There you can download it. You need 2.23 just for exporting. You can work with any other Blender version.

Second:

As i said, you have to install Python (Python 2.1) Then your System needs variables. You need the following (under windows, i think the system variables are in linux automatically):

C:\PYTHON21;C:\PYTHON21\DLLS;C:\PYTHON21\LIB;C:\PYTHON21\LIB\LIB-TK

they have to be in:

PYTHONPATH

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
btw: Here is a better description, how to set your Python path:

http://www.elysiun.com/forum/viewtopic.php?t=7723&start=0

Share this post


Link to post
Share on other sites