PDA

View Full Version : Blender Exporting lwo sequence to Lightwave



alepooh
06-02-2008, 04:10 PM
HI

i'm trying to export lwo fluid sequence from Blender to Lightwave, I can't find a solution, because they say I have to write a script for that.

Can anyone help me please??

I don't know nothing about scripts.
:help:

jin choung
06-02-2008, 06:01 PM
look up .mdd exporter for blender. it exists.

for fluid, you might have to use a non-native lw format like exporting a bunch of .objs... find a tut on how to export liquid to ANY app and it will probably work for lw.

jin

MooseDog
06-02-2008, 06:12 PM
take a read through this thread:

Spinquad Blender Thread (http://www.spinquad.com/forums/showthread.php?t=10042)

lots of good discussion and tool development, which increase in version numbers as the thread progresses.

Glendalough
06-03-2008, 07:06 AM
The MDD exporter in Blender works great but unfortunately is no use in this situation.

You have to export as an obj sequence (wavefront) using a script (the lwo object sequence export script doesn't work or hasn't been finished properly), which is available at the above link that MooseDog has posted, some of these work better than others, I use a python one which is faultless and can post it here if you wish (tho' don't know who wrote it or who to give credit).

When you have this object sequence in the obj. format you can actually import it straight into Lightwave layout and see the animation though it stays in the default obj surface. The best way is to render out a quick image sequence with quick render settings as to scrub the timeline is slow and it MAY only update properly if you do an f9.

If you want to change obj. format to lwo import between 10 to 40 obj. objects at a time (multiple select) depending on your ram and the obj. resolution/mgs. These can be surfaced and changed to lwo en mass by means of the Surface Editor and Save/save all objects.

alepooh
06-03-2008, 08:53 AM
Thank you to everyone for your responses, I know I have to change a wavefront script and I have the code, the problem is I don't know witch part of all code I have to change.

Thanks :help:

evolross
06-10-2008, 10:33 PM
You have to export as an obj sequence (wavefront) using a script (the lwo object sequence export script doesn't work or hasn't been finished properly)
This Export Sequence to LWO Blender script works. You must have Python installed with Blender. See the SpinQuad thread though for a lot more info.

Glendalough
06-11-2008, 08:33 PM
This Export Sequence to LWO Blender script works. You must have Python installed with Blender. See the SpinQuad thread though for a lot more info.

This looks good! Will try as soon as possible.

-Is this yours? Any chance of a LW script to change the surfaces of an object sequence. Can't get the RealFlow one to work.

Blender-Lightwave Fluid Simulation threads:

http://www.newtek.com/forums/showthread.php?t=73375

http://www.newtek.com/forums/showthread.php?t=79014

evolross
06-12-2008, 12:18 PM
-Is this yours? Any chance of a LW script to change the surfaces of an object sequence. Can't get the RealFlow one to work.
It's not mine, I got it off the SpinQuad Blender Fluids to Lightwave Workflow thread.

Yeah I have been trying to work with fluids from Blender here recently and I went all through the SpinQuad thread. The longest poll in the tent is surfacing the object sequence once you're in Lightwave. There's an executable tool that does it, but it's very cumbersome. There was an LS script but it doesn't work in 9.3.1. Someone I think is trying to fix it.

ana027
06-12-2008, 12:45 PM
Hi all, here is a test with with blender fluids using this script. The script works ok with blender 2.44 and 2.45. I don't test yet with the new 2.46.

http://www.newtek.com/forums/showthread.php?t=82397&highlight=blender+fluid


The scene and the images are in the beta forum because I used for the test some new lights. :thumbsup:

jin choung
06-12-2008, 02:11 PM
The longest poll in the tent is surfacing the object sequence once you're in Lightwave. There's an executable tool that does it, but it's very cumbersome. There was an LS script but it doesn't work in 9.3.1. Someone I think is trying to fix it.

why not just use legacy projections? no uvs. just procedural 3d textures and/or gradients if any at all... then you can grab all of them in modeler and just apply the single texture to everything.

jin

LightFreeze
06-12-2008, 04:12 PM
There was an LS script but it doesn't work in 9.3.1. Someone I think is trying to fix it.

I fixed this, posted on the spinquad thread.

Glendalough
06-13-2008, 07:01 PM
I fixed this, posted on the spinquad thread.

The LW sequence exporter (posted here by evolross) does indeed seem to work fine, at least in one test.

The LS script am not having any luck with. Is this a duel purpose script? Have posted an image of the interface, presume you ignore the first part if you are just changing the surface. You write the updated surfaces by changing the first in sequence? "Play at exact rate...." This is not clear what one is meant to do. Any hints on how this works?

LightFreeze
06-14-2008, 11:48 AM
Replace Object - object in scene which is the sequence target
Sequence File - any file which is part of the sequence

you need the above to do the surfacing.
under general options switch off both `Play at Exact Rate` and `Fractional Frames`

having set the surface and saved your scene Replace Object

click the "write updated..." button, should run through scene importing and saving with new surface


please note I only edited the line in the script which was stopping it loading, its not my script

Glendalough
06-15-2008, 11:52 AM
Replace Object - object in scene which is the sequence target
Sequence File - any file which is part of the sequence

you need the above to do the surfacing.
under general options switch off both `Play at Exact Rate` and `Fractional Frames`

having set the surface and saved your scene Replace Object

click the "write updated..." button, should run through scene importing and saving with new surface


please note I only edited the line in the script which was stopping it loading, its not my script

Thanks for the tips! Getting somewhere, but still not working.

Have both 'Fractional Frames' and 'Play at Exact Rate' unchecked. Screenshot of setup, my lwos are named Btest0000 to Btest0010. Maybe sequence digits should be set to 4 rather than 3?

Seems as though it is about to work but instead I get the error message ".....invalid argument....." The animation then begins to play back continually looping but does not update.

Have set the surface on the first lwo in sequence, I gather that this is the way to set new surface??? (You write: "having set the surface and saved your scene Replace Object") Or do you change surface on first object via surface editor?

LightFreeze
06-15-2008, 12:34 PM
the `scene replace object` is your first object(normally).

I`m guessing looking at your pic it might be a path issue, are you using network paths, if so try it on a local path

LightFreeze
06-15-2008, 12:50 PM
had a look at the code and I think he`s doing something to get around a bug which has since been fixed, try this one

Glendalough
06-15-2008, 10:08 PM
had a look at the code and I think he`s doing something to get around a bug which has since been fixed, try this one

It's good you are doing all this work! But still can't get it to go. Am not on a network and am getting this same error now in both 9.3.1 and also in 9.2.

ramccombe
06-15-2008, 10:10 PM
This Export Sequence to LWO Blender script works. You must have Python installed with Blender. See the SpinQuad thread though for a lot more info.

Thanx evolross, I've been trying to do the Blender to LightWave thing for a while. I could never figure out how to edit the script from the SpinQuad thread. Your script works like a charm on my Mac in Blender. After exporting from Blender I opened up layout added the first object and set object replace to sequencer and all is good. I also found in regards to the surfacing issue, I just loaded all the mesh objects into layout by themselves and opening the surface editor, change to edit by scene and LightWave treats all the objects as one. Thanx again:thumbsup:

LightFreeze
06-16-2008, 12:47 AM
It's good you are doing all this work! But still can't get it to go. Am not on a network and am getting this same error now in both 9.3.1 and also in 9.2.

All I can tell you is that pops up if there is a problem with any of-

Replace Object - selection
Sequence File - file not found on disk
Sequence Digits - are not valid

It works for me on 9.3.1, are you on a Mac?

Glendalough
06-16-2008, 10:26 AM
All I can tell you is that pops up if there is a problem with any of-

Replace Object - selection
Sequence File - file not found on disk
Sequence Digits - are not valid

It works for me on 9.3.1, are you on a Mac?

Yes I'm on a Mac damn it! Will try it later on Windows via bootcamp.

Changed the digits, brought the number down to just 3 rather than 4 but still no luck. In the scene file all the objects come up okay. The 'Replace Object' is set immediately to the sequence. The sequence file I set to the same (first) object in the sequence.

Anyway thanks for the help, maybe someone else here would try it on a Mac to see if they get the same errors. The sequence could really be anything, any sequence of objects or the same duplicated just to test, to see if all (or any) surfaces change.

LightFreeze
06-16-2008, 11:25 AM
are you saying
when you scrub the timeline the sequence loads but you cannot save the surfaces
or
nothing happens once you close the dialogue

If its the second use this edit and show me the 2 new info boxes it kicks out

Glendalough
06-16-2008, 11:55 AM
are you saying
when you scrub the timeline the sequence loads but you cannot save the surfaces
or
nothing happens once you close the dialogue

If its the second use this edit and show me the 2 new info boxes it kicks out

The sequence is loaded already (by means of the built in LW object sequencer), maybe it shouldn't be?

If i scrub the timeline manually, that is one frame at a time, it will update, or move it to a time, it will update also, but in both cases there is a 2-3 second wait, can take up to 5-15 seconds with very big files. To play back the whole set of frames on the lower arrows (next to the preview button) has never worked and often ordinary animations don't play well either unless very simple or you have a super video card on the Mac. (This worked fairly well in LW8, but since then not too good at all).

So anyway, can scrub the timeline before and also after the dialogue and it updates fine, its just the surfaces don't change. Also after I press OK to the error the timeline starts to play quite fast looping ( the lower right hand arrow is depressed). Maybe the Mac is just not updating properly via this control and this could be the problem, know for sure this feature works much better in Windows.

Have to go out now but will check that new edit you have done in the next hour or two and show you the 2 info boxes it kicks out. Thanks for looking into this.

LightFreeze
06-16-2008, 12:08 PM
don`t preload the sequence, the script should handle everything. I suspect the script on its own is doing nothing due to some Mac path error

Glendalough
06-16-2008, 01:53 PM
don`t preload the sequence, the script should handle everything. I suspect the script on its own is doing nothing due to some Mac path error

Didn't preload the sequence as you say and the script seemed to load it up fine, so that part is working.

But still no luck with changing the surface. I have the first object in sequence set to the new surface (before loading) this is correct? (ie not necessary to assign new surface through the surface editor in layout or something)

Have enclosed image with the warnings/information as they occurred.

LightFreeze
06-16-2008, 02:39 PM
OK I think I`ve figured out whats wrong, I think its a program flow bug which is a lot of work to fix but can be worked around if you know about it.

Go back to the script on post 16

what you need to do is.

Open interface
Set all the options
DO NOT `write updated surfaces.....`
just OK the requester

Open interface again

now you can `write updated surfaces.....`

Glendalough
06-16-2008, 04:57 PM
OK I think I`ve figured out whats wrong, I think its a program flow bug which is a lot of work to fix but can be worked around if you know about it.

Go back to the script on post 16

what you need to do is.

Open interface
Set all the options
DO NOT `write updated surfaces.....`
just OK the requester

Open interface again

now you can `write updated surfaces.....`

VERY SMART!!!

You did it, it works, this is absolutely incredible....Good Show!

LightFreeze
06-17-2008, 12:25 AM
is it saving the new surface to all the sequence, there was a report on SQ that it skipped a couple but I didn`t find that.

and thanks to www.interialabs.de for writing the script in the first place, its very handy :thumbsup:

Glendalough
06-17-2008, 06:15 PM
is it saving the new surface to all the sequence, there was a report on SQ that it skipped a couple but I didn`t find that.

and thanks to www.interialabs.de for writing the script in the first place, its very handy :thumbsup:

Yes it seems to be working fine. Did a test object sequence of 90, each object just a bit over 1mb and there was no skipping. So unless there is some issue with high resolution objects it looks fine.

Again Great Work, Thanks!

alepooh
06-19-2008, 04:50 PM
Sorry I don't understand where I have to put this plugin in Blender, because it looks like LW plugin with .ls extension and not .py for python.

LightFreeze
06-20-2008, 10:05 AM
this is the script for playing/surfacing the sequence objects in layout, the Blender export script is earlier in the thread I thnik

subvoyant
06-22-2008, 09:52 PM
>>having set the surface and saved your scene Replace Object

>>click the "write updated..." button, should run through scene importing >>and saving with new surface

LightFreeze,

Thanks to your posts, I have the scripts working perfectly on my mac in both blender and lightwave 9.3 except I can not get LW to replace the surfaces as hoped. Would you mind going through the exact sequence of keystrokes and actions you use to replace the materials? It is both exhilarating and infuriating to be so close but still not there. I can open each frame in modeler and replace the material but it would so much easier to be able to take advantage of the script's full capabilities.

Thank you so much for your incredible help.

jason
subvoyant.com

LightFreeze
06-23-2008, 12:41 AM
Go back to the script on post 16

what you need to do is.

1 - Open interface
2 - Set all the options
3 - DO NOT `write updated surfaces.....`
4 - just OK the requester

5 - Open interface again

6 - now you can `write updated surfaces.....`

If you are doing all of this then it should be working. Is there a line in this you are unsure of?

subvoyant
06-23-2008, 06:02 AM
If you are doing all of this then it should be working. Is there a line in this you are unsure of?
I followed those instructions and the first object_0001 has had its surface revised and saved. when I execute, Layout plays through the animation but does not change the rest of the surfaces on the other objects. Does one need to modify the surface at a specific point in order for the script to run properly?

jason

subvoyant
06-23-2008, 07:11 AM
My issue seemed to be related to file name. I had a six digit long number on my file name that began with the version number of the blender file. I renmed my sequence with only a text name and three character number and the surface replace worked like a charm.

Thanks,
jason

alepooh
06-27-2008, 09:00 AM
But I don't have the script to export lwo objects from blender where I can't get it????

Help I don't understand.:bangwall:

subvoyant
06-27-2008, 07:21 PM
But I don't have the script to export lwo objects from blender where I can't get it????

Help I don't understand.:bangwall:

Go back to post number 6 and follow ink.

In blender, on the upper left switch layout to "Scripting". From the lower right in the script window, click on file and open the script you've just downloaded and you will see the script open up. Now from the file menu select "run python script." Now a file save dialog opens and you choose the directory into which it will place the object files. Select directory and choose export lightwave seq from top right.

Hope this helps.

jason
subvoyant.com

alepooh
08-06-2008, 12:02 PM
I thinks this plugin it's working, I need to make some testings first.

By the way, thank you so much for your answer. :thumbsup:

OnlineRender
11-11-2009, 03:50 PM
bump ( stuck )

daforum
07-04-2011, 04:21 AM
I used the "IL_scrubreplace" script recently to change the surfaces on an lwo sequence of liquids from Blender; and it works really well.

One thing i noticed though, when there's a double of an object (ie: the same object is repeated on the next frame) the script skips resurfacing that object and moves on to the next "changed" object.
Out of a sequence of 250 frames/ objects, it skipped 10. So I just had to load these 10 into Layout, add the new surface, and "save all objects"

It's a lot better than having to load the sequence into Layout in batches to resurface them; but i just thought i'd mention it :)