export complete levels from blender

Posted By: ventilator

export complete levels from blender - 05/27/08 13:01

export_gs_mdl7_static.py
export_gs_$$m.py

with those scripts you can export whole levels from blender. it is an early version which needs cleanup, fool proofing, a gui and support for some more entity and surface flags but it already works.

make your settings in export_gs_$$m.py here:
scale = 32
mapcompiler = "d:/wwmp2wmb.exe"
engine = "d:/acknex.exe"

all selected objects with a name which starts with "__" will be exported as mesh, the other selected objects will be exported as model.

features:
- it supports two uv-sets for models (but the engine doesn't load the second uv-set yet)
- it supports model instances
- it supports modifiers without having to apply them (so you can use the edgesplit modifier to achieve correct smoothing for example)
- it supports custom properties for skills, flags, action, material
- it supports point lights

notes:
- creating mipmaps for mesh textures is slow with python (you could use dds textures which already have mipmaps but the map compiler seems to have a problem with dds at the moment)
Posted By: Loopix

Re: export complete levels from blender - 05/27/08 16:20

Hey vent...what have you done again!!!
This sounds like a huge step foreward in leveling workflow...definately heaven for 3dgs-blendies.

With "instancing" do you mean a "__model" object wich is copied and pasted in a blender scene will only "produce" a single mdl?


Thanks for the great work...and definately keep working on it! You should get some money from conitec as this also makes 3dgs a lot more "leveler-friendly" thus first choice for many indies wink

For me this takes away the last psycho-gui-hurden...let's learn Blender now!!!
Posted By: ventilator

Re: export complete levels from blender - 05/27/08 16:33

yes, instanced objects in blender (duplicated with alt-d) will produce only one mdl file.

level geometry (object names with "__") won't use instancing of course since all level geometry is unique. (maybe i will think of a better solution than using "__" for specifying level geometry in the future.)

i think there isn't much missing now to make blender a full alternative to wed.


Posted By: Christian__A

Re: export complete levels from blender - 05/27/08 16:58

Wow, great wink I definatly need to improve my blender skills.
Posted By: Quad

Re: export complete levels from blender - 05/27/08 17:48

great, i started to learn Blender this week. This will make me more happy with it.
Posted By: MaxF

Re: export complete levels from blender - 05/28/08 17:06

Hi ventilator

Do you what to build the same for Modo? They use Python and have a SDK for import/export smile

Do you have Modo?
Posted By: ventilator

Re: export complete levels from blender - 05/31/08 19:03

the same could be done for modo but it would be more effort. blender's python api is more powerful than modo's. i would have to write a lot of code for things that can be done with a few lines in blender. and it seems like there aren't that many modo users here so it wouldn't be really worth it i think. someone would have to pay me. :p
Posted By: NITRO777

Re: export complete levels from blender - 06/01/08 01:42

wow! excellent job. I dont use Blender but thats an awesome contribution for people who do.
Posted By: lostclimate

Re: export complete levels from blender - 06/01/08 04:23

it would be great if duplicated objects, could all be saved as 1 mdl file that would be placed around the wmp.
Posted By: ventilator

Re: export complete levels from blender - 06/01/08 07:15

Originally Posted By: lostclimate
it would be great if duplicated objects, could all be saved as 1 mdl file that would be placed around the wmp.
yes, that's what instancing does. objects which are linked to the same mesh data (which happens if you duplicate an object with alt-d) and which don't use modifiers which alter the mesh shape will only produce one mdl file. doesn't it work for you?
Posted By: lostclimate

Re: export complete levels from blender - 06/01/08 07:22

oh, i didnt check, just thought I'd throw that out.... thats awesome, never using wed except just to assign actions

Edit: actually nvm, seems thats already covered.

Edit: 2 what about animation?
Posted By: ventilator

Re: export complete levels from blender - 06/01/08 07:48

it doesn't support animated models at the moment but i am not sure if exporting animated models together with the level is very desirable? i will include a substitution option in the next version. such substitution objects won't get exported as mdl but only reference an already existing mdl in the $$m file.

but maybe i will also support animation later. i will think about how this could be handled.
Posted By: lostclimate

Re: export complete levels from blender - 06/01/08 08:07

objects exported with animation would be good for swaying trees, windmills, etc, I think it would be very useful.

for some reason instancing isnt working for me, im not sure why but heres a quick thing I made :

http://rapidshare.com/files/119320806/testlevel.zip.html

I want to edit the trees and add a shader to there material, but I dont want to go thru and do it to every tree.
Posted By: ventilator

Re: export complete levels from blender - 06/01/08 18:08

i would have to see the blender file. do you know how object and object data work together in blender? if several objects link to the same mesh data then my exporter handles them as instances.
Posted By: lostclimate

Re: export complete levels from blender - 06/01/08 18:35

I found the problem, I didnt realize there was 2 ways to duplicate items, I thought when you said alt-d that you made a typo and meant ctrl-d because that was the way I was familiar with.
Posted By: Nowherebrain

Re: export complete levels from blender - 06/02/08 00:01

blender makes good use of the "alt" key, they actually use it as the alternative in most cases....

I have not tried this yet(the new exporter), but to be sure...I need the static python script correct? Do I need the $$m thingy(nice wordage)? Or that is what is created(seems like it would be created, just a little confused ATM).
Posted By: lostclimate

Re: export complete levels from blender - 06/02/08 03:51

yeah, you need both, and then you need to edit the script in the $$m thing so that the directories point to your gstudio folder, then once you export it you can open the $$m with wed.
Posted By: Nowherebrain

Re: export complete levels from blender - 06/02/08 12:13

Ok thanks...still have not gotten around to testing it.....kinda busy.
Posted By: ventilator

Re: export complete levels from blender - 06/03/08 12:20

i have added two small features...

blender's "set smooth"/"set solid" can be used to set the smooth flag for level geometry faces.

and there is support for substitute objects now. substitute objects won't get exported as mdl, they just place the mdl file which gets specified with the custom string property "substitute" in the $$m file. this can be useful if you want to place an animated character in the level for example. you would export it separately first and then place it using a substitute object (which can be the character model itself of course).
Posted By: Altimeter

Re: export complete levels from blender - 06/03/08 16:55

Wow, Ventilator your exporter is a hugh contribution. Thanx 1000 times.
1 year ago I left C4D to learn Blender. Today I know it was a good decision. Your mdl.exporter was already great, but now the whole level can be made in Blender. GREAT!
Posted By: BoH_Havoc

Re: export complete levels from blender - 06/03/08 20:34

Just stumbled across this thread. From what i heard this seems to be a great piece of script you are coding ventilator.
I think i have to have a look at blender again now (even if i don't really like the gui) wink
Posted By: ventilator

Re: export complete levels from blender - 06/04/08 13:57

i found out that i did mipmap generation in a very suboptimal way for python. it's much much faster now! previously it was almost unusably slow for levels with lots of big textures.
Posted By: JetpackMonkey

Re: export complete levels from blender - 06/08/08 17:04

this kicks a lotta butt!

Vent's making an awesome little GUI which will let you build and run the level from within Blender itself, with a single click in a custom panel!

You can say goodbye to stinkin' WED!
Posted By: Nowherebrain

Re: export complete levels from blender - 06/08/08 20:13

Seriously? like crystal space/apricot build??? I thought it merely built a wmb file....this is awesome, I was impressed before but now I'm seriously....uh "stoked" for lack of a better term.
Posted By: ventilator

Re: export complete levels from blender - 06/08/08 20:26

no, the engine doesn't draw into the blender window. i think this would only be possible if the engine used opengl too. the engine just gets started directly from blender.

two small additions:
- support for models which don't have any uv-coordinates and textures
- blender curves get exported as gamestudio paths

i will have to write some simple editor for setting path skills though because blender natively of course doesn't have this just like wed.

export_gs_mdl7_static.py
export_gs_map.py (i had to change the script name because with $ in it you can't import it from other scripts like i want to do later from the gui script.)
Posted By: Nowherebrain

Re: export complete levels from blender - 06/09/08 10:07

cool still, starting the engine is just as good!

"export_gs_map.py (i had to change the script name because with $ in it you can't import it from other scripts like i want to do later from"

-good forward thinking.

..is it my install or is there no more .blend folder for plugins?

EDIT: I created my own plugins dir.
Posted By: ventilator

Re: export complete levels from blender - 06/09/08 11:27

i don't know where the .blender/scripts folder gets created when you use the blender installer. maybe in some strange windows home directory? i always only downloaded the blender zip. i don't like installers. smile
Posted By: Quad

Re: export complete levels from blender - 06/09/08 11:43

program flies\blender foundation\blender\.blender\scripts
Posted By: Nowherebrain

Re: export complete levels from blender - 06/09/08 11:56

That is the normal location yes, but for some reason I do not have that directory...as a mater of fact there are NO folders in tthe blender.exe dir...???I have re-installed, same scenario...but I am getting off topic if someone could just send me a PM on the subject.
Posted By: Nowherebrain

Re: export complete levels from blender - 06/09/08 23:07

now it is located in a .rar file, simply explore(open)it and there they are...wich makes me wonder how they do that, and also wonder if ventilator(Thomas?) can do it with these scripts.

BTW: I get a crash often when running...I will try to reproduce the occurrence...well I can, but I will try to figure out why...
Posted By: ventilator

Re: export complete levels from blender - 06/09/08 23:13

what is located in a rar file? do you mean the python25.zip file which comes with blender? it just contains some of the most common python modules but they aren't blender related. blender bundles them so that you don't need a full python installation for running most blender scripts.

maybe your .blender folder is hidden? have you set the explorer to show hidden files? did you do search your complete hard disk?
Posted By: Nowherebrain

Re: export complete levels from blender - 06/09/08 23:32

I have show hidden files on...so I possibly thinking myself in circles...sorry, I still don't have a .blend folder. I do have a plugin folder though so no issues....besides I have wasted enough thread space with my .blend file
Posted By: ventilator

Re: export complete levels from blender - 06/10/08 11:44

you could uninstall blender and download blender as zip and just extract that zip. that's what i always do. i never have installed blender.

or you could ask jetpackmonkey. she had the same problem if i understood this correctly and she was able to choose the location of the .blender directory with the installer or so.

do you use xp or vista? maybe you need to be administrator with vista?

Quote:
I have wasted enough thread space
i have no problem with that! that's what forums are for. smile

<edit>
i came across this:
http://blenderartists.org/forum/showthread.php?p=1136878#post1136878
</edit>
Posted By: Nowherebrain

Re: export complete levels from blender - 06/11/08 00:01

yep..that's it, I change the file path on my most used programs to not be in "program files"....,but by setting my own plugins folder it is essentially the same...thanks though at least I know I am not crazy or have some strange virus.

also check out the texture splatting video from the apricot build... texture slatting in blender RT.

or save target/save target as..with RMB
Posted By: Nowherebrain

Re: export complete levels from blender - 07/30/08 12:18

Making any new progress? just curious.
Posted By: ventilator

Re: export complete levels from blender - 07/30/08 13:08

no, i didn't do any further work yet but it has proven to be very useful already for my projects. actually it does all i personally need at the moment. what do you think would be most important to add?

by the way, in case you get problems because of spaces in your map compiler and engine paths you should change those lines (add the ' " '):

Code:
    os.spawnl(os.P_WAIT, mapcompiler, '"'+mapcompiler+'"', name + ".$$m", "-pal", "palette.pcx", "-dialog")
    os.spawnl(os.P_NOWAIT, engine, '"'+engine+'"', name + ".wmb")

Posted By: Nowherebrain

Re: export complete levels from blender - 08/02/08 12:24

The basic action assignment would be nice, and obviously flags etc....but yes it does work well for laying out the level.
Posted By: ventilator

Re: export complete levels from blender - 08/02/08 12:35

what do you mean? you can already assign skills, flags, action and material with blender's custom property system (custom properties can be set in the button panel for blender's game engine). if you look into the customproperties() function of export_gs_map.py you will see what properties are supported currently. i should document this a bit better i guess. :p
Posted By: Nowherebrain

Re: export complete levels from blender - 08/04/08 12:31

I never looked actually, and I did not know there was documentation....silly me..
Posted By: ventilator

Re: export complete levels from blender - 08/04/08 13:37

no, there isn't really any documentation. just this thread where i mentioned what features are supported and i thought if someone doesn't figure out how to use the exporter he would ask here. smile
Posted By: Nowherebrain

Re: export complete levels from blender - 08/05/08 12:29

I've been too busy to discover all the features lately...I will try to take a crack at it later though...I just never use the game logic(BGE) and that it why I never stumbled upon it.
Posted By: Nowherebrain

Re: export complete levels from blender - 08/18/08 23:17

ok, I'm asking('cause I am mentally challenged lol). I'm guessing by adding a string property with the name...e.g. player_action(if it were "action player_action()")? I really don't know. Exporting and running is NP, it the action and flags assignment?
Posted By: ventilator

Re: export complete levels from blender - 08/19/08 07:41

you have to add a string property named "action" with its string set to the name of your action.
Posted By: Rednax

Re: export complete levels from blender - 08/19/08 17:08

Hi to you all

thanx to you ventilator for this good contribution to the community^^

but i have a problem to export the whole map^^

i just startet with a little plane and textur but when i try to export the map i ever get an error...

here is a picture of the error^^

i have edit the export_gs_mdl7_static.py file with:

scale = 32
mapcompiler = "C:\Program Files\GStudio7\wwmp2wmb.exe"
engine = "C:\Program Files\GStudio7\acknex.exe"
sunazimuth = 0

do i must add something more???

thx to you all...

and pls help wink


Posted By: ventilator

Re: export complete levels from blender - 08/19/08 17:13

is the texture embedded in the .blend file and not on the harddisk somewhere? i guess my copy function doesn't handle this case. i would have to add some check.

i don't know what else could be the reason. i would have to examine it...
Posted By: Rednax

Re: export complete levels from blender - 08/19/08 17:23

hmm the textur is in the same direction... not in the blend file just loaded as jpg...


but i dont know... maybe i done something wrong...

i downloaded the 2 files and placed it in the scripts folder
then i added the line what i written before (maybe add more to the script?)

and then tryed to export...
Posted By: ventilator

Re: export complete levels from blender - 08/19/08 17:59

is the path of the image correct if you check it in the image editor? is it relative or absolute? could you provide your files so i can have a look?

<edit> oh! jpg is no good since gamestudio doesn't support it for model textures i think but it shouldn't be the reason for the error.

as a quick workaround you could add a # in front of the line which calls copyfile() in the write() method of the c_exporter() class in export_gs_mdl7_static.py. smile you have to to manually copy the textures to the target folder then. </edit>
Posted By: Rednax

Re: export complete levels from blender - 08/19/08 19:46

i think i found the mistake i made^^ first i used a jpg and not included it in the .blend file...

so but the problem not ends laugh

sorry for annoy you with this problem...

the map compiles with gamestudio but in the end there is another problem! not the whole map compiles only the model i selected^^

here is the error... just another picture...


Posted By: ventilator

Re: export complete levels from blender - 08/19/08 19:59

only selected objects will get exported. if you want to export the whole scene, you just have to select all objects by pressing [a] before exporting.

a texture size of 2000x2000 is not ideal for gamestudio. better use 2048x2048.

blender_level_exporter.zip
make sure you use this latest version. it can handle map compiler and engine paths with spaces in them. it sounds like this has caused your new error message.
Posted By: Nowherebrain

Re: export complete levels from blender - 08/20/08 04:49

and as far as the flags go?
Posted By: ventilator

Re: export complete levels from blender - 08/20/08 09:38

for flags you have to use boolean custom properties. flag1..8 and the polygon flag are supported at the moment. support for more flags could be added easily.
Posted By: XD1v0

Re: export complete levels from blender - 12/05/08 12:34

Thanks ventilator for export script, creation level in Blender it is a asome idea.
And whether there is possibility to create model animation in a level? It can be used for creation cinematic cut scenes.
Posted By: ventilator

Re: export complete levels from blender - 12/05/08 13:36

cut scenes would also require lite-c code to play them back and since the requirements most of the time are quite project specific i think this better gets handled by a coder who does a custom solution.
Posted By: DavidLancaster

Re: export complete levels from blender - 12/08/08 03:20

Ventilator you are amazing, simply, purely, magnificently amazing!
Posted By: Nowherebrain

Re: export complete levels from blender - 12/15/08 16:03

I've seen better.


I joke...lol
Posted By: Rayn

Re: export complete levels from blender - 12/20/08 09:17

Ventilator

Thank you for this wonderful exporter!

Question: Is there any way I can make WED recognize the object-groups that I have made in Blender? (I have A LOT of objects, and since I don't know how to add different actions and materials to my models using your exporter (because I'm rather nooby), I have to do it "manually" in WED). Or alternally: Is there a chance that you could make a step by step tutorial on how to add acts and mats with your exporter?

Thanks again (and also for your extremely usefull character-tut!)
Posted By: ventilator

Re: export complete levels from blender - 12/20/08 15:49

i export to the $$m format which doesn't support groups.

to set action and material in blender, press f4 in the button panel. then click on "add property", set its type to string, set its name to "action" or "material" and in the value field enter the action or material name.
Posted By: Rayn

Re: export complete levels from blender - 12/21/08 21:17

Thank you Ventilator!!!

It works EXCELLENT when I'm adding an action to a model but I can't make it work with materials. Any idea why? I have tried all kinds of settings but "Materials" keeps saying "ndef".

Still, not having to add actions through WED anymore is a HUGE, HUGE relief. Your export-plug-in have just saved me weeks of frustrating clicking-work! THANK YOU!
Posted By: ventilator

Re: export complete levels from blender - 12/21/08 22:23

hm... i don't know. it has to be "material". case sensitive. maybe that was the reason?
Posted By: Rayn

Re: export complete levels from blender - 12/22/08 10:33

ehm...no, I've tried that already. Well, nevermind - I'll see if I can figure it out somehow.
Posted By: ventilator

Re: export complete levels from blender - 12/22/08 16:06

that's strange. can you check with a simple level again? ...maybe directly open the $$m file in a text editor to see if the ndef is already there or if WED somehow changes it to ndef.
Posted By: Rayn

Re: export complete levels from blender - 12/23/08 13:21

Yahoo, I solved it!

It works if I start by assigning an action-string to the Blender-mesh and then assign a material-string. I just didn't know that I couldn't have the material without an action-property also connected to the mesh.
Posted By: Nowherebrain

Re: export complete levels from blender - 01/01/09 17:50

I'm getting an unusual error with a traceback or path or some thing...I don't know if you can make any sense of this.



the last statements made in the cosole.....

filename: c:\Valiant Black\terrain\build01\water_bucket.mdl
object "water_bucket":
texture "barrel": 512x512
texture "barrel_water": 256x256
213 uvs
62 vertices
120 faces
"barrel.bmp" copied to target folder
"barrel_water.bmp" copied to target folder
static mdl7 export done in 0.141971908946 seconds!
static mdl7 export
filename: c:\Valiant Black\terrain\build01\tree_swamp.mdl
object "tree_swamp":
texture "leaves": 512x512
texture "bark_03": 1024x1024
211 uvs
228 vertices
Traceback (most recent call last):
File "E:\Blender\.blender\scripts\export_gs_map.py", line 493, in export
write(path, name)
File "E:\Blender\.blender\scripts\export_gs_map.py", line 453, in write
export_gs_mdl7_static.write(sys.join(path, mdlname), [o], scale)
File "E:\Blender\.blender\scripts\export_gs_mdl7_static.py", line 562, in writ
e
exporter.write(filename)
File "E:\Blender\.blender\scripts\export_gs_mdl7_static.py", line 474, in writ
e
self.exporttriangles(mesh, group)
File "E:\Blender\.blender\scripts\export_gs_mdl7_static.py", line 536, in expo
rttriangles
if SS_TRIANGLE == 26: t.adduvset(uvs.index(fuv[1][2]), uvs.index(fuv[1][1]),
uvs.index(fuv[1][0]), ti[1])
TypeError: 'NoneType' object is unsubscriptable


......
The odd thing is I can compile and run every object individually in the .blend by using your lvl exporter, but as a whole I get these errors.

EDIT: GOT IT! strange, it was a bad UV I guess...I looked at the console again and thought about it....for about 10 min. because I knew I had checked the uv's on my models...I added one model since and I guess it had a bad UV???? deleting and creating a new UV did the trick.



Posted By: ventilator

Re: export complete levels from blender - 01/01/09 23:51

blender_level_exporter.zip

make sure you use the latest version. there was a bug if a model with one uv-set came after a model with two uv-sets. maybe that's what happened in your case? i have uploaded a fix for that a few weeks ago.
Posted By: Nowherebrain

Re: export complete levels from blender - 01/02/09 04:01

Thanks, and for the timely response as well.
Posted By: ventilator

Re: export complete levels from blender - 03/16/09 07:05

http://www.conitec.net/beta/prog_mdlhmp.html

that's nice! jcl released the specifications of the wmb format.

directly going to the wmb format would have many advantages. no need for going through the slow map compiler anymore, no need for letting the map compiler do ugly tesselation of the level geometry, export lightmapped level geometry directly from blender, the lite-c editions which don't come with wed and the map compiler can read wmb i think,...

i don't use gamestudio much at the moment but probably i will work on a wmb version of this exporter nevertheless if i find some time. exporter writing is kind of fun. smile
Posted By: KDuke

Re: export complete levels from blender - 03/17/09 21:51

WHOOT! That would be freaking great!
Do you have any idea how long this would take to complete ventilator?
And thanks for your already existing exporter, as well as for at least already thinking about including lightmaps into the exporter ^^!

greetings
KDuke
Posted By: ventilator

Re: export complete levels from blender - 03/18/09 08:34

i guess a first version would take me 2 days but i don't know yet when those 2 days will be. smile
Posted By: Quad

Re: export complete levels from blender - 03/18/09 10:58

a fast and blunt, how to use tutorial (on a cube with a light and an entity?) would be cool too. then blender shall be the new level editör of Gamestudio.
Posted By: Pappenheimer

Re: export complete levels from blender - 03/21/09 11:43

Just tried to create a second skin in blender and got it! - yeah, I didn't find out before, didn't expect that it is that easy wink - and now I have to say: Go for it, ventilator!
Maybe, it could be of use for me within the next days! :P
Its, because my fish game shall get a background with an ocean 'landscape' yet! Never planned that. frown But I have to do it.
Posted By: ventilator

Re: export complete levels from blender - 03/21/09 12:14

models can get exported with two uv-sets and a lightmap with the current version already. just for level geometry with two uv-sets it would need the WMB version of the exporter. at the moment i don't have enough time to work on it though. smile
Posted By: Pappenheimer

Re: export complete levels from blender - 03/21/09 12:44

Okay, no problem! I wasn't aware that the exporter already exports two uv-sets. That is absolutely sufficient to me at the moment, because I don't use any collision anyway!

I wasn't aware that I can download your tutorials that you made with wink, too.
I just downloaded the available parts of your tutorial. They are very helpful. Just found out that you gave some advices in the exporting part that I absolutely missed, although I already exported a lot of models from blender to 3DGS.

Any chance to get the other parts of it?
Maybe, someone else could host them? Or, are they available at one of the blender forums?
Posted By: ventilator

Re: export complete levels from blender - 03/21/09 12:51

hm... strange, the files are still there on the webspace but something seems to be wrong. i have changed the link in my signature to the googlepages mirror.
Posted By: Pappenheimer

Re: export complete levels from blender - 03/21/09 12:58

the flash animations

preparing the mesh - flash animation ~ 1mb
building the armature - flash animation ~ 3.5mb

weight painting - flash animation ~ 3.5mb
setting up constraints - flash animation

are still not available, but I got the page with the explanations on

weight painting & setting up constraints
Posted By: ventilator

Re: export complete levels from blender - 03/21/09 13:05

that's very strange. the files are all still there. maybe it's some incompatibility with a new flash player version or something like that but why does the last one still work then?

try to change .html into .swf in the address bar then you should be able to download them.
Posted By: Pappenheimer

Re: export complete levels from blender - 03/21/09 13:18

That worked. Thanks for that hint. smile

The html is blank white, and when I right-click on it, it says "Film nicht geladen...", the site with the working flash video shows instantly the loading bar of wink and starts loading the video.
Posted By: Pappenheimer

Re: export complete levels from blender - 03/21/09 13:31

Found the problem:

"<EMBED SRC="mesh.swf" WIDTH=953 HEIGHT=751 quality=low loop=false TYPE="application/x-shockwave-flash""

"mesh.swf" should be "f_mesh.swf" instead!
Posted By: ventilator

Re: export complete levels from blender - 03/21/09 13:39

<PARAM NAME=movie VALUE="f_mesh.swf"
<EMBED SRC="mesh.swf"

yes, the filename is defined in two different ways. some browsers and flash plugins seem to use the first one and some the second one which is wrong.

in IE it still works and the last time i checked with firefox (but that was a long time ago so maybe i don't remember it correctly) it worked too but now it doesn't anymore.
Posted By: Pappenheimer

Re: export complete levels from blender - 03/21/09 13:52

I use Netscape which is a derivation of firefox now.

The working pages have this source code:

<PARAM NAME=movie VALUE="f_walkcycle.swf">
...
<EMBED SRC="f_walkcycle.swf"

means identical names for source and value
Posted By: ventilator

Re: export complete levels from blender - 03/25/09 12:22

i found a much faster way to generate the list of uvs. currently i do this in a very stupid way for python like:
Code:
uvs = []
...
if uv not in uvs:
    uvs.append(uv)
and later when i write out the triangles i look up the uv indices like that:
Code:
uvs.index(uv)
this scales very badly with objects that have ten thousands of vertices.

if done with a set and dictionary like that:
Code:
uvs = set()
...
uvs.add(uv)
and:
Code:
# convert set to dictionary with indices
uvs = dict([(k, v) for v, k in enumerate(uvs)])
# index loopup
uvs[uv]
an object with ten thousands of vertices takes the blink of an eye instead of minutes. :p probably i will upload a new corrected version soon. still didn't have time for the wmb version though.
Posted By: Pappenheimer

Re: export complete levels from blender - 03/25/09 13:12

Great news! Will definitely speed up the workflow.
Posted By: XD1v0

Re: export complete levels from blender - 03/25/09 17:27

Finaly i can export my level in few seconds grin
Posted By: ventilator

Re: export complete levels from blender - 03/25/09 17:47

export_gs_mdl7_static.py

just download this script and replace it if you want to give the new faster version a try. it isn't very tested though. maybe i introduced other bugs. smile
Posted By: XD1v0

Re: export complete levels from blender - 03/25/09 18:20

Impressive, in 10 times faster that previous version
i tested on this level(lot of textures and vertices)
Posted By: capanno

Re: export complete levels from blender - 05/15/09 08:21

Excellent tool! Thanks a lot!

Just a thing, how does the scaling work? What formula can I use to convert it to blender's units and quants?
Posted By: ventilator

Re: export complete levels from blender - 05/15/09 10:11

i most of the time use 1 meter / blender unit = 32 quants. you can change this scaling factor at the beginning of the script.
Posted By: Nowherebrain

Re: export complete levels from blender - 05/23/09 20:28

Any news on moving formats, or are you moving on to life and other things(I understand completely if no time)?
Posted By: ventilator

Re: export complete levels from blender - 05/23/09 20:57

i didn't work on it yet. maybe sometime in the summer when blender 2.5 is more finished. it makes sense to wait for blender 2.5 because it won't be script compatible and blender 2.5 with the customizable gui should be awesome for doing level editing tools.
Posted By: Nowherebrain

Re: export complete levels from blender - 05/29/09 21:28

and also the possible/probable py3.x move, that I did not think about before asking.
Posted By: KiwiBoy

Re: export complete levels from blender - 05/30/09 04:23

Hi,
Just installed Blender and python but Blender says python is not installed and will only run on what it has, some scripts may not be available.

Is this normal?

Or does python need to be installed correctly and if so, how does one install something with an installer, see it installed in 'add or remove'and not have it register with the program it was installed for?
Posted By: Anonymous

Re: export complete levels from blender - 05/30/09 10:23

you have to install phyton 2.5 not 3
Posted By: KiwiBoy

Re: export complete levels from blender - 05/30/09 21:12

Thanks, I found it am currently downloading.
tried 3 first then 2.6.
Posted By: Felixsg

Re: export complete levels from blender - 05/31/09 20:31

you need to download 2.5.4 is the 2.5 the blender use
Posted By: KiwiBoy

Re: export complete levels from blender - 05/31/09 20:45

Thanks Felixsg, got that from the post above and it all works now.
Thanks for all the help guys smile
Posted By: Nowherebrain

Re: export complete levels from blender - 05/31/09 20:46

Yes 2.5 for current version. My statement about py3.x was in regard to Blender2.50.
Posted By: lostclimate

Re: export complete levels from blender - 06/23/09 06:08

the y value of my objects are being reversed and when i open the level in wed, all the object filenames are not there, so it just makes a bunch of empty objects.
Posted By: ventilator

Re: export complete levels from blender - 06/23/09 07:05

what do you mean with reversed? negative? does this happen with all of your levels?

i write the names into the $$m file but WED doesn't read them for some reason. $$m isn't really meant for WED but for the map compiler.
Posted By: lostclimate

Re: export complete levels from blender - 06/23/09 07:22

yeah, negative, basically if i have it tilted down 30 degrees its tilted up 30 degrees....
Posted By: ventilator

Re: export complete levels from blender - 06/23/09 07:26

so something is wrong with tilt? not with the y-coordinate?

edit:
yeah! that's a bug...

try to add a minus to o.RotY in this line:

file.write("\t%f %f %f\n" % (o.RotZ * RAD2DEG, o.RotY * RAD2DEG, o.RotX * RAD2DEG))

needs more testing though. could be more complicated to fix if blender's rotation order turns out to be different to gamestudio's.

edit2:
the rotation order seems to be the same. adding minus should be enough.
Posted By: lostclimate

Re: export complete levels from blender - 06/23/09 07:41

probably the ogl/dx conversion. what about the map .$$M thing, any solutions? I really would prefer to do some things in wed.
Posted By: ventilator

Re: export complete levels from blender - 06/23/09 07:50

there is no solution. the wmp format (which is binary now) would be much more complicated to write than $$m and in future versions of the exporter i will go directly to wmb (which also is a simpler format than wmp).

in the past i had so many troubles with wed and the map compiler that i am totally fed up with the gamestudio tools and don't want to have anything to do with them anymore. :p
Posted By: lostclimate

Re: export complete levels from blender - 06/23/09 08:34

very understandable, do you think multiple uv sets will ever be supported, or weighted vertices?
Posted By: ventilator

Re: export complete levels from blender - 06/23/09 08:49

a second uv-set is already supported for models. i will support it for level geometry too once i switch to wmb.

once i rework the mdl7 exporter for blender 2.5 i will add weighted vertices.
Posted By: lostclimate

Re: export complete levels from blender - 06/23/09 09:01

the second uv set is in!, woot!. hey, since you seem to know the most out of everyone i know about blender, is there a way to get two seperate uv sets to work on a material, I want to be able to see my lightmaps in the viewport, but even with glsl on, i cant get seperate uvs on the textures.
Posted By: ventilator

Re: export complete levels from blender - 06/23/09 09:13

yes, i think you just have to enter the proper uv-set in the "map input" panel of the material's textures.

when i tried to display lightmaps in blender's viewports a while ago my problem was that i couldn't achieve a modulate2x like gamestudio uses for lightmaps. blender's multiply blending mode is the equivalent of direct3d's modulate.

but i am no expert about blender's material system. i find it quite confusing. it's the area where i agree with all the blender gui criticism. smile
Posted By: lostclimate

Re: export complete levels from blender - 06/23/09 09:21

yeah, you were right, and yeah i dont like it either, espcially when trying to get specularity maps to work right.
Posted By: lostclimate

Re: export complete levels from blender - 06/23/09 09:34

ok, new question, since before as far as flags go you said only 1-8 and polygon were set up, so what do i do for passable objects?

edit: also im not sure how im going to get animated ents in the level now either....
Posted By: ventilator

Re: export complete levels from blender - 06/23/09 09:47

you have to add support for it in this function:

Code:
def customproperties(o):
    
    f1=f2=f3=f4=f5=f6=f7=f8 = 0
    polygon = 1
    s1=s2=s3=s4=s5=s6=s7=s8=s9=s10=s11=s12=s13=s14=s15=s16=s17=s18=s19=s20 = 0
    action = "ndef"
    material = "ndef"
    substitute = None
    
    for p in o.getAllProperties():
        if p.getType() == "BOOL":
            if p.getName() == "flag1": f1 = p.getData()
            if p.getName() == "flag2": f2 = p.getData()
            if p.getName() == "flag3": f3 = p.getData()
            if p.getName() == "flag4": f4 = p.getData()
            if p.getName() == "flag5": f5 = p.getData()
            if p.getName() == "flag6": f6 = p.getData()
            if p.getName() == "flag7": f7 = p.getData()
            if p.getName() == "flag8": f8 = p.getData()
            if p.getName() == "polygon": polygon = p.getData()
        if p.getType() == "FLOAT":
            if p.getName() == "skill1": s1 = p.getData()
            if p.getName() == "skill2": s2 = p.getData()
            if p.getName() == "skill3": s3 = p.getData()
            if p.getName() == "skill4": s4 = p.getData()
            if p.getName() == "skill5": s5 = p.getData()
            if p.getName() == "skill6": s6 = p.getData()
            if p.getName() == "skill7": s7 = p.getData()
            if p.getName() == "skill8": s8 = p.getData()
            if p.getName() == "skill9": s9 = p.getData()
            if p.getName() == "skill10": s10 = p.getData()
            if p.getName() == "skill11": s11 = p.getData()
            if p.getName() == "skill12": s12 = p.getData()
            if p.getName() == "skill13": s13 = p.getData()
            if p.getName() == "skill14": s14 = p.getData()
            if p.getName() == "skill15": s15 = p.getData()
            if p.getName() == "skill16": s16 = p.getData()
            if p.getName() == "skill17": s17 = p.getData()
            if p.getName() == "skill18": s18 = p.getData()
            if p.getName() == "skill19": s19 = p.getData()
            if p.getName() == "skill20": s20 = p.getData()
        if p.getType() == "STRING":
            if p.getName() == "action": action = p.getData()
            if p.getName() == "material": material = p.getData()
            if p.getName() == "substitute": substitute = p.getData()
            
    skills = (s1,s2,s3,s4,s5,s6,s7,s8,s9,s10,s11,s12,s13,s14,s15,s16,s17,s18,s19,s20)
    flags = (0,0,0,0,0,polygon,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,f1,f2,f3,f4,f5,f6,f7,f8)
    return action, skills, flags, material, substitute



it's easy. the only problem is figuring out which of the zeros in flags = (...) is the passable flag and i don't have time for that now. you have to save some simple test $$m from wed.
Posted By: lostclimate

Re: export complete levels from blender - 06/23/09 09:48

k, thanks laugh
Posted By: LIGHTSPIKE

Re: export complete levels from blender - 06/24/09 12:30

hey ventilator the second link is broken
Posted By: ventilator

Re: export complete levels from blender - 06/25/09 03:45

Quote:
edit: also im not sure how im going to get animated ents in the level now either....

export the animated model separately with the other exporter.

add the property "substitute" and specify the filename of the previously exported model. the object won't get exported then but only be referenced in the $$m file.

Quote:
hey ventilator the second link is broken

you mean export_gs_$$m.py? i changed the filename to export_gs_map.py.
Posted By: lostclimate

Re: export complete levels from blender - 06/25/09 04:37

yikes, thats a little... inefficient you ever consider working with appended files?

EDIT: i feel like an asshole asking aobut all these free features and complaining, your work already is very appreciated.
Posted By: ventilator

Re: export complete levels from blender - 06/25/09 04:52

what do you mean with appended files?

the "substitute" option did the trick for me. i am not sure how to solve the animation thing in a better way. i think if you have a level filled with different animated character models then always exporting all models and all animations could take a while. it would have to be cached somehow. the animations only exported again if something changed...

i know that the exporter isn't really finished. after it did what i needed i lacked the motivation to polish it. polishing a program often is very boring and uninteresting work. smile ...and for myself it's no problem to add new features on the fly in case i need anything.
Posted By: lostclimate

Re: export complete levels from blender - 06/25/09 06:07

well, if you go to file, you can append or link other objects, and what you could do is just have it so that upon export you can select if you want outside (linked) to export, or just models from the current level.
Posted By: ventilator

Re: export complete levels from blender - 06/25/09 06:23

sounds like a good idea. i am not sure how linking works from the python side of things but i will look into it when i redo the exporter for blender 2.5.

did you get the passable flag to work?
Posted By: lostclimate

Re: export complete levels from blender - 06/25/09 07:06

havent checked it yet, since all i was doing until I got a reply was making a default action to make the object passable.

thanks for looking into it. If i had money right now i'd donate since this is really an amazing contribution. cant wait until we can directly compile wmb's from blender, I wonder if its possible for pro users to manually set up a bsp system, in blender, using the structs predefined in the wmb description, not that I have pro, but it would be interesting to see.
Posted By: Nowherebrain

Re: export complete levels from blender - 07/01/09 19:21

I can't wait.
Posted By: Ravyne

Re: export complete levels from blender - 07/02/09 02:01

Ok, does this work for GMAX as well? Well if not I suppose I can try to learn how to use Blender again... But its gonna take a while since I'm still learning A7. Any alternatives to having characters without this for now?
Posted By: Nowherebrain

Re: export complete levels from blender - 07/02/09 11:30

No, this is blender only. Sorry.
Posted By: Pappenheimer

Re: export complete levels from blender - 07/03/09 17:55

ventilator, you mentioned that one can export a model with 2 skins already.

I fail to do so, probably, the skins have to be attached in blender in a way that I don't know.
Posted By: ventilator

Re: export complete levels from blender - 07/03/09 18:00

actually you just have to add a second uv-set to the model in blender.
Posted By: Pappenheimer

Re: export complete levels from blender - 07/03/09 18:03

I would like to combine two textures in blender.
One texture with baked AO, and one with baked rendered shadows.
Any hints how to achieve that?
Posted By: ventilator

Re: export complete levels from blender - 07/03/09 18:09

i think you have to set up a material which blends the ao and shadow textures in the wanted way and then do a bake with "textures" enabled.

you could also use the compositor. maybe that would be easier.
Posted By: Pappenheimer

Re: export complete levels from blender - 07/03/09 18:10

I don't find a way to add a second uv. The way I try it, replaces the uv only by the new layout.
Posted By: ventilator

Re: export complete levels from blender - 07/03/09 18:14

the editing buttons contain a mesh panel with "UV Texture [New]". by pressing the [New] button you can add an uv-set.
Posted By: Pappenheimer

Re: export complete levels from blender - 07/03/09 18:30

I've got that in blender now, but it doesn't export 2 skins to MED.
Posted By: ventilator

Re: export complete levels from blender - 07/03/09 18:40

you use the level exporter, right? can you show a screenshot of blender?

the official old mdl7 exporter for animated models doesn't support two uv-sets. (there is an experimental quickly modified version of the old mdl7 exporter that supports two uv-sets but i would have to look for it.)
Posted By: Pappenheimer

Re: export complete levels from blender - 07/03/09 18:57

Ah, sorry, probably that's the reason.
I didn't make a difference between level exporter and the mdl7 exporter.
I have a look into this.
Posted By: Pappenheimer

Re: export complete levels from blender - 07/03/09 19:13

I've used the export $$m now, but the resulting mdl has still only one skin.

What sort of screenshot do you want?
When I opened the export options?
Or, with the two texture buttons?
...?
Posted By: ventilator

Re: export complete levels from blender - 07/03/09 19:20

a screenshot with the two texture buttons. or the blend file.

i am not sure if this is necessary but did you assign textures to both uv-sets?
Posted By: Pappenheimer

Re: export complete levels from blender - 07/03/09 19:28


Posted By: ventilator

Re: export complete levels from blender - 07/03/09 19:34

hm... i don't see any problem. i would have to check it myself with the blend file.
Posted By: Pappenheimer

Re: export complete levels from blender - 07/03/09 19:42

The blend file is huge. I will make a smaller one. But, for now I have to go.

Thank you very much for your time and efforts!
Posted By: Pappenheimer

Re: export complete levels from blender - 07/03/09 21:29

Guess what? I got it working! smile
I have to save the blend file with the second skin, before I export it.

Nonetheless, a further question:
- Does it need a special material setting to see the combination of the skins ingame? At least, the preview in MED doesn't show both at once.
Posted By: ventilator

Re: export complete levels from blender - 07/03/09 21:36

med doesn't support showing both at once. i think the engine treats the second skin as light map by default. if not then you have to assign some light map material.
Posted By: Pappenheimer

Re: export complete levels from blender - 07/03/09 22:10

It works even within MED's preview - my skins had been not different enough to recognize it! Sorry! blush
Posted By: Pappenheimer

Re: export complete levels from blender - 07/03/09 22:50

How can I see the mix of the two textures already in blender as I see it in the acknex engine?
Posted By: Nowherebrain

Re: export complete levels from blender - 07/04/09 06:32

add a texture using the second skin/map set the mix type to screen/overlay or something I cannot remember. Make sure the texture input is using the correct UV...UVTex or UVTex.001, but You know what you are doing so you prabably re-named it shade or something.
Posted By: Pappenheimer

Re: export complete levels from blender - 07/04/09 08:50

I don't know at all what I am doing, but I want to know! wink

I find this texture, material, image, blend etc. settings extremely confusing.
Posted By: Pappenheimer

Re: export complete levels from blender - 07/04/09 15:12

I'm getting closer to a solution, although I don't understand all things.
The "lighting_baking.avi" from Yo Frankie DVD helped me. The tutorial is extremely fast, I had to stop it several times, and I compared the settings seen and changed in the video to mine in blender and vice versa.
I see the mix of the 2 textures in the material preview now.

If anybody can give an advice how to "apply" this mix to the object in the 3D view as well, it would be appreciated! smile
Posted By: Nowherebrain

Re: export complete levels from blender - 07/04/09 20:00

Are you trying to display it inside blender? I can do a video(no audio)tutorial that will run through the basics.
Posted By: Nowherebrain

Re: export complete levels from blender - 07/04/09 20:23

Give me a heads up.
On a side note...
Ventilator, do you plan on including HMP support?
Posted By: Pappenheimer

Re: export complete levels from blender - 07/04/09 20:43

Hi Nowherebrain, your good video tutorials are well known! smile
Thank you very much for your offer, but making a video seems to much of an effort for just me being too dumb to find a single switch or such.

I loaded up a small test file, maybe, it is the easiest way to have a look at it and point me to what I missed to do.

http://www.puppenheim.org/blend_texture_test.zip
Posted By: Nowherebrain

Re: export complete levels from blender - 07/04/09 20:57

I will look at it.
Posted By: Nowherebrain

Re: export complete levels from blender - 07/04/09 21:17

I assume the kissenfischbaked.tga is the shadow map?...it was not included...no problem.
you have the basic setup right, 2 textures/one material.
on the UV maps in the mesh edit stuff set the active UV to the shade UV to bake to it(*you bake to the active, from the renderable UV*).
Yours is correctly setup for the bake.
*important* it will bake to the image assigned to the mesh in the UV image editor...so with your faces selected, go to the UV image editor and select the image you want to bake to(shadows)from the drop down menu.
In the render buttons go to the bake tab, then select shadow.
click bake.....it should be rendering to the image in the editor...

Now...
in the material editor under the texture tab select the shadow map texture.
go to the map input and select uv...type the UV name in the empty field(shade in this case).
go to the "map to" tab and select multiply(you have done this already), and adjust the Col(coloring)value until you are happy.
one last thing
in the top menu(file, add, time line, game)in the game menu select Blender GLSL materials...this was not checked and may be the big issue you are having.
...I hope I covered it all as I typed and alt tabbed back and forth checking stuff.
If this is not helpfull I will still do a video...it is no problem.
Posted By: Pappenheimer

Re: export complete levels from blender - 07/04/09 21:36

Most probably it was this activating the GLSL materials, because now the textures are blended within the 3d view! smile

Thanks a lot! smile

For now the shadow parts of the cube are pitch black, and AO doesn't make much sense with a simple cube, so I have to make further tests with more appropriate shapes!
Posted By: Nowherebrain

Re: export complete levels from blender - 07/04/09 21:41

bake with an empty material(white) and ao on. Do a full bake and you will have ao and shadows in one pass. Assign the texture in another material after the color.
BTW: I am uploading a quick and dirty tut now to you tube.
[video:youtube]http://www.youtube.com/watch?v=ts7sXIzw1X0[/video]
Posted By: ventilator

Re: export complete levels from blender - 07/04/09 21:47

i am looking forward to real global illumination in blender. it will be nice for baking. i think there already are builds on graphicall.org but they are very experimental.
Posted By: Nowherebrain

Re: export complete levels from blender - 07/04/09 21:54

Yes, there is the second build up with Farsthary's FG(I've toyed with them and they are functional)...as you can tell from your thread there are quite a few Blender heads here....growing daily.
Posted By: Pappenheimer

Re: export complete levels from blender - 07/04/09 22:12

Originally Posted By: Nowherebrain
bake with an empty material(white) and ao on. Do a full bake and you will have ao and shadows in one pass. Assign the texture in another material after the color.
BTW: I am uploading a quick and dirty tut now to you tube.
[video:youtube]http://www.youtube.com/watch?v=ts7sXIzw1X0[/video]


That was fast! grin Enjoyed it! Gave me even additional hints how to use blender for such tasks! Great job! smile
Posted By: Nowherebrain

Re: export complete levels from blender - 07/04/09 22:16

lol, yes I've been blending a while...I still forget a hot key once in a while.
Posted By: Pappenheimer

Re: export complete levels from blender - 07/05/09 10:12

Got a new question:

Where do I assure that each texture is connected to its very own uv?
Posted By: Nowherebrain

Re: export complete levels from blender - 07/05/09 10:59

Under the base material go to the texture tab(should be texture, map input, map to)...
select the texture you are modifying or confirming the mapping for.
goto the map input tab>
select UV>
in the empty field input the uv map name(this will tell the texture what coords to map to).
that should be it....let me know.
Posted By: Nowherebrain

Re: export complete levels from blender - 07/13/09 08:45

BTW...off subject..sort of.
sunday meeting agenda news.
"we will support Python 3.1 as default in the Blender 2.5 branch"
Are you planning on updating the scripts, or do we stick with 2.48/2.49?

I also asked before if you would add support for HMP's? Sorry we got off subject for a bit.
Posted By: ventilator

Re: export complete levels from blender - 07/14/09 12:29

switching from python 2.x to 3.x shouldn't be a big deal. the biggest difference of 3.x is that all strings are unicode and for binary data there is a new separate type "bytes". this could require some small changes in my code.

...but blender 2.5 will have a totally new api. from what i have seen so far i would say that i will have to rewrite about 50% of the exporters because of that.

i will think about hmp...
Posted By: Nowherebrain

Re: export complete levels from blender - 07/15/09 07:51

Thank you. I realize it may be a dying breed models can be faster at times.
Posted By: lostclimate

Re: export complete levels from blender - 10/13/09 19:33

hey vent, i realize this isnt really 100% related to this thread because its more about the model exporter itself, but is there a way to export the texture list connected to the material connected to the object? also is there a way to determine what that particular texture affects on the material, the reason I ask is then I can add normal and spec maps to models and have them export directly to 3dgs the way they look in blender. (so lets say in blender I am in glsl mode, I add a normal and spec map, and have them selected, when it gets exported the script determines that the normal button is selected, it adds a normal map script, if i have spec map selected too it adds a spec map/ normal map shader). Im not asking you to do this, you've alredy done a tremendous job especially for free. but I wondered if you thought it'd be possible since I am contemplating learning a little python to be able to do it myself.
Posted By: ventilator

Re: export complete levels from blender - 10/22/09 12:03

yes, this would be possible. it would be great if you looked into it. laugh python is easy to learn and a very useful skill for a lot of things.
Posted By: Roel

Re: export complete levels from blender - 11/24/09 11:42

For some reason I get errors when I run your mdl7 export script.
It always worked fine, but after installing blender 2.49b
I got errors.
Installing the 2.49a or 2.49 blender version does not solve the problem.
Did anyone have these errors too?

I do not have a picture about it, but it says the error is in line 259
if you want to have a picture about the errors I could upload one.
Posted By: ventilator

Re: export complete levels from blender - 11/24/09 12:24

the exact error message would help.
Posted By: Roel

Re: export complete levels from blender - 11/24/09 14:39


here is the image with the error
Posted By: ventilator

Re: export complete levels from blender - 11/24/09 14:50

blender uses python 2.6 now. it has a new keyword "as" which can't be used as a variable name anymore.

you could try to rename the variable yourself or look for an updated script i have uploaded in some other thread. maybe someone remembers where (i unfortunately don't) or can provide the link again. laugh
Posted By: Roel

Re: export complete levels from blender - 11/24/09 15:34

Thanks ventilator!
it works again.
if you want the modified file I can send a link it to you.\
Posted By: KDuke

Re: export complete levels from blender - 01/04/10 20:44

Hi Ventilator!

I finally came around to work on my project again. Well I tried to export a very simple level though I when exporting I get an error in export_gs_map.py on line 293 saying
Code:
if f.image != None:
ValueError: face has no texture values



Seems as if it tries to access a non-existent member of the face-class! Might you have an idea what the problem might be?

Edit: Oh yeah thats only the case for level geometry, objects with the "__"-prefix to be specific.
Posted By: ventilator

Re: export complete levels from blender - 01/04/10 21:41

i guess this error means that level geometry needs uvs + an assigned texture.
Posted By: KDuke

Re: export complete levels from blender - 01/04/10 22:42

Lol... yeah thats been it.
Posted By: Nowherebrain

Re: export complete levels from blender - 01/05/10 18:02

I had a similar problem, I think it is in the first few pages of this thread....I say this because it can also happen if your UV's are corrupt...not sure why, but I had to unwrap some models more than once....but I have been using this for about a year now religiously.
Posted By: KDuke

Re: export complete levels from blender - 01/26/10 20:57

Well after using this nifty, fine, great (think yourself another thousand praising words here) exporter I wonder how you handle lighting? That's the only thing which could use some improvement. As blender handles lighting differently than acknex I found it really hard to set up nice lighting with blender.
This comes especially into mind when having to export the whole level again when doing little alteration.

greetings K-Duke
Posted By: Nowherebrain

Re: export complete levels from blender - 01/28/10 21:14

you can write a lighting script for the levels/level creating object lights.
Posted By: FcoElizalde

Re: export complete levels from blender - 03/31/10 16:47

The new file ventilator is talking about can be found in the thread:
-Physics Simulation Export from blender-

and in this link:
http://www.oppl.com/downloads/export_gs_mdl7.py
Posted By: ventilator

Re: export complete levels from blender - 05/08/10 16:48

i was bored today and finished my python wmb7 library. it can write and read wmb7 files. first i only wanted to do writing but the engine never liked my files so i also had to do reading for easier debugging. this means that doing an importer later wouldn't be that much work anymore. i don't know if an importer would be very useful though.

now i only have to swap the wmp/$$m library with the new wmb libary in the exporter and then it will be possible to not only skip wed but also the map compiler. which has avantages like: faster, no annoying map compiler popup, the exporter won't have to write a palette and wad file anymore, full control over tesselation, level geometry lightmaps,...

i hope i will have time for it soon.
Posted By: Quad

Re: export complete levels from blender - 05/08/10 18:23

great, can you make it as an interface(i do not mean the oop interface) usable outside of blender so we can use it for other tools?
Like a pyhton wmb7/mdl7 sdk/library?

like someone else could write a batch converter, or exporter for other tools etc.
Posted By: ventilator

Re: export complete levels from blender - 05/08/10 19:02

my libraries already are useable outside of blender. the blender exporter code is separated from the mdl7/wmb7 code.

i have used my mdl7 library several times for batch converters already. at the moment it only supports writing though. maybe i will implement reading for mdl7 too. in the meantime you could use pyassimp for reading mdl7 files with python.
Posted By: Pappenheimer

Re: export complete levels from blender - 05/08/10 19:05

Originally Posted By: ventilator
i was bored today and finished my python wmb7 library. it can write and read wmb7 files.

You can always ask me, when you are bored, you know? grin
Sounds great! I was thinking about building my levels in blender last months from time to time, but I don't know how to use the standard terrain shader with it.
Posted By: Quad

Re: export complete levels from blender - 05/08/10 22:52

Originally Posted By: ventilator
my libraries already are useable outside of blender. the blender exporter code is separated from the mdl7/wmb7 code.

i have used my mdl7 library several times for batch converters already. at the moment it only supports writing though. maybe i will implement reading for mdl7 too. in the meantime you could use pyassimp for reading mdl7 files with python.


ooh, great, blush, i didnot checked the code of the exporter. now i only need python bindings for lite-c grin
Posted By: Quad

Re: export complete levels from blender - 06/09/10 15:43

Hello Ventilator,

where can i download the latest wmb exporter?
Posted By: Rackscha

Re: export complete levels from blender - 06/09/10 15:55

Wow VENT sound absolutely great grin.

Maybe, is there a possibility for softedges?(bsp maps normaly support only hard egdes).

Maybe the level could be inserted as a modelfile with baked shadows for the smooth option...maybe?


Greets
Rackscha
Posted By: ventilator

Re: export complete levels from blender - 06/09/10 18:11

unfortunately the wmb version of the exporter isn't done yet. just the wmb library. maybe i will continue to work on it next week.

blender's set smooth/set solid should export to gamestudio's smooth flag already. for models i would use blender's split edge modifier to achieve correct smoothing.


Posted By: Rackscha

Re: export complete levels from blender - 06/09/10 18:34

You mean, Smooth for levelblocks affect the normals of the imported fbx in Wed? Thought its just for Shadows...I'll give it a try^^

EDIT: but split edge means that the mesh will be open, right?(hope new shade c with shadowmapping is coming soon :D)
Greets
Rackscha
Posted By: Tele

Re: export complete levels from blender - 04/09/20 15:29

Hallo
I need a plug in to convert Blender Model to mdl7. The old MDL7 exporter from Thomas Nill "Blender MDL7 Exporter" dont run on the new Blender > 7.8
Can you help my.
Thanks Tele
Posted By: Dooley

Re: export complete levels from blender - 04/21/20 16:36

I use Blender ... export to Wavefront Object - .obj format
Then in MED, import the .obj file.
You will have to re-apply the textures, but the UV maps should be intact. For some reason, you also have to flip the textures vertically for them to line up.
Posted By: Tele

Re: export complete levels from blender - 05/04/20 15:42

Thank you i have been doing this all the time.
Thought with blender converter would not be bad, since it exists.
© 2024 lite-C Forums