Hard Light Productions Forums
Modding, Mission Design, and Coding => The Modding Workshop => Topic started by: ThePsuedoMonkey on March 07, 2013, 03:40:27 pm
-
I know there is a wealth of info on this, but I'm starting to get lost in it, so here I am begging for help. I've been dabbling into creating a model of an asteroid cashe/base for use in Diaspora (mostly learning the process at the moment); it is currently a simple object like the other asteroids, but eventually I want to have some custom defensive guns on it. I've run into a snag while attempting to load the model in FRED, though I'm certain the problem is my lousy table entry. I have a *.pof model in a new mod folder, whose mod.ini reads:
[launcher]
modname = Asteroid Base;
infotext = New ship model
author = ThePsuedoMonkey
forum = http://www.hard-light.net/forums/
[multimod]
primarylist = ;
secondarylist = ;
I've made a ships.tbm file in the subdirectory "tables" which reads:
#Ship Templates
$Template: Fleet Cashe Asteroid
$Short name: FCA
$Species: Terran
$POF file: AsteroidBase6.pof
$Detail distance: (0, 500, 1000, 2000)
$Show damage: NO
$Density: 1
$Damp: 0.99
$Rotdamp: 0.99
$Max Velocity: 0.0, 0.0, 1
$Rotation time: 5.0, 4.5, 5.0
$Rear Velocity: 0.0
$Forward accel: 0.0
$Forward decel: 0.0
$Slide accel: 0.0
$Slide decel: 0.0
$Expl inner rad: 50.0
$Expl outer rad: 100.0
$Expl damage: 25.0
$Expl blast: 2000.0
$Expl Propagates: NO ;; If set to Yes, then when the ship dies, the explosion propagates through it.
$Shockwave Speed: 0.0 ;; speed shockwave expands at, 0 means no shockwave
$Hitpoints: 500000
$Flags: ( "player_ship" "default_player_ship" "bomber")
$AI Class: None
$Afterburner: NO
$Countermeasures: 0
$Scan time: 12000
$EngineSnd: 0 ;; Engine sound of ship
$Closeup_pos: 0.0, 0.0, -45
$Closeup_zoom: 0.5
$Ship_icon: iconbomber2t-03
$Ship_anim: ssbomber2t-03
$Ship_overhead: loadBomber2t-03
$Score: 100
#End
#Ship Classes
$Name: Fleet Cashe
+Use Template: Fleet Cashe Asteroid
#End
-shp
This is the *.dae model in PCS2:
(http://i.imgur.com/zQBF11q.jpg) (http://imgur.com/zQBF11q)
All advice/insight is appreciated, thanks in advance!
-
Any error messages? Just crash? Could You post a log?
-
Well it has no textures that could be an issue.
Also why make it a palyer ship? Copy the existing asteroid entry and change the pof and name.
-
And using ship templates is not supported correctly at the moment. By starting the tbm with #Ship Templates instead of #Ship Classes, the engine gets the wrong ideas.
And yeah. No textures, no model.
-
No errors/crashes, just me :P
I had to search for the ships.tbl file, but that looks a lot better. I'm gonna go play with the textures now, but I'll keep you posted. Thanks!
-
Alright, I've figured out my problem with the textures. I have the UV map layed out, and am using a renamed file of Ast_R1_01 in the UV editor (not using the "materials" settings), but I can't seem to get blender to apply it to the model itself. I'm not sure why that is, since the youtube videos showed the textures appearing immediately after selecting those options, and I couldn't get it to appear by playing with the settings.
(http://i.imgur.com/VDPzwPj.jpg) (http://imgur.com/VDPzwPj)
-
If you're not using materials you should either change the view shader (on the left) to solid or the display shader (on the right) to singletexture or multitexture.
-
Hmm, neither of those brings the texture to the model, but I've opted to change the view-shader to solid, so I won't need to deal with adding lights. If I go to "texture paint mode" in the 3D-viewer with that setting, it temporarily draws the UV texture to the model, but anything I do in that mode simply alters the UV texture, and reverts back to greyscale shading of the model when I return to any other mode. I don't know if that's normal, since I don't recall that mode being mentioned in the tutorials.
-
I've been playing around some more, and I was able to get Blender to render the texture properly when I converted the *.dds to either *.tga or *.png. However, PCS2 still doesn't import the texture when either of them are packed into the imported *.dae. The textures and the exported collada model have the same prefix and are in the same directory, so I'm not really sure what the problem is. :confused: (Blender version is 2.66a if that helps)
I tried directly importing the textures in PCS2, but it just crashes when I try to load any:
Problem signature:
Problem Event Name: BEX
Application Name: pcs2.exe
Application Version: 0.0.0.0
Application Timestamp: 49609ff4
Fault Module Name: MSVCR90.dll
Fault Module Version: 9.0.30729.4940
Fault Module Timestamp: 4ca2ef57
Exception Offset: 0006ccb5
Exception Code: c0000417
Exception Data: 00000000
OS Version: 6.1.7601.2.1.0.256.48
Locale ID: 1033
Additional Information 1: b679
Additional Information 2: b67968ce8828163893e32d5ee87a5362
Additional Information 3: 0c5d
Additional Information 4: 0c5ddfc6b022ddbbd004cfc865000ea7
-
Go to blender and try downloading Blender 2.63. Blender 2.64 and higher I had trouble importing the textures to the pof.
-
Installed 2.63 to a separate directory and it seems to apply the *.dds textures correctly, but PCS2 doesn't load the exported *.dae from Blender2.63 (no crash or messages in PCS2**, simply nothing loaded). The results of saving the *.blend in 2.63, and opening in 2.66 shows only the detail0 mesh textured correctly: exporting that into *.dae and loading in PCS2 still fails to load the textures though, even if I delete all other meshes before the export. Thinking there might have been an issue with my model, I UVed and textured a triangulated cube with a copy of the R1 asteroid texture (renamed "cube.dds"), which also rendered correctly in Blender. Exporting that to *.dae and attempting to load in PCS2 still gave no result. My version of PCS2 is a fresh install of 2.0.3 from this sourceforge folder (http://sourceforge.net/projects/alliance/files/POF%20Constructor%20Suite/2.0.3/) with the overrides of "Spicious' PCS2 Dev Build with Collada support" from this wiki page (http://www.hard-light.net/wiki/index.php/Collada_Importer#External_Links). Is that the wrong version to use?
**unless selecting "File" -> "Global Import", which yields:
Problem signature:
Problem Event Name: APPCRASH
Application Name: pcs2.exe
Application Version: 0.0.0.0
Application Timestamp: 49609ff4
Fault Module Name: StackHash_0a9e
Fault Module Version: 0.0.0.0
Fault Module Timestamp: 00000000
Exception Code: c0000005
Exception Offset: 4eb67e00
OS Version: 6.1.7601.2.1.0.256.48
Locale ID: 1033
Additional Information 1: 0a9e
Additional Information 2: 0a9e372d3b4ad19135b953a78882e789
Additional Information 3: 0a9e
Additional Information 4: 0a9e372d3b4ad19135b953a78882e789
-
Try using pcs 2.1
-
Using PCS2.1 (http://www.hard-light.net/forums/index.php?topic=70249.0) fixed the not-loading-mesh problem of the exported *.dae files from Blender 2.63 :yes:, but it still fails to load the texture (for both; my asteroid and that cube). Creating a texture slot in the loaded *.dae named "Ast_B" in PCS2.1 did not allow me to use the model in FRED either (also attempted this with the cube). I couldn't find any more info on this for PCS2.1, so I've attached the cube.dae since whatever I did wrong in that is the same as in my asteroid. I've tried a few different *.dds textures just to eliminate that as the problem (each time they were in the same directory and had the same prefix as the Collada file), so that's why I've not also uploaded that. Thanks again for the help, everyone!
[attachment deleted by a basterd]
-
Wait, first of all, does PCS2 search the same directory as the model file for textures? I thought it only looked in your FS2 directory (set up in the options). Weird thing is that you say it's sometimes loading textures, and sometimes not.
Also, obvious question because we have no idea how much experience you have: Have you already read this (http://www.hard-light.net/wiki/index.php/Texturing) and this (http://www.hard-light.net/wiki/index.php/Herra_Tohtori%27s_texturing_tutorial)? If not, read them, check how your textures are formatted, and let us know if the problem persists.
-
Can you post the blender file of the cub with the texture? To see whats wrong.
-
Just to clarify, PCS2 (2.0.3 and 2.1) never loaded any textures for me so far; it was that Blender 2.63 renders them correctly mapped to the mesh, while 2.66 does not. I did read those wiki pages, but the textures I've tested were simply renamed ones from Diaspora (I used Ast_R1_01.dds the most), since it seemed prudent to use ones that appear correctly in the FS2 engine on their respective models. I just tried moving the cube files to the FS2 directory and PCS2 still doesn't load the texture, but I'll keep them there for now just in case.
I've uploaded the *.blend to FileDropper (http://www.filedropper.com/cube) (3MB). Cheers!
-
I think I see the problem no texture is assigned to the material
(http://farm9.staticflickr.com/8096/8553063789_b76c3f1a02_h.jpg)
I did a smart UV on the cube then added a texture like this
(http://farm9.staticflickr.com/8240/8554166328_4d432c3a36_h.jpg)
(http://farm9.staticflickr.com/8236/8553063575_74e05b4134_h.jpg)
(http://farm9.staticflickr.com/8506/8553063443_01de7661b5_h.jpg)
your model should look like this before saving as a .dae file
-
here's the blender file of the cube.
http://www.mediafire.com/?hhi5elu1nr64brk (http://www.mediafire.com/?hhi5elu1nr64brk)
-
:banghead: (I completely misunderstood the video by Rga_Noris)
Now my asteroid loads properly in PCS2. :)
Now onto this threads namesake: If I understood Bigchunk's videos and the wiki properly, I simply have PCS2 calculate the moment of inertia and save as *.pof, then add it to the mod folder's \data\models\ directory, then setup the modular table and mod.ini files, and activate the mod in the launcher. When I did that, FRED didn't have it in the drop-down list (log here (http://pastebin.com/q6gVm2Md)). The log doesn't look like FRED read the modular table but I wanted to make sure, so I replaced my *.pof with a copy of that of an asteroid from the official release and did the same for its textures (essentially making the mod create a duplicate of that asteroid under a different name), but that had the same result (logged anyway (http://pastebin.com/XJ21YEqj)). So it seems like either my mod.ini or modular table has the issue. Currently, these read:
[launcher]
modname = Asteroid Base;
infotext = New ship model
author = ThePsuedoMonkey
[multimod]
primarylist = ;
secondarylist = mediavps_3612;
#Ship Classes
$Name: Asteroid Base
$Short name: Ast_B
$Species: Object
$POF file: Ast_B.pof
$POF target LOD: 1
$Detail distance: (0, 450, 900, 1800)
$Show damage: YES
$Damage Lightning Type: None
$Debris:
+Lightning Arc Percent: 0
$Density: 1
$Damp: 1
$Rotdamp: 1
$Max Velocity: 0.0, 0.0, 0.0
$Rotation time: 20.0, 20.0, 20.0
$Rear Velocity: 0.0
$Forward accel: 0.0
$Forward decel: 0.0
$Slide accel: 0.0
$Slide decel: 0.0
$Glide: NO
$Expl inner rad: 500.0
$Expl outer rad: 1000.0
$Expl damage: 20.0
$Expl blast: 500.0
$Expl Propagates: NO
$Shockwave Speed: 300.0
$Shockwave Count: 1
$Explosion Animations: (3)
$Hitpoints: 250000
$Flags: ( "navbuoy" "stealth" "dont collide invisible")
$AI Class: None
$Afterburner: NO
$Countermeasures: 0
$Scan time: 3000
$EngineSnd: -1
$Closeup_pos: 0.0, 0.0, -1000
$Closeup_zoom: 0.5
$Score: 450
$Target Priority Groups: ( "Object" )
#End
The modular table was copied from an asteroid in the ships.tbl from Diaspora's R1_core.vp file, with my changes shown in yellow. The wiki implies that its filename must end with "-shp.tbm", which I have done, but the other caveats mentioned there shouldn't apply since Diaspora uses FS_open 3.6.13 and the wxLauncher only allows one mod to be active, even if I had any that modified tables (right?).
(sorry if my error is as silly as last time...)