Advertisement

linux and blender and nehe

Started by November 14, 2003 10:55 AM
9 comments, last by iplayfast 21 years, 3 months ago
I''m a linux and blender user, does anyone know how to incorporate models and scenes made from blender into opengl stuff from the Nehe tutorials?
If this were any more fun I''d die!
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.
Advertisement
I couldn''t find any tutorials on how to write an exporter for Blender, does anyone have any links on an up to date one that includes things like exporting bones?
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
Excellent, This gives me the start I was looking for.

Blender Rocks!
If this were any more fun I''d die!
"Blender Rocks! "

As i said

Mfg :: Zweistein :: whosme.de
Advertisement
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...
[size="2"]I like the Walrus best.
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
I got the blender210.py module missing as well. I looked all through my system it''s nowhere to be found. I gooooogled it, and I only found other scripts that needed it. Where to find?
If this were any more fun I''d die!
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

This topic is closed to new replies.

Advertisement