Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Texture, Model & Animation Help How would I import this?
cruisy18 Offline
Junior Member

Posts: 24
Threads: 2
Joined: Jun 2013
Reputation: 0
#1
How would I import this?

Okay, so I'm currently working on a model made from scratch in Blender. Here is a screenshot of what I have so far:

[Image: ybui.png]

Now, I have a few concerns:

1. How am I going to uv map this thing correctly?
2. How am I going to import the full collada into HPL2 editor?

The chains are separate objects in Blender, and I have no idea how I'm going to place the torch onto the torch holder, and then uv map it properly, without it getting messy.

I'd prefer to export this as one collada for good workflow in Level Editor, but I have no idea how I'm going to achieve this.

Any help would be greatly appreciated!
07-24-2013, 08:03 AM
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#2
RE: How would I import this?

(07-24-2013, 08:03 AM)cruisy18 Wrote: 1. How am I going to uv map this thing correctly?

That's up to you and how you mark the seams or bake the textures.

(07-24-2013, 08:03 AM)cruisy18 Wrote: 2. How am I going to import the full collada into HPL2 editor?

All you need to know is that one Blender (default) unit is one meter in game.

Tutorials: From Noob to Pro
07-24-2013, 08:50 AM
Website Find
WALP Offline
Posting Freak

Posts: 1,221
Threads: 34
Joined: Aug 2012
Reputation: 45
#3
RE: How would I import this?

Ah yes I had some old text on blender to HPL2 lying around on my pc, let me copy paste this for you:


1. Your model must be triangulated(converted to triangles) before you export it.
Hold CTRL + F while in edit mode to make a menu with options for faces appear and click on the triangulate option
2.before exporting your model must have a blender internal render type material(so no cycles) assigned to it,just leave it at default for the material settings or perhaps tone down the spec if it gets annoying while editting. REMEMBER: only one material per object or crash.
3.Before exporting you model it must have a texture assigned to it, with UV cordinates. so make sure to set it to UV cordinates under mapping in the texture tab. only one texture per object as well.
4. make sure your object is at the center when you export. you can do that by first holding SHIFT + S and clicking cursor to center, and then doing the same but clicking selection to cursor instead.
This step is not necesary but your objects pivot point/origin will be at the center when exported to amnesia so it can get hard to work with if you dont do this step.
5. Apply scale rotation and location of your object by going to the apply menu by holding down CTRL + A and rest is self explanatory. this step is not necesary but it will prevent you model from being rotated, scaled or offset in amnesia.
6.Make sure your face normals are right before exporting or you will have what looks like holes in yout object in amnesia. If you click N to bring forth the navigation menu you will find an option called "Backface Culling" under display, this will only render the front of your objects faces just like in amnesia.
To fix a face that is facing the wrong way select it in edit mode, hit W to bring up the specials menu and click "flip normals".

EXPORT:
1.Go to file -> Export -> Collada (Default) (.dae)
2. find the desired location to export your model to. it must be within the amnesia folder.
3.Name your model, it is recommended that give its name an extension iconic to your CS/Mod so amnesia doesent mess up if someone has a mod with another object under the same name. Fx if you had a CS/Mod called banana attack with a chair you would name it chair_ba.dae, rather then chair.dae which would likely be messed up with another chair.
4.Before exporting there is some settings in the lower left corner I would like to go through:

Apply modifiers: applies your modifiers automatically, though I recommend doing everything manually before exporting since you cant always rely on these automatic feutures.

Selection Only: makes it so that only your selected objects are exported, I always use this option but you can work without it if you delete everything but what you are exporting from your scene. I like to have some lights around though so I find that unpractical.

Include Children: dunno exacly what this does but in terms of amnesia exporting this should always be unchecked.

Inlclude armatures: this is for exporting rigged models with skeletons, which are called armatures in blender. as far as I know no one has been able to export animated models from any other software then maya so I dont think you will ever need this option checked.

Inlcude Shape Keys: amnesia does not support shape keys only skeletons so this should be unchecked. mostly its not necesary to uncheck it though since mostly you wont even have any shape keys on you model.

Only Active UV layer:this should be unchecked

Include UV textures: this option is lethal, it will write what textures your model is using into the collada file, if you dont use this check box amnesia will likely crash.

Include material textures: uncheck this, amnesia is only UV textures.

Copy: Whether you are going to use this or not depends on where your textures are stored. if you have texture from outside the Amnesia/redist folder assigned to your model when exporting you should check this option. it will copy your textures to the location you are exporting to. if you already have your textures in the right location leave this unchecked.

Deform bones only: uncheck this

Export for second life: uncheck this

Use object indtances: not exacly 100% sure about this option but I have allways had it checked with no problems at all.

Sort by object name: always had this unchecked, but I dont know if it means anything. you can try and see for yourself if you feel experimental.
07-24-2013, 08:58 AM
Find
cruisy18 Offline
Junior Member

Posts: 24
Threads: 2
Joined: Jun 2013
Reputation: 0
#4
RE: How would I import this?

(07-24-2013, 08:50 AM)Your Computer Wrote:
(07-24-2013, 08:03 AM)cruisy18 Wrote: 1. How am I going to uv map this thing correctly?

That's up to you and how you mark the seams or bake the textures.

(07-24-2013, 08:03 AM)cruisy18 Wrote: 2. How am I going to import the full collada into HPL2 editor?

All you need to know is that one Blender (default) unit is one meter in game.

Thanks for replying. Though, an issue I'm encountering is that the HPL2 model viewer only imports one object inside the collada. Does a collada with HPL2 need to be one object and one object only?

(07-24-2013, 08:58 AM)The Mug Wrote: Ah yes I had some old text on blender to HPL2 lying around on my pc, let me copy paste this for you:

Thanks for this. Not exactly what I was asking for, but definitely helpful and actually resolved another issue I had ran into!
07-24-2013, 09:26 AM
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#5
RE: How would I import this?

(07-24-2013, 09:26 AM)cruisy18 Wrote: Does a collada with HPL2 need to be one object and one object only?

No, you can have multiple meshes in one DAE file.

Tutorials: From Noob to Pro
07-24-2013, 10:47 AM
Website Find
cruisy18 Offline
Junior Member

Posts: 24
Threads: 2
Joined: Jun 2013
Reputation: 0
#6
RE: How would I import this?

(07-24-2013, 10:47 AM)Your Computer Wrote:
(07-24-2013, 09:26 AM)cruisy18 Wrote: Does a collada with HPL2 need to be one object and one object only?

No, you can have multiple meshes in one DAE file.

Hmmm... but HPL2 model viewer only recognizes one object. If I create more meshes inside that 1 object, model viewer recognizes it, but if I get out of edit mode in Blender, and add a new mesh as a new object, model viewer won't detect this new object when export it as a collada.

Is this how it's supposed to be?
(This post was last modified: 07-24-2013, 10:59 AM by cruisy18.)
07-24-2013, 10:57 AM
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#7
RE: How would I import this?

(07-24-2013, 10:57 AM)cruisy18 Wrote: Hmmm... but HPL2 model viewer only recognizes one object. If I create more meshes inside that 1 object, model viewer recognizes it, but if I get out of edit mode in Blender, and add a new mesh as a new object, model viewer won't detect this new object when export it as a collada.

Is this how it's supposed to be?

That's not how it is supposed to be, but i wouldn't recommend the model viewer for testing out your models, only for generating material files for your models. Before exporting you should be applying location, rotation and scale to all your meshes. You should also be triangulating your meshes before export. And on export making sure you have the correct export settings checked.

Further reading: http://wiki.frictionalgames.com/hpl2/thi...3d/blender

Tutorials: From Noob to Pro
07-24-2013, 11:17 PM
Website Find
cruisy18 Offline
Junior Member

Posts: 24
Threads: 2
Joined: Jun 2013
Reputation: 0
#8
RE: How would I import this?

(07-24-2013, 11:17 PM)Your Computer Wrote:
(07-24-2013, 10:57 AM)cruisy18 Wrote: Hmmm... but HPL2 model viewer only recognizes one object. If I create more meshes inside that 1 object, model viewer recognizes it, but if I get out of edit mode in Blender, and add a new mesh as a new object, model viewer won't detect this new object when export it as a collada.

Is this how it's supposed to be?

That's not how it is supposed to be, but i wouldn't recommend the model viewer for testing out your models, only for generating material files for your models. Before exporting you should be applying location, rotation and scale to all your meshes. You should also be triangulating your meshes before export. And on export making sure you have the correct export settings checked.

Ah ok. I brought the collada into Model Editor, and the thing was huge! And, the chains were not in the right position, but were hiding inside the torch holder object. I discovered this because I scaled down the object (not the chains) to 0.2.

Even though I brought in the collada of Amnesia's torch holder into Blender, and scaled my model down to around that size, it was huge when I imported it into Model Editor. But, I think I know why: probably because, inside Blender, I most likely scaled my model down in object mode, rather than edit mode. The chains were the right size inside Model Editor, and I had scaled them down in edit mode as the modifiers would not have worked properly if I scaled them down in object mode.

Well, now I know that I can safely import a collada with different objects into HPL2, and what to avoid.

Thank you guys for your help, once again!

Oh, though, one more question. Is there an option inside Blender where I can restore the original object size of an object, so then I can go into edit mode, and scale it down correctly? Otherwise, I might have to remodel it.
07-25-2013, 01:04 AM
Find
WALP Offline
Posting Freak

Posts: 1,221
Threads: 34
Joined: Aug 2012
Reputation: 45
#9
RE: How would I import this?

(07-25-2013, 01:04 AM)cruisy18 Wrote:
(07-24-2013, 11:17 PM)Your Computer Wrote:
(07-24-2013, 10:57 AM)cruisy18 Wrote: Hmmm... but HPL2 model viewer only recognizes one object. If I create more meshes inside that 1 object, model viewer recognizes it, but if I get out of edit mode in Blender, and add a new mesh as a new object, model viewer won't detect this new object when export it as a collada.

Is this how it's supposed to be?

That's not how it is supposed to be, but i wouldn't recommend the model viewer for testing out your models, only for generating material files for your models. Before exporting you should be applying location, rotation and scale to all your meshes. You should also be triangulating your meshes before export. And on export making sure you have the correct export settings checked.

Ah ok. I brought the collada into Model Editor, and the thing was huge! And, the chains were not in the right position, but were hiding inside the torch holder object. I discovered this because I scaled down the object (not the chains) to 0.2.

Even though I brought in the collada of Amnesia's torch holder into Blender, and scaled my model down to around that size, it was huge when I imported it into Model Editor. But, I think I know why: probably because, inside Blender, I most likely scaled my model down in object mode, rather than edit mode. The chains were the right size inside Model Editor, and I had scaled them down in edit mode as the modifiers would not have worked properly if I scaled them down in object mode.

Well, now I know that I can safely import a collada with different objects into HPL2, and what to avoid.

Thank you guys for your help, once again!

Oh, though, one more question. Is there an option inside Blender where I can restore the original object size of an object, so then I can go into edit mode, and scale it down correctly? Otherwise, I might have to remodel it.
seems you figured it out your self but for the sake of other people reading and just to be safe let me highlight this bit from my previous copy-paste:
"5. Apply scale rotation and location of your object by going to the apply menu by holding down CTRL + A and rest is self explanatory. this step is not necesary but it will prevent you model from being rotated, scaled or offset in amnesia."
07-25-2013, 07:04 AM
Find




Users browsing this thread: 3 Guest(s)