Author Topic: Blender --Help Center--  (Read 56929 times)

Yggdrasil

  • GAE Team
  • Ornithopter
  • ********
  • Posts: 408
    • View Profile
Re: Blender --Help Center--
« Reply #200 on: 16 January 2011, 19:24:12 »
There's no other script for blender.

Somehow the script can't call the converter in a correct way. Could you please post the whole output? Post it on pastebin.com and only post a link here.

Do you really have xml2g.exe in the scripts directory? It should just export the xml if it can't find the converter but who knows...

Mr War

  • Guest
Re: Blender --Help Center--
« Reply #201 on: 16 January 2011, 19:51:27 »
Thanks I really appreciate the help   :)

I'm not sure what you mean by the whole output. :-[     It does output an XML now that i looked for that. I uploaded the XML here.

http://www.mediafire.com/?46y6midwgqrs3v9

Is there a way to convert the xml to g3d now that it's outside Blender?  

For reference, the model (I'm hoping) looks like this:

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: Blender --Help Center--
« Reply #202 on: 16 January 2011, 21:00:39 »
Thanks I really appreciate the help   :)

I'm not sure what you mean by the whole output. :-[     It does output an XML now that i looked for that. I uploaded the XML here.

http://www.mediafire.com/?46y6midwgqrs3v9

Is there a way to convert the xml to g3d now that it's outside Blender?  

For reference, the model (I'm hoping) looks like this:

First thing I noticed when downloading your file was that it was 3 megabytes... For a building... Remember to set the start and end frames to one!

Secondly, you expect a texture, but the XML shows there's no texture coords linked. http://glestguide.co.cc/blender_tutorial2.php

Finally, running it through the converter threw a normal error on every line, and with 255 frames, it's Blender wasn't happy. I'd recommend you post the BLEND file, not the XML file. We can't solve the problem with just an XML. Out of curiosity, did you model this yourself or is it imported from another format? The normal errors are consistent with a badly imported file (importers are fickle things).

Also, what's with the paths in your command line? python26.zip? Huh?

And as a final note, you have the correct version of python installed, right?

Edit the MegaGlest wiki: http://docs.megaglest.org/

My personal projects: http://github.com/KatrinaHoffert

Mr War

  • Guest
Re: Blender --Help Center--
« Reply #203 on: 16 January 2011, 22:39:06 »
Thanks, I had no idea about the frames. I am new to Blender/Glest so this is all trial and error. I updated the frames etc.

The building is completely made in Blender (I gave up trying to texture imported sketchup models) and is just a test for scale/skins etc. I haven't played with the normals yet, although I just applied the blender auto-recalc off the back of your comment.

Blend file: http://www.mediafire.com/?3t8gq3wrkvux7vb
XML (latest) http://www.mediafire.com/?fnvc07hpj0du0bn

I have:
python 2.6
python 2.7
python 3.1

Yggdrasil

  • GAE Team
  • Ornithopter
  • ********
  • Posts: 408
    • View Profile
Re: Blender --Help Center--
« Reply #204 on: 17 January 2011, 00:13:34 »
I'm not sure what you mean by the whole output. :-[     It does output an XML now that i looked for that. I uploaded the XML here.

No, not the xml. You posted a screenshot of the console showing some (error) messages/output of blender and the export script. I just want to have the whole thing as your screenshot misses some interesting parts.

You can convert the xml manually but the converter is just a command line tool and needs to have g3d.dtd in the same working directory. So, this is just a workaround.

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: Blender --Help Center--
« Reply #205 on: 18 January 2011, 00:00:16 »
Exported fine for me. Oddly, it threw a bunch of indices errors, but still exported the model, which works fine. Again, you suffer the problem that you did not include your texture, so that could not be linked, but here's what I got:

Image:


Download G3D



Issues: You never sent the texture, so I could not link that, as well, I'm not sure about the size of the model. Seems very big.
Edit the MegaGlest wiki: http://docs.megaglest.org/

My personal projects: http://github.com/KatrinaHoffert

Mr War

  • Guest
Re: Blender --Help Center--
« Reply #206 on: 18 January 2011, 18:51:28 »
Yggdrasil, the output is:

running glexemel
['C:\\Users\\admin\\AppData\\Roaming\\Blender Foundation\\Blender\\.blender\\scr
ipts\\xml2g.c', 'C:\\Users\\admin\\AppData\\Roaming\\Blender Foundation\\Blender
\\.blender\\scripts\\tmp.xml', 'C:\\Users\\admin\\Documents\\GLEST\\Models\\Test
Garrison1.g3d']
Traceback (most recent call last):
  File "C:\Users\admin\AppData\Roaming\Blender Foundation\Blender\.blender\scrip
ts\g3d_xml_exporter_v1.1.py", line 500, in fs_callback
    p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
  File "C:\Program Files\Blender Foundation\Blender\subprocess.py", line 595, in
 __init__
    errread, errwrite)
  File "C:\Program Files\Blender Foundation\Blender\subprocess.py", line 804, in
 _execute_child
    startupinfo)
WindowsError: [Error 193] %1 is not a valid Win32 application

How do I do it via command line?

Yggdrasil

  • GAE Team
  • Ornithopter
  • ********
  • Posts: 408
    • View Profile
Re: Blender --Help Center--
« Reply #207 on: 18 January 2011, 19:54:08 »
Ehh, please remove any .c or .h file in the scripts folder. These are the C source files and aren't needed. It confuses the export script because it thinks xml2g.c is the binary of the converter. You only need xml2g.exe, all dll files which came with glexemel and g3d.dtd.

Or reinstall the converter. Get http://www.glest.org/files/contrib/tools/glexemel_win32_0.1a.zip and copy all files from the bin folder in the scripts folder of blender. Make sure there's only the file xml2g.exe starting with xml2g, no other file.

Maybe we should provide a newer all-in-one package for windows. xml2g doesn't need all these libraries, just libxml2 (i'm puzzled how Qt got there).

Mr War

  • Guest
Re: Blender --Help Center--
« Reply #208 on: 18 January 2011, 20:55:32 »
Thanks Yggdrasil, removing the .C files did the trick. :D

However now I put the model in the game (GAE) I have a skin complaint...

(note I swapped out the castle.g3d in Hagekura's excellent Japanese Mod which is a fav of mine at the moment)
The g3d is here http://www.mediafire.com/?nykgfovsdp6md9c

Any suggestions what I've done wrong?
« Last Edit: 18 January 2011, 21:15:41 by Mr War »

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: Blender --Help Center--
« Reply #209 on: 18 January 2011, 22:03:51 »
Edit the MegaGlest wiki: http://docs.megaglest.org/

My personal projects: http://github.com/KatrinaHoffert

Mr War

  • Guest
Re: Blender --Help Center--
« Reply #210 on: 18 January 2011, 22:58:21 »
ah, I hadn't saved the linked files in the appropriate folder. Sorry to be so inept but slowly getting there.
« Last Edit: 24 January 2011, 22:11:33 by Mr War »

Hagekura

  • Archmage
  • ******
  • Posts: 524
    • View Profile
    • Hageus_Iaponicus(@Hageus_Hagekura)さん | Twitter
Re: Blender --Help Center--
« Reply #211 on: 19 January 2011, 02:31:16 »
Hi,war.
Your building models looks elegant.glad to see another potential glest modder friend.
btw What kind of mod are you planning to create? historical?fantasy,sci-fi?or something completely new? :|
Bushido to iu wa shinu koto to mitsuketari.

Japanese Faction Mod

will

  • Golem
  • ******
  • Posts: 783
    • View Profile
Re: Blender --Help Center--
« Reply #212 on: 19 January 2011, 12:52:10 »
https://forum.megaglest.org/index.php?topic=6437.0

The script in this thread shows how to load G3D models in pure python; it ought to be straightforward to also export G3D models in pure python, rather than going via the XML and an external tool...


Mr War

  • Guest
Re: Blender --Help Center--
« Reply #213 on: 19 January 2011, 17:29:57 »
Hi,war.
Your building models looks elegant.glad to see another potential glest modder friend.
btw What kind of mod are you planning to create? historical?fantasy,sci-fi?or something completely new? :|
Thanks!
I am toying with starting a 'learning mod' along the lines of medieval Europe but with fantastic contraptions added in, like flying machines etc. So not accurate historical, but less fantasy as say the Magic faction. I have so much to learn though, but everyone is so helpful so there's hope yet! I also thought of doing ancient/medievil China.

Mr War

  • Guest
Re: Blender --Help Center--
« Reply #214 on: 19 January 2011, 23:20:06 »
What color do you use on TGAs to show as team color?

John.d.h

  • Moderator
  • Airship
  • ********
  • Posts: 3,757
  • I have to go now. My planet needs me.
    • View Profile
Re: Blender --Help Center--
« Reply #215 on: 19 January 2011, 23:35:26 »
What color do you use on TGAs to show as team color?
Alpha/transparency.  In case you don't know how to do that, just add an alpha channel and erase the area you want to make into alpha.  Partial transparency also works, making things partial team color -- useful for making it darker or adding detail to it.

-Archmage-

  • Moderator
  • Dragon
  • ********
  • Posts: 5,887
  • Make it so.
    • View Profile
    • My Website
Re: Blender --Help Center--
« Reply #216 on: 21 January 2011, 02:53:09 »
What color do you use on TGAs to show as team color?
Alpha/transparency.  In case you don't know how to do that, just add an alpha channel and erase the area you want to make into alpha.  Partial transparency also works, making things partial team color -- useful for making it darker or adding detail to it.

To add an Alpha channel in GIMP simply right click in the layers box and click 'Add Alpha Channel'. ;)
Egypt Remastered!

Proof: Owner of glest@mail.com

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: Blender --Help Center--
« Reply #217 on: 21 January 2011, 03:48:02 »
Also, for Paint.NET, the eraser does that, and there's a number of plugins to give further control over transparency. Partial transparency can be given by making your primary color partially transparent, which controls the strength of the eraser. The black and white checkerboard pattern is the universal sign for transparency.
Edit the MegaGlest wiki: http://docs.megaglest.org/

My personal projects: http://github.com/KatrinaHoffert

ElimiNator

  • Airship
  • ********
  • Posts: 3,391
  • The MegaGlest Moder.
    • View Profile
Re: Blender --Help Center--
« Reply #218 on: 3 March 2011, 06:20:23 »
There is a typo in the first post:
Here is a simple video about making a hut in blender, amde by Eliminator.
Get the Vbros': Packs 1, 2, 3, 4, and 5!

wecl0me12

  • Guest
texture does not work
« Reply #219 on: 22 March 2011, 00:51:02 »
I was trying to do a multicolored cube cube, using the starting cube and with these instructions:
http://glestguide.co.cc/blender_tutorial2.php

I used 6 different solid colors for the sides- and even though it looks correct in texture mode, when I export it to g3d it becomes this:



I have never drew those circles. I drew solid colors, however, that's what is happening.

-Archmage-

  • Moderator
  • Dragon
  • ********
  • Posts: 5,887
  • Make it so.
    • View Profile
    • My Website
Re: Blender --Help Center--
« Reply #220 on: 22 March 2011, 01:25:29 »
You're using the GAE G3D viewer I assume. That's the default texture GAE uses if it can't read/find the texture file.

Make sure you have the texture file in the same folder as the G3D file.
Egypt Remastered!

Proof: Owner of glest@mail.com

Mr War

  • Guest
Re: Blender --Help Center--
« Reply #221 on: 25 April 2011, 06:33:13 »
Ha! Skimming the last few pages of this thread reminds me how much help I've received getting to where I am now. I'm sure threads like this took months off my first mod.

I'm going to try to add bumb maps to some units, anyone know how to do that it blender in such a way that it works in MG and GAE?

-Archmage-

  • Moderator
  • Dragon
  • ********
  • Posts: 5,887
  • Make it so.
    • View Profile
    • My Website
Re: Blender --Help Center--
« Reply #222 on: 25 April 2011, 16:16:19 »
Ha! Skimming the last few pages of this thread reminds me how much help I've received getting to where I am now. I'm sure threads like this took months off my first mod.

I'm going to try to add bumb maps to some units, anyone know how to do that it blender in such a way that it works in MG and GAE?

I thought you were all about performance, bump maps are costly. You can do fake bump maps in GIMP(0 cost to performance), or get in touch with silnarm because I believe he knows how to turn diffuse textures(regular) into real bump maps. Also I do not believe MG supports bump or specular mapping at this time...
Egypt Remastered!

Proof: Owner of glest@mail.com

will

  • Golem
  • ******
  • Posts: 783
    • View Profile
Re: Blender --Help Center--
« Reply #223 on: 25 April 2011, 18:52:22 »
I'm going to try to add bumb maps to some units, anyone know how to do that it blender in such a way that it works in MG and GAE?

Unsure how to make the bumpmap.

In the G3D format there is support for multiple textures, including mtNormal.  Whilst I can see that some generic load code in MG does do stuff (computeTangents()) based on this, I can't spot it otherwise being used.  MG also tries alternative extensions for images that it cannot load.

In GAE, I think it ignores any bumpmap specified in the G3D file.  Instead, it looks for a file with the same name as the diffuse texture but with _normal injected 4 characters from the end, e.g. worker.png would be worker_normal.png.  The file extension must be the same, and its best if the extension is 4 characters long.

Neither seem to try hard to cope with case-insensitive filenames on *nix.

It occurs to me that this has to be tidied up in the merge - I favour the engine using exactly as specified in the G3D file and nothing else, but coping with case-insensitive filenames on platforms that are case-sensitive.  (My Python scripts do have code to do a case-insensitive search; it's quite do-able).

So please make bumpmaps with _normal in their name, and then post screenshots of before-and-after side-by-side!

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: Blender --Help Center--
« Reply #224 on: 25 April 2011, 20:09:29 »
This here is the best normal map plugin I've ever used:
http://tinyurl.com/3lfkgn8

Example of Tech's castle bump map:


Very versatile, works flawlessly.
« Last Edit: 27 April 2011, 01:36:31 by Omega »
Edit the MegaGlest wiki: http://docs.megaglest.org/

My personal projects: http://github.com/KatrinaHoffert

 

anything