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
Help export my model
OneEtched Offline
Junior Member

Posts: 1
Threads: 1
Joined: Feb 2013
Reputation: 0
#1
Help export my model

I have recently made a model for someone in blender. I would like to know how to export it as a file that can be opened in the HPL Level Editor. Please help

Here is the .blend file (DIRECT DOWNLOAD): http://www.tylermcintyler.com/downloads/...tton.blend
02-25-2013, 04:16 AM
Find
darkely Offline
Posting Freak

Posts: 984
Threads: 87
Joined: Dec 2011
Reputation: 10
#2
RE: Help export my model

Try looking at this: http://wiki.blender.org/index.php/Doc:2....rt/COLLADA

Models are not my strong point Sad

02-25-2013, 04:26 AM
Find
Rapture Offline
Posting Freak

Posts: 1,078
Threads: 79
Joined: May 2011
Reputation: 30
#3
RE: Help export my model

Explain the steps your doing, and if your confused on what step I'm listing, tell me and we can work it out. (Btw I'm using Blender 2.63)
P.S. - Next time these kind of help support questions go in the "Development Support" forum subsection.

--Preperation--
(1) Make sure the model is triangulated (All triangles, no 4-side faces or higher. Select all the faces and do Ctrl + T)

(2) Make sure in your materials + textures tab, you have your textures assigned properly to your model. (In the simplistic form, F12 and see if your model renders the way you want.)
(2a) Make sure the materials/textures you have assigned are in the same folder location as your BLENDER FILE is in, so they are exported correctly to your destination without you having to manually do it. (Note: It seems bug out for me, so you might have to do it manually anyways.)

(3) While in "Object Mode" do Ctrl + A to bring up a pop-menu (while in the 3D viewport). Select "Location", "Rotation", and "Scale".

(4) Align your model so the bottom is flush along the Red/Green (X & Y Axes), and is in the center of the Blue (Z Axis)


--Exporting--
I'm not the best person at this, but I know my steps will work if I do them myself. Some steps might be redundant and unnecessary because I've had problems in the past, so I do them out of paranoia.

(1) I select the object(s) I am going to export and move them to a different layer. (In the right side, where the tabs are. Their is a orange looking box called "Object", down below is a tab called "Relations" in their is two sets of small squares stacked together at 6 rows by 2 columns. On the left side, click the box to the right of the top left box.)
(1a) Back in the 3D Viewport, near the bottom is some tools and what nots. You will see some very look alike boxes, click the same box that you selected on the right side, at step 1. (It should have a orange dot in it.)

(2) Select your model and go to File > Export > COLLADA (.dae)
(2a) Place this in a folder that you can find. (Let's say this is a static_object, I would make a folder in your CS called "static_objects" and within that folder "ENTER YOUR NAME :: EXAMPLE RAPTURE" inside make another folder the name of the object you are going to export, and finally in their your object goes inside this folder.
I find this a good way to make sure you don't forget to include the object when you send out your CS. Just make sure to copy this into your Amnesia > static_objects folder later, so you can use it yourself.


--Modifying--
(1) In your Amnesia Root, open up the "ModelView" program. Click "Load Model" and find the ".dae" object you exported in whatever folder you put it in.

(2) If it crashes, we'll need to go over the steps again. (Starting from the top.)
(2a) If it doesn't, check to make sure their are no funny misshapen faces and see if your textures are applied. If you have a simple diffuse, and see it, then you are fine and can skip to "--Finalize--"

If you don't see it, it means either the texture isn't in the same folder or the .mat has a problem.

(2b) So first thing first, make sure the texture is in the same folder.
(2c) In that same folder, their should be a file with the extension ".mat". Open it up.

It should look something like this...

Spoiler below!
<Material>
<Main DepthTest="True" PhysicsMaterial="Default" Type="SolidDiffuse" />
<TextureUnits>
<Diffuse AnimFrameTime="" AnimMode="" File="RockWelder1_diff.dds" Mipmaps="true" Type="2D" Wrap="Repeat" />
<Specular AnimFrameTime="" AnimMode="" File="RockWelder1_norm.png" Mipmaps="true" Type="2D" Wrap="Repeat" />
<NMap AnimFrameTime="" AnimMode="" File="RockWelder1_ao.png" Mipmaps="true" Type="2D" Wrap="Repeat" />

</TextureUnits>
<SpecificVariables>
<Var Name="HeightMapScale" Value="0.05000000074505806" />
<Var Name="HeightMapBias" Value="0" />
<Var Name="FrenselBias" Value="0.20000000298023224" />
<Var Name="FrenselPow" Value="8" />
<Var Name="AlphaDissolveFilter" Value="false" />
</SpecificVariables>
</Material>

(2d) High chances are that you will not see the stuff in the "<TextureUnits> </TextureUnits" like what I have in mine.

(2e) I have
BOLDED the start and end to what you should copy[/b]. In your mat file, you should see "<TextureUnits></TextureUnits>" just paste it over it. It should basically look like what I have described above.

(2f) Now delete what I have
UNDERLINED from your mat file. So now you only have the "diffuse" part.

(2g) Inside is the File="RockWelder1_diff.dds" replace what is in the Quotation Marks "RockWelder1_diff.dds" with the name of the texture you have assigned to your model, which should be in the same folder as your exported model.

(3) If you have some Spec / AO / or other maps. Then we'll probably have to do some more work. (If you do, tell me, and I'll list out additional steps. You can look above at the pictures in the spoilers tags if you can figure it out yourself.)


--Finalize--
(1) If it showed up dandy fine in the ModelView, you can close it down.

(2) Go to your Amnesia Root folder again and open up the "ModelEditor". Go to File > Import Mesh and find your ".dae" file which you have been using this whole time.

(3) I picked out static object because it's the easiest thing to do. Just do a Save As and your done with the model. (Only entities need meshes attached to them, static_objects use the face as mesh so their is no work to be done.)

(4) Make sure you have a copy, or already in the folder, in your Amnesia Root > static_objects. Open up your Level Editor and it should be in the static_objects.


Hope that helps! Smile
(This post was last modified: 02-25-2013, 05:35 AM by Rapture.)
02-25-2013, 05:30 AM
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#4
RE: Help export my model

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

Pretty much those steps. If you're using Blender 2.64 or later (recommended!), make sure "Include UV Textures" is checked if you're using external textures; "Include Material Textures" if you created your own textures in Blender; and make sure "Copy" is checked.

The model viewer crashing shouldn't be an issue so long as it generates an HPL material file and if the level editor doesn't crash.

Tutorials: From Noob to Pro
02-25-2013, 10:20 AM
Website Find




Users browsing this thread: 1 Guest(s)