Trouble Getting Custom Props into Portal 2
Quote from lastnovember on August 1, 2011, 7:37 amHi there, I'm having a few issues.
When I try to open a custom prop in the Model Viewer I get an error saying: "Error loading model" and they don't work in Hammer at all. I couldn't find barely any examples of people trying to get custom props into Portal 2. Has anyone here successfully done this? Here's my workflow, maybe someone could tell me what I'm doing wrong.
I'm using the smd plugin for maya: http://developer.valvesoftware.com/wiki/Modifying_a_Source_Model_in_Maya
1. Create a cube in Maya.
2. Save in location: C:UsersHomeDocumentsmayaprojectsdefaultscenes - as "cube1"
3. Select model in Maya and go File/Export SMD. This creates a new SMD file: C:UsersHomeDocumentsmayaprojectsdefaultsmd - named "cube1.smd".
4. Duplicate this file and name it "cube1_collision.smd" and put it in the same folder and put a copy of idle.smd in the same folder.
5. Open up a new notepad and paste in:
- Code: Select all
$modelname "cube1cube1.mdl"
$cdmaterials "modelscube1/"$scale 1.0
$surfaceprop "Metal"$body "Body" "cube1.smd"
$sequence "idle" "cube1.smd" fps 30
$collisionmodel "cube1_collision.smd"
{
$mass 5
}6. In notepad: File/Save As
7. Save in: C:UsersHomeDocumentsmayaprojectsdefaultsmd
8. Save as type: All Files
9. File Name: cube1.qc
-----------------------------------------------
10. Open GUIStudioMDL
11. Go to: Config/Set EP1 Tools Path: C:Program Files (x86)Steamsteamappscommonportal 2bin
12. Go to: Config/Set Orange Box Tools Path: C:Program Files (x86)Steamsteamappscommonportal 2bin
13. Target Mod or "GameInfo" Path/Add: C:Program Files (x86)Steamsteamappscommonportal 2portal2gameinfo
14. Go to: File/Load QC File: C:UsersHomeDocumentsmayaprojectsdefaultsmd cube1.qc
15. Go to: Actions/Compile - This creates a new folder: C:Program Files (x86)Steamsteamappscommonportal 2portal2modelscube1
16. In that folder are 3 new files: cube1.dx90 - cube1.mdl - cube1.vvd
-----------------------------------------------
17. Open Steam/Library/TOOLS/Portal 2 Authoring Tools
18. In Portal 2 Authoring Tools open Model Viewer
19. In Model Viewer: File/Load Model
20. Open: [ROOT]modelscube1cube1.mdlWhen I do this I get an error message: "Error loading model". Does anyone know what I'm doing wrong?
Hi there, I'm having a few issues.
When I try to open a custom prop in the Model Viewer I get an error saying: "Error loading model" and they don't work in Hammer at all. I couldn't find barely any examples of people trying to get custom props into Portal 2. Has anyone here successfully done this? Here's my workflow, maybe someone could tell me what I'm doing wrong.
I'm using the smd plugin for maya: http://developer.valvesoftware.com/wiki/Modifying_a_Source_Model_in_Maya
1. Create a cube in Maya.
2. Save in location: C:UsersHomeDocumentsmayaprojectsdefaultscenes - as "cube1"
3. Select model in Maya and go File/Export SMD. This creates a new SMD file: C:UsersHomeDocumentsmayaprojectsdefaultsmd - named "cube1.smd".
4. Duplicate this file and name it "cube1_collision.smd" and put it in the same folder and put a copy of idle.smd in the same folder.
5. Open up a new notepad and paste in:
- Code: Select all
$modelname "cube1cube1.mdl"
$cdmaterials "modelscube1/"$scale 1.0
$surfaceprop "Metal"$body "Body" "cube1.smd"
$sequence "idle" "cube1.smd" fps 30
$collisionmodel "cube1_collision.smd"
{
$mass 5
}
6. In notepad: File/Save As
7. Save in: C:UsersHomeDocumentsmayaprojectsdefaultsmd
8. Save as type: All Files
9. File Name: cube1.qc
-----------------------------------------------
10. Open GUIStudioMDL
11. Go to: Config/Set EP1 Tools Path: C:Program Files (x86)Steamsteamappscommonportal 2bin
12. Go to: Config/Set Orange Box Tools Path: C:Program Files (x86)Steamsteamappscommonportal 2bin
13. Target Mod or "GameInfo" Path/Add: C:Program Files (x86)Steamsteamappscommonportal 2portal2gameinfo
14. Go to: File/Load QC File: C:UsersHomeDocumentsmayaprojectsdefaultsmd cube1.qc
15. Go to: Actions/Compile - This creates a new folder: C:Program Files (x86)Steamsteamappscommonportal 2portal2modelscube1
16. In that folder are 3 new files: cube1.dx90 - cube1.mdl - cube1.vvd
-----------------------------------------------
17. Open Steam/Library/TOOLS/Portal 2 Authoring Tools
18. In Portal 2 Authoring Tools open Model Viewer
19. In Model Viewer: File/Load Model
20. Open: [ROOT]modelscube1cube1.mdl
When I do this I get an error message: "Error loading model". Does anyone know what I'm doing wrong?
Quote from Vordwann on August 1, 2011, 10:51 amI believe you have to do a basic UVW map, regardless of 3d modeling program, to get your model into Hammer.
I believe you have to do a basic UVW map, regardless of 3d modeling program, to get your model into Hammer.
[spoiler][SP] Alternate[/spoiler]
Quote from Skotty on August 1, 2011, 11:30 amThis error tells me that there is a major problem with the model itself. If it would be just the texture, it would load it anyway. Oh and: you got 3 files, but none of them is a .phy file, so the physmodel is not working.
A broken model can have a lot of reasons. Problems in the smd, problems in the .qc or problems while compiling.
For me your .qc file looks good.
Most times if there is a problem the compiling process gets aborted. If it's ok you could upload the smd for me and I'll try to find the problem for you.
This error tells me that there is a major problem with the model itself. If it would be just the texture, it would load it anyway. Oh and: you got 3 files, but none of them is a .phy file, so the physmodel is not working.
A broken model can have a lot of reasons. Problems in the smd, problems in the .qc or problems while compiling.
For me your .qc file looks good.
Most times if there is a problem the compiling process gets aborted. If it's ok you could upload the smd for me and I'll try to find the problem for you.
Quote from lastnovember on August 1, 2011, 12:14 pmThanks for the help, guys! It's just a 6 poly cube, I started off trying to compile a character model, but regressed to a cube because I thought it would be easier. Would I need to change the uvs on a cube? The cube compiles fine, the error is only in the Model Viewer.
Here's the .smd file:
http://forums.thinking.withportals.com/downloads.php?view=detail&df_id=1128If the .smd exporter is the problem then I can try blender or 3ds Max instead.
Thanks for the help, guys! It's just a 6 poly cube, I started off trying to compile a character model, but regressed to a cube because I thought it would be easier. Would I need to change the uvs on a cube? The cube compiles fine, the error is only in the Model Viewer.
Here's the .smd file:
http://forums.thinking.withportals.com/downloads.php?view=detail&df_id=1128
If the .smd exporter is the problem then I can try blender or 3ds Max instead.
Quote from Vordwann on August 1, 2011, 1:58 pmWell there is a thing called wall worm model tools for 3ds max that does all the hard work for you.
Well there is a thing called wall worm model tools for 3ds max that does all the hard work for you.
[spoiler][SP] Alternate[/spoiler]
Quote from lastnovember on August 1, 2011, 6:20 pmI saw that before, but didn't realize it was a compiler. Gosh, how useful.. I'll give it a go, thanks.
I saw that before, but didn't realize it was a compiler. Gosh, how useful.. I'll give it a go, thanks.
Quote from lastnovember on August 2, 2011, 1:55 pmbox_3.raroops, that would make more sense I suppose. Also; I tried the Wall Worm Model Tools and I get the same error in the model viewer, dang it.
oops, that would make more sense I suppose. Also; I tried the Wall Worm Model Tools and I get the same error in the model viewer, dang it.
Quote from Skotty on August 2, 2011, 5:57 pmIt's so simple: You just don't have any texture on your model! You need a texture on every polygon of the model. Everything without any texture won't exist in the smd and ingame. Non existing models are not possible.
It's so simple: You just don't have any texture on your model! You need a texture on every polygon of the model. Everything without any texture won't exist in the smd and ingame. Non existing models are not possible.
Quote from lastnovember on August 2, 2011, 8:09 pmDo you mean a texture needs to be applied to the model before you export it as an .smd file. Or do you mean you need to specify the location of the .vtf texture you're using in the .qc file? Because I did both before compiling it and I still get an error. Did you edit the .qc? if so can you paste it back to me? Cheers.
Do you mean a texture needs to be applied to the model before you export it as an .smd file. Or do you mean you need to specify the location of the .vtf texture you're using in the .qc file? Because I did both before compiling it and I still get an error. Did you edit the .qc? if so can you paste it back to me? Cheers.
