Blender file ínto MED

Posted By: hallohallo

Blender file ínto MED - 01/23/17 17:01

Hi there,
I modelled a house in Blender and now want to use it in gamestudio. The Problem is: If I Export it as wavefront object and then Import it from the med the Skins dissapear. So far so good, but when i create the model in the script they are still gone. Please help im so done and frustrated...
Posted By: CocaCola

Re: Blender file ínto MED - 01/23/17 17:36

if you wont keep yout groups and textures, you can export to 3ds if you want keep animation with textures without groups you have to export fbx and chose ascci 6.1
Posted By: hallohallo

Re: Blender file ínto MED - 01/23/17 17:49

thx for your help. where do i have to Chose ascci 6.1? I tried it with Import fbx (2010)(propably not what u meant) and he told me that "the Skin size (1131 x 1700) is not a power of two!"
Posted By: Reconnoiter

Re: Blender file ínto MED - 01/23/17 18:16

Originally Posted By: hallohallo
thx for your help. where do i have to Chose ascci 6.1? I tried it with Import fbx (2010)(propably not what u meant) and he told me that "the Skin size (1131 x 1700) is not a power of two!"
, textures of models should be a power of two, so e.g. 32x32, 128x128, 256x256, 256x512, 512x512, 1024x256, 1024x1024 etc etc. So resize or crop your texture to power of two, than in Blender export as fbx and in MED import as fbx (2010).
Posted By: hallohallo

Re: Blender file ínto MED - 01/23/17 18:54

ok that worked but the result is really horrible.
how do i post a Picture from my Computer?
Posted By: CocaCola

Re: Blender file ínto MED - 01/23/17 19:01

[print] buton on the keyboard> ctrl + v in gimp and upload it somewere
Posted By: hallohallo

Re: Blender file ínto MED - 01/23/17 19:06

yea but how do i post it in the Forum grin
Posted By: Reconnoiter

Re: Blender file ínto MED - 01/23/17 19:38

Originally Posted By: hallohallo
yea but how do i post it in the Forum grin
, upload your image to e.g. Imgur (very easy to use) or some other upload site, than copy&paste the image link here tongue
Posted By: hallohallo

Re: Blender file ínto MED - 01/24/17 07:32

The problem is that the hole object is brown. Why can that be? It should look wooden and some parts white and red etc. In the skin manager just the wood skins appear. And can a reason be the mapping type (generated). In blender render everything looked fine...
Posted By: Reconnoiter

Re: Blender file ínto MED - 01/24/17 10:38

Hi,

First do 'file' -> 'engine preview', use that to check how it would look rendered.

In the skin editor, do see you only 1 skin (the wooden) or do see also other skins? Incase you see other skins something with the uv/texture mapping probably went wrong. Otherwise you either forgot to click the skins on importing or they are not linked or set correctly in Blender or such.
Posted By: hallohallo

Re: Blender file ínto MED - 01/24/17 19:21

hey thank you for ur help.
when i do engine preview he Shows me following error: Malfunction W1301: "-S: Can't open file". He's still showing something however and the shape is right, but everything that has the Wood texture for example is Brown and the Skins without an Image are not shown ( or to be more precise they are shown as White). In the Skin Manager i adjusted the wood Skins (with Image; linked it with the bmp). There are also other Skins but they are foreshadowed Grey even though they have the right "diffuse" under manage Skins.
Posted By: Reconnoiter

Re: Blender file ínto MED - 01/25/17 10:14

Hi,

When you search for that malfunction (W1301) in the gamestudio manual it shows this: "Warning W1301: Can't open file
The given file was not found in the path or resource.". So I quess MED somehow couldn't import the skins correctly. Not sure but here are a few ideas:
- have you tried to manually add / replace the textures in MED in the skin editor? If that doesn't work or if MED gives an error, something is mostly likely wrong the textures themselves.
- what is the file extension of the textures (.bmp?)? And what are the resolution/size of them?
- You can try exporting the model in Blender as .obj/wavefront and them import it in MED as .obj/wavefront (be sure to check if the exported textures are in the same folder as the model).
Posted By: hallohallo

Re: Blender file ínto MED - 01/25/17 15:27

Hi,
I tried replacing them but no change.
- It's bmap 1024x1024
- for your last tipp: i tried it but the Skins were simply empty. -> plus everything White again
Posted By: Reconnoiter

Re: Blender file ínto MED - 01/26/17 12:51

In the fbx import window in MED, does it list all the textures used by the model?

This is how I personally do it (maybe it helps). I create the model in Blender, create and assign materials and set the textures (the textures are already located in my game project folder -> same folder as where I put my .mdl models). Than I do export it as fbx in Blender and Import -> Model from FBX (2010) in MED.
Posted By: hallohallo

Re: Blender file ínto MED - 01/27/17 15:55

I tried it on another Laptop (just downloaded blender on that one). Not with my model but with a simple cube with 1 green material. As wavefront obj it has a texture under "manage Skins" but as fbx the material wasn't shown at all(not even in the Import Manager). So now my question:
WAT AM I DOING WRONG cry tired
Could it be some Settings in blender, med, etc.?
Posted By: Reconnoiter

Re: Blender file ínto MED - 01/27/17 16:37

I had this once with an glow texture and than I fixed it by setting it in Blender under Influence (go to the texture attached to the material and scroll down till you see Influence) and either mark it as 'Color' for standard/diffuse textures or 'Normal' for normals and glow textures etc. Iirc that forces it to be visible in MED's import window.

If that isn't it than post a download link to your model here or post some screenshots cause this is a bit a shot in the dark.
Posted By: hallohallo

Re: Blender file ínto MED - 01/31/17 19:18

Ok so here are the screenshots of

- How it Looks in blender (rendered): http://i.imgur.com/c4bRlQi.png

- the material with the Skin:
http://i.imgur.com/yYGfiTk.png

- the material with the wall colour:
http://i.imgur.com/XTRVA2K.png

- the 2 most important materials:
http://i.imgur.com/vc4qc7Q.png

- the model in the med:
http://i.imgur.com/Elp4XXD.png

- the Skin legend under manage Skins:
http://i.imgur.com/D5SKySR.png

- the Skin Settings:
http://i.imgur.com/POUnSsj.png

and the model opened in the Code:
http://i.imgur.com/gD5tOKl.png

I hope it helps
Posted By: Reconnoiter

Re: Blender file ínto MED - 02/01/17 10:27

It seems to me that the Besch material atleast works, but the wood one doesn't. What I dont understand is though, you said you couldn't see the textures in the fbx import window but in your screenshot in the skin settings there are ~21 skins?! Have you added those manually? Instead of adding skins, have you tried replacing the wood one in Med (skinsettings -> 'click the original wood texture' -> skinsettings -> texture file -> ...) to see if that works? And just to be sure, select the wooden parts of the model and than select the wooden texture in the skin editor and do 'set skin'.
Posted By: Turrican

Re: Blender file ínto MED - 02/01/17 14:24

Hello hallohallo,

maybe I might jump in here. I also had quite a few problems with exporting models from Blender to MED, so I thought I might just post my complete workflow. I'll keep it simple and won't use Blender's Material settings for this approach. I hope this helps you anyway.



1. Create your model in Blender. Open the UV/Image Editor in a second viewport and start unwrapping. Make sure that Viewport Shading is set to 'Texture' for your 3D Viewport. Now select all the faces that will get one and the same texture. In my example this would be all the outer walls. Hit Image > Open Image in the UV/Image Editor and select your desired texture. Make sure that it's in a format readable by the engine and has a power-of-two size. I picked an ugly brick texture for this example. You'll then immediately see your texture appear on all the selected surfaces. At this point you'd normally start to tweak scale and layout of your textures by editing your UVs. You'll see the results in the 3D Viewport. Repeat this for all untextured surfaces left.



2. Export your stuff: Go back to object mode, select all the objects you want to be exported and hit File > Export > FBX. Set the exporter version to "FBX 6.1 ASCII" (as other people here already pointed to). Also check "Selected Objects" in case you only want to export certain models in your scene. Enter a filename and hit 'Export FBX'.



3. Import your stuff: Fire up MED, select File > Import > Model from FBX (2010). Select your file.



4. In the import settings window uncheck 'scene: "Default Take"'. These are the animation frames that Blender automatically creates for you, usually 250 frames long. Don't need that for a static model. I usually also set the 'scale factor' to 100, but that's up to you and your game's overall scale ratio. Now click 'OK'.



5. MED should automatically import the textures you used. If not, go to Object > Manage Skins and assign your textures to all the skin layers. You may also want to edit the Material Settings for each layer - in case you need to. I personally don't.



6. That's it!

I used this approach for a few hundreds of models, so I'm pretty sure it actually works. Perhaps this helps you finding the problem you had. laugh
Posted By: hallohallo

Re: Blender file ínto MED - 02/11/17 09:08

Hi Turrican,
Thanks for your help. IT FINALLY WORKS laugh
But how do i make the Windows now?
Posted By: Turrican

Re: Blender file ínto MED - 02/19/17 11:26

Hey,

glad I could help you! laugh

Regarding your question: You would normally use a single separate model for all your glass windows, which has several advantages over having just one big house model containing all these elements.
  • Separate models only get rendered when they are actually visible in the view frustum
  • You can easily assign different materials or shader effects to your models
  • Most importantly: You can assign unique actions to every single window plane for special behaviours. This way, you can let them do all the wild things windows usally do, i.e. make them shatter after being hit or let them swing open when the player touches them.

Simple approach, this time without fancy images:
  • Model a simple plane or a very flat cube for the glass part and export it, just the way you did with the house. Make sure it's at the center of your scene, so its origin is at zero. This makes placing it a lot easier.
  • Import that one it into MED and save it as a separate model. In case you want no special behaviours but just the glassy look, open up the skin settings, check "Effect Setup" and assign an appropriate shader. Are you using the default script templates? Then you would just go with the default material "Glass.fx" which should be located somewhere in your project folder (I hope that's correct; I'm not too familiar with the templates ^^).
  • Start up WED or GED (I recommend the latter, even though it tends to crash quite often), open the level with your house model, add several instances of the glass model and fit them all into your window frames.
  • Save, build, run - voilà!

And in case you do want a special behaviour later on, create a script action and assign it to your models in WED/GED. This action would normally also include a material/shader effect definition, so you don't have to configure this in MED.

I hope that was comprehensible enough. Please give it a try! laugh
© 2024 lite-C Forums