How to render using Lightflow

I know the subject here makes you guys wince, but please hear me out.

I have Python 1.5 and Python 2.2 installed.

I have my PYTHONPATH like this: C:\PYTHON22;C:\PYTHON22\DLLS;C:\PYTHON22\LIB;C:\PYTHON22\LIB\LIB-TK

I also have this as my path: C:\WINDOWS;C:\WINDOWS\system32\COMMAND;C:\Lightflow

I also have XnView installed as per someone here.

I also have TD installed as per Python 1.5

>>I can export my stuff easily using LFexport.py<<

Question is, Now what?

The person that said to use XnView said to go to my Room_0001.py and double click it. I do that(do it to any .py in fact), and all I see is a quick command prompt that flashes and goes away before I can read it.

How do I get lightflow to render it? If you say “Use a command in Python”, please tell me what command to use. I really have no clue. I really hate posting Q’s here, but I’ve been at it all day today and am at wits end. Every tute and every post I’ve read assumes I know how to do this and goes deeper. I’ve searched this entire forum.

Thanks in advance.

P.s.
This is WinXP and Blender 2.23, all .dll’s are in the right place I think because the LFexport works. Also Python’s seem to work, the GUI’s come up etc.

P.s.s
Do I need BRMT ? In other posts I noticed it in their PATH, they got scooped up by Nvidia though and I can’t d/l it.

Small update. Using Blenderman, I can export to 3Delight and render stuff. It’s nice, but no matter what I do there is no color, even though I spent hours making UV textures :(. I messed with the settings, but no textures, not even the blender default ones. Even made sure I used all .vga’s in my UV work.

I can also render the .rib files with 3Delight using the command prompt, typing Renderdl Room_0001.rib. But then it’s only a small render and still no color.

With Eeshlo’s Lightflow script, I get an error message in the command saying “Warning!! there’s no texture’s, colors or nothing on mesh.001!”, words to that effect.

Sigh.

That aside, Python still refuses to use Lightflow. The command window pops up and goes away in a blink.

If anyone knows about even one of these problems, it would make my day, and once again sorry to ask if they’re dumb problems. Sucks when you’re too poor for Maya and too stupid for Blender :slight_smile:

I might be wrong, but it sounds like you are using the really old script from my stormpages site? I didn’t update the site with the new script, I am working on a makeover of the site at the moment. See the ‘New LFexport’ thread below for the new version. You don’t need python1.5 anymore. In case you did use the new script (but it really sounds you like didn’t) doesn’t the install script produce any warnings/errors?
And I’m not sure why you think you need BMRT for this?
Anyway, that warning you mention (no uv-textures) is just that, a warning, shouldn’t prevent you from running Lightflow.
If you want to see what the error message is, start python from the commandline, I don’t have XP, but there should hopefully be in the python menu (from start->programs->python) a menu option “Python (command line)”. Then type:


execfile(filename)

where ‘filename’ is of course the full path to one of your export .py files, don’t forget to use either ONE forward slash or TWO backslashes, so either something like:


execfile('c:/LFexport/myscene/myscene_0001.py')

or:


execfile('c:\\LFexport\\myscene\\myscene_0001.py')

K… this is amazing :slight_smile:

So far so good, you made my weekend. Everything works like a dream, cept one small thing.

When I use the Blendfile Import option, lightlow fails and I get the message:

Traceback (most recent call last):
File “C:blahblah.py”, line 84, in ?
LFCOL2 = LFTEX0
NameError: name ‘LFTEX0’ is not defined

Can post the .py if you want. Going to try exporting to something else before rendering next.

And thanks a ton for your response. Nice to get one from the Man himself :slight_smile:

Edit: It still won’t render any image or UV textures I use at all, from .wrl or .blend format or even using 3delight. Just ignores anything but the basic color stuff. The blender renderer does them fine. 3Delight says to use .tif format, but Blender doesn’t like .tif… What can I do?

Depending on what the cause was the last script update might solve this.

Edit: It still won’t render any image or UV textures I use at all, from .wrl or .blend format or even using 3delight. Just ignores anything but the basic color stuff. The blender renderer does them fine. 3Delight says to use .tif format, but Blender doesn’t like .tif… What can I do?

I suppose you mean BlenderMan, there is a .dll in the zipfile (totiff.dll) which you must copy to your blender directory, as is mentioned in the text, this converts textures to tiff format.

Getting somewhere! Here’s a pic from using your script. The only textures I can get to work are UV ones. Weird I know, but I’m working on it. Notice here though that the desk material was really dark, and this is when its bumped up with a .300 emit.

http://home.dejazzd.com/tombern/Personal/Jeffs/Room_0001.jpg

Both 3Delight and BMRT show up like this:

http://home.dejazzd.com/tombern/Personal/Jeffs/BMRT1.jpg

This sucks royally. I think it has to do with where I put my tex files etc. The one Renderman script makes new .tiff 's and stuff, but doesn’t use them apparently. I looked at the rib files and there’s nothing mentioning the tiff files there. My guess is that it looks in a default place for textures and I don’t know where that place is or how to tell it to go there.

Your script has a nifty little button to push and tell it where to look :smiley:

Oh, here’s the .py for the first pic, n’case you wanna see it: http://home.dejazzd.com/tombern/Personal/Jeffs/Room_0001.py

I think I’m on the right track now at least. I know you’re a busy man so I’ll just get smarter and figure the rest of this stuff out.

Thanks again for your help and your work. If you’re ever in America I’ll hook you up no problem :slight_smile:

I suppose you are using BlenderMan beta7.3. BlenderMan doesn’t export texture related material information. To successfuly export UV textures you need to press TexFace in the Edit window with the Object selected. Then in the BlenderMan Object Editor turn ExportUV on for the needed objects. If you want shadows you must also turn on shadow for the lights using the Object Editor. The textures must not be packed or in a folder that’s a subfolder of Blender (i.e. there must be an absolute path to them). Also be sure to have the shaders that come with BlenderMan compiled and placed in a folder where the renderer looks for shaders.

Goran

There is something strange about the .py script, I suppose you have edited something?

This:

c:/LFexport/textures/BarnW.tga

should be something like this (created by the script):

c:/LFexport/Room/TGA_Textures/BarnW.tga

The script creates a texture directory in the scene directory. Also a WORLD_LIGHT is not much use with a closed room, since the light is outside of it and besides that it only works with radiosity.

I suppose you are using BlenderMan beta7.3. BlenderMan doesn’t export texture related material information. To successfuly export UV textures you need to press TexFace in the Edit window with the Object selected. Then in the BlenderMan Object Editor turn ExportUV on for the needed objects. If you want shadows you must also turn on shadow for the lights using the Object Editor. The textures must not be packed or in a folder that’s a subfolder of Blender (i.e. there must be an absolute path to them). Also be sure to have the shaders that come with BlenderMan compiled and placed in a folder where the renderer looks for shaders.

Thanks much Goran. Be nice if there was even a hint about this in the docs.

There is something strange about the .py script, I suppose you have edited something?

This:

c:/LFexport/textures/BarnW.tga

should be something like this (created by the script):

c:/LFexport/Room/TGA_Textures/BarnW.tga

I did see your script calling in that TGA_Texture folder awhile ago. I was messing around a bit, but Just re-did the render and it now always points to my default Tex directory. I blew out all my temp files and made a new path to my own lightflowtemp folder and it still does it. The .py isn’t edited and your TGA_Texture folder is empty and there’s redone .tif files along side the one’s in the default Texture folder, hehe.

Just did a totally new blendfile. Just a basic Sphere with a wood image texture and your script did it fine! I got wise and used the export blendfile option. :wink: It STILL doesn’t use your TGA_textures folder though. Where does it tell to go to that folder? Why am I forcing it to go to my default tex folder? hmmm.

However I went back to my room.blend and got the LFTEX0 not defined again using the export blendfile. Just gonna wait for new script on that one, but maybe I missed some faces, had to redo them when I moved my texutre file and there might be some still pointing to the old directory. Will work on it tonight.

Forget about it, I forgot myself that when a texture is already a TGA image, it will use the original directory where it came from, only when the image is another type like JPEG, PNG, or IRIX format will it convert the textures to TGA and store it in the TGA_Textures directory.

However I went back to my room.blend and got the LFTEX0 not defined again using the export blendfile. Just gonna wait for new script on that one, but maybe I missed some faces, had to redo them when I moved my texutre file and there might be some still pointing to the old directory. Will work on it tonight.

That error still occured with the last updated script I released yesterday? If so, could you possibly send me the blendfile? You don’t have to do that if you don’t want to, but that would be the only way for me to find out what is happening…

What docs ;)?

I’ll try to make some kind of introductory documentation (or a small FAQ at least) for the next BlenderMan update which is just around the corner (another bugfix release). If anyone has problems with spotlights, there’s one big bug concerning their placement (insted on x,y,z coordinates spots are placed on 2x, 2y, 2z). Delete the Translate line in the RIB (or in the script if you are o.k. with Python) and the scene should render fine.

Goran

Just got your new script now Eeshlo, gonna play awhile with it and update ya.

Goran/Eeshlo - What if a made a total Noobie Tute for this stuff? I know I’m not an authority by a long shot, but I’m really good at explaining how-to once I know, and I’m great at explaining in extreme detail step by step.

Ok ok, stop laughing, I’m serious! :x

Was po’ed at my room blend, so I started it from scratch. The LFTex0 problem went away, my guess is that there was some residual stuff in that blend as it was my experimental blend.(radiosity experiments etc). This is my new Blend: http://home.dejazzd.com/tombern/Personal/Jeffs/NRoom.blend

Here’s first one, this is using the Export Blendfile option:

http://home.dejazzd.com/tombern/Personal/Jeffs/NRoom_0001.jpg

As you can see, it didn’t do the wall texture right, and ignored the UV tex of my desk. The wall I did with the Stucci thing in Blender, not a big whoop. Here’s the .py from that: http://home.dejazzd.com/tombern/Personal/Jeffs/NRoom_0001.py

This is the second one, not using the Export Blendfile option: http://home.dejazzd.com/tombern/Personal/Jeffs/Droom.py

And this is what it looks like:

http://home.dejazzd.com/tombern/Personal/Jeffs/Droom.jpg

So thing is, the UV doesn’t work with export blend, and image textures don’t work without it. This is still no big whoop, I can make them all UV easily enough - Just I’m sure you want to see this stuff :slight_smile:

All this aside, this is pretty fun, hehe. I like that now I can change a little world by merely moving around and changing text. It’s awesome to get a picture from words and numbers :smiley: Good times.

EDIT: But WHY not change the text and get what I want then???

This is what I get when I copy and paste the Desk texture from one to the other .py!!

MUAHHAAAAHAHAAA

http://home.dejazzd.com/tombern/Personal/Jeffs/Wiseguy.jpg

Now to make it look good… rubs hands greedily

I don’t think anyone should ask for a permission to write a tutorial. Or in other words: Go for it man! :slight_smile:

Goran

I forgot about ‘TexFace’, you will have to do it by enabling the uv-button instead (the one to the left of ‘Object’, above ‘Glob’), that does work.
Using ‘TexFace’ and ‘Orco’ together will produce a different result than what you created in the uv-editor, that is what the uv-button is for.

And as far as the stucci texture is concerned, that is not really a surprise, Lightflow is not a Blender emulator, like I show in the docs, procedural textures can look completely different, nothing I can do about that.
I just chose the Lightflow textures that seemed to be the most similar, although there might be better choices. This is where Blenderman could potentially be a lot better, since the exact algorithms from the sourcecode could be used to create a renderman shader.

And about that tutorial, of course, go right ahead!