Light Flow problem... what did I do wrong?

(bmax) #1

Ok, I use Blender Creator 2.23, i want to export to LightFlow using i-dont-remember-who’s export script, and the console spits out the following message:

Traceback (most recent call last):
File “”, line 8, in ?
ImportError: No module named os

Can anybody tell me what i did wrong, maybe i installed python incorrectly. I just installed it into a directory, was i supposed to copy some dll’s too?

Please Help!

(S68) #2


1 - eeshlo !!!

2 - you must have the PYTHONPATH environment variable correctly set.



(bmax) #3

I set the pythonpath in autoexec.bat to “C:GrafixPython 2.2”, thats where i installed python into. But the same error still occurs…


(beatabix) #4

1: remove spaces from your python path. not always necessary, but better safe than sorry.

2: if you are running winXP then the autoexec.bat serves no real purpose in this situation. you need to go into the control panel and set it from there. i forget how.

3: blender uses python 2.0.1, not 2.2


(bmax) #5

I did all that you guys told me, and the error has not changed, always the same thing.
Is there any cure?

(Jamesk) #6

All I remember is that I couldn’t get the LF-thingy to work until I uninstalled my Python 2 and replaced it entirely with Python 1.5 instead. You could try that :slight_smile:

(Condorcet) #7

Lightflow only works with Python 1.5**. It hasn’t been updated in a long time.


(bmax) #8

sigh… guess what… yea, you guessed it : it does not work!!

why the hell doesn’t it work?!! do i have to ‘link’ blender to python too, somehow?

oh well, hope someone helps :wink:


PS:Couldn’t someone just compile a dll out of the exporter? just like that DOF plug-in…

(eeshlo) #9

The export script and Blender use python 2.0 (an maybe higher versions too, I’m not sure), but the current Lightflow version needs python 1.5
So you need both to make it work. Depending on which version you installed first, you need to set the correct path in your autoexec.bat or something equivalent.
I had installed Python2.0 first and after that python1.5, python2.0 is in my main C: directory, and python1.5 in the Program files directory, but that does not really matter, you can place it anywhere you want of course.
The main thing is that you need to set the PYTHONPATH which includes all the relevant directories python needs to know about, not just the main directory, mine looks like this:


Read the Lightflow README file in the main directory on how to install it properly, you need to set a number of other environment variables and copy the Lightflow dlls to the required directories.

And about compiling a dll, the script can’t be compiled this way, but as Lightlfow also provides a C++ interface, someone could try to create a dll that directly interfaces with Lightflow, this would bypass Python completely and so a render-from-blender would again be possible…
But it is better to wait for a new version if this will ever happen, there have been some signs that there will be a new version eventually…

<font size=-1>[ This Message was edited by: eeshlo on 2002-03-26 07:07 ]</font>

(bmax) #10

YEEEEEEEEES!!! :slight_smile: :slight_smile: :slight_smile: :slight_smile:


…If anybody could help…please? :’(


(eeshlo) #11

You use Lightflow indirectly through python, meaning, if you double-click any of the example .py files in the LightflowPMExamples directory, it should render a .tga file and place it in the same directory.
Of course you can do the same with the .py files produced by the export script.

(bmax) #12

ok… it doesnt do what i want it to do, ie: it doesnt do anything. do i have to set the environment variable to both python versions?

i think i do…:smiley:

if i have to do smthng else, please tell me!

Tom the idiot (that’s what it comes down to doesnt it?)

(Condorcet) #13
  1. You can’t click on one of the lightflow exe files–they must be invoked through a dos command, or by running a lightflow py file.

  2. simply clicking on the lightflow py file probably won’t work because the exported py file doesn’t know how to find Python1.5. It automatically finds Python 2.0 in your autoexec.bat file, which won’t work with lightflow.

So you need to find a way to tell the lightflow file you exported to find Python1.5 (which you’ve installed, right?). You can add a few lines of python at the beginning of the script, but I’m afraid I’ve now forgotten the syntax. Any programmers out there recall?

Back when I was playing around with lightflow I invoked in dos a short .bat file that pointed to the correct python and lightflow path. I’ll see if I can remember how I set this up, but meanwhile perhaps a more experienced computer-wiz can explain what to do more clearly. Eeshlo? Iceman? Is he around here?


(bmax) #14

tadaa, tadaa, tadatadatadaAaAaAaAaaaa!
[that was a trumpet ;)]

Does anybody know how to invoke lightflow with the correct python version? Any Python freaks and buffs out there… EESHLO?!! ICEMAN?!! , where the f…iddle-sticking hell are you?!

(in other words : “ya better help, or else…!” :smiley: )


(bmax) #15


tom the dumbass [sigh…]

(eeshlo) #16

What happens when you try to execute one of the lightflow example files? Do you briefly see a dosbox appear?

You have installed Python1.5?
You did read the lightflow readme file?
You have added the necessary environment variables to your autoexec.bat?, something like this (I have Lighflow in my ‘Program files’ directory):


And you also copied the lightflowPM.dll to the python1.5 DLLs directory and the Lightflow.dll to your WindowsSystem directory?

(Condorcet) #17

Wouldn’t that only work if he had Python20 AND Python15 in the same directory?

(bmax) #18

i have exactly that done… the thing that happens is when i DOUBLECLICK on a lighflow py file is in exactly what you said, a dosbox appears for a fraction of a second, and then disappeares again, leaving no render.

On the other hand, i found a different method, marcel_goené emailed it to me. i just go to the python dir, and then type something like this:


That’s what mine looks like. This actually iniciates lightflow, but there is an error in about every line. The first error that appears is the radiosity file is invalid. :o

'radiosity-file', ball_on_wood.rad, 'save',

When i comment it out, lightwave cannot open the ball.mesh although it is in the same directory as the python script.

I really do not know what is wrong, i emailed marcel_goené, but he hasnt responded yet.

Tom :smiley:

(infinder) #19

You can download a small program named LFProgress(sorry I can’t remember the URL find it with google search engine). This prog helps for seeing the rendering progress. It doesn’t work with eeshlo’s export script files unless you delete manualy at the end of the exporting .py file in the line
saver = s.newImager(‘tga-saver’, [ ‘file’, ‘lf_test_0059.tga’]) everything follows the tga file except from the brackets of course.
This is a only a helping utility but in your case it wan’t work either. Open a DOS window and give python to see if the python exe comes up properly. Otherwise there is problem with the path. If everything is ok and you have UVmapped your model make sure your textures are in tga format and put them in the same folder your .py file exist. Edit manualy the py file and change the textures path leaving only the name of the texture: for example c:texturesball.tga becomes ball.tga.
That’s it, render your scene now. I have problems with uv mapping textures don’t export right and it took me one day to figure out what I’ve already said. I believe eeshlo’s script is great but it needs some work because users don’t have the patience to find out how it works(some instructions maybe?). And definitely it needs a gui and simple image mapping not only UV. I’m not complaining I just have to say this.

<font size=-1>[ This Message was edited by: infinder on 2002-03-28 00:31 ]</font>

(eeshlo) #20

To 3DGamer:
You should probably be able to start python1.5 from the ‘Start’ menu, select the one that says ‘Python (command line)’
Then type this:

&gt;&gt;&gt; execfile("D:\GFX\LIGHTF~1\Pm\Examples\")

I am not sure if I got the path right, so change it to wherever the file is located.
If there are any errors you will be able to see them without the dosbox disappearing again.

To Infinder:
I understand that a lot of people might find the script almost impossible to use. It was all a relatively quick hack, I can think of lots of things (and ways of how) to improve it. But I’m not sure if it is really worth it. There are things that still cannot be done, like regular image mapping, Lightflow can do spherical/planar/cylindrical mapping, but Blender’s python API does not (yet?) have access to the mapping methods used for images.
Also, I think it is better to wait for a new Lightflow version.
It might be possible to bypass Python entirely with Lightflow’s C++ interface, but that is a lot of work of course, although that would have the advantage of rendering directly from Blender.
As for your problems with UV-textures, if the path is correct in Blender then it should work with lightflow.
As for other image formats, I can of course create a extension module to do conversion of textures so other image formats can be used as well, similar to Blenderman, but I don’t really want to compete with that…
But I am willing improve things when I find the time, anyone who has specific suggestions, your welcome to mail them to me…