Author Topic: Blender to Freespace?  (Read 5717 times)

0 Members and 1 Guest are viewing this topic.

Offline Water

  • 210
Re: Blender to Freespace?
okay, i've got everything working right except for the textures. when i use the POF constructor suite to make the final POF, only five of the twelve textures used are interpreted and saved into the pof by PCS. Any idea as to what's up with that? all of the textures used are game texures, so i can't be missing any specialized maps.
Each Blender object can have only one texture using the export script. If that's not your problem either post or pm a link and I'll have a look.


Another thing I would like to know is how to find/edit the names of all my turrets, so I can write the .tbl file correctly.
In Blender the Outliner shows all the turret names, and use *pad to copy one table entry and repaste multiple times, then edit  :nervous:
Is it a bad thing when i tell ModelView to "rotate parts" and nothing moves?
I don't trust Modelview to rotate anything. Others find it very useful. If it rotates in game then the pof and table are ok.

 

Offline esarai

  • 29
  • Steathy boi
Re: Blender to Freespace?
Then that means that the main body can't have snazzy multiple-textures like the typhon and colossus,  right?
<Nuclear>   truth: the good samaritan actually checked for proof of citizenship and health insurance
<Axem>   did anyone catch jesus' birth certificate?
<Nuclear>   and jesus didnt actually give the 5000 their fish...he gave it to the romans and let it trickle down
<Axem>and he was totally pro tax breaks
<Axem>he threw out all those tax collectors at the temple
<Nuclear>   he drove a V8 camel too
<Nuclear>   with a sword rack for his fully-automatic daggers

Esarai: hey gaiz, what's a good improvised, final attack for a ship fighting to buy others time to escape to use?
RangerKarl|AtWork: stick your penis in the warp core
DarthGeek: no don't do that
amki: don't EVER do that

 

Offline Vasudan Admiral

  • Member
  • 211
    • Twisted Infinities
Re: Blender to Freespace?
Then that means that the main body can't have snazzy ugly and inefficient multiple-textures like the typhon and colossus,  right?
Fixed. ;)

Seriously, you should definitely be using a single texture for most models. Texture tiling (ie, multiple textures) is far less efficient in terms of rendertime, and unless it's done brilliantly usually looks rather crappy. Painting your own texture is definitely harder and takes a lot longer, but once you're practiced it produces far superior results to tiling.
Get the 2014 Media VPs and report any bugs you find in them to the FSU Mantis so that we may squish them. || Blender to POF model conversion guide
Twisted Infinities

 

Offline Water

  • 210
Re: Blender to Freespace?
Then that means that the main body can't have snazzy multiple-textures like the typhon and colossus,  right?
Nope.
You can use multiple textures. You just can't export them.

In Blender split the mesh up so that each texture has its own part. Then export. In Truespace (sorry  :nervous:) put all the mesh pieces under the same group. PCS2 will combine the pieces back into one mesh object.

 

Offline esarai

  • 29
  • Steathy boi
Re: Blender to Freespace?
I have absolutely no skill at truespace, so i might need some guiding on that.

And i still can't get the table file to agree with the model. Anyone know what the parts to the "$subsystem: ___________,__,__" entry are and how to use them in the game?
<Nuclear>   truth: the good samaritan actually checked for proof of citizenship and health insurance
<Axem>   did anyone catch jesus' birth certificate?
<Nuclear>   and jesus didnt actually give the 5000 their fish...he gave it to the romans and let it trickle down
<Axem>and he was totally pro tax breaks
<Axem>he threw out all those tax collectors at the temple
<Nuclear>   he drove a V8 camel too
<Nuclear>   with a sword rack for his fully-automatic daggers

Esarai: hey gaiz, what's a good improvised, final attack for a ship fighting to buy others time to escape to use?
RangerKarl|AtWork: stick your penis in the warp core
DarthGeek: no don't do that
amki: don't EVER do that

 

Offline blowfish

  • 211
  • Join the cult of KILL MY ROUTER!!!!!!!!!!1
Re: Blender to Freespace?
I have absolutely no skill at truespace, so i might need some guiding on that.

And i still can't get the table file to agree with the model. Anyone know what the parts to the "$subsystem: ___________,__,__" entry are and how to use them in the game?

It is subsystem name (must be the same as in the model file), percent of ship's total hitpoints that the subsystem has (can be zero, like fighterbays), and seconds per 360 degree turn (can also be 0, really only used for turrets and rotating subsystems).

 

Offline Water

  • 210
Re: Blender to Freespace?
I have absolutely no skill at truespace, so i might need some guiding on that.

Heh, I use Truespace to get to an extension called Trueview. Effectively it's a heirarchy editor.  The Truespace skills required are the ability to load and then at the end save the cob file.  :P

 

Offline esarai

  • 29
  • Steathy boi
Re: Blender to Freespace?
Okay, i must be doing something really wrong somewhere, and i have no clue where that somewhere is. So, I ask anyone out there to take a look at these files, review them and tell me what I'm doing wrong. A summation of the problem is that this model does appear in freespace, but it is lacking any and all subsystems. :confused: It also flies backwards (I can solve that one, no worries there, just some strangeness between Blender and trueCrap that can be compensated for by a negative scaling along the Y axis (across X)).

the .tbl file can be found here:
http://files.filefront.com/Ioatbl/;9775407;/fileinfo.html

the .blend file used to model this thing is here:
http://files.filefront.com/GTDIoa+MasterExporterblend/;9775437;/fileinfo.html

the final pof file spat out of PCS is here:
http://files.filefront.com/GTDIoapof/;9775450;/fileinfo.html


any advice/help is again appreciated.
<Nuclear>   truth: the good samaritan actually checked for proof of citizenship and health insurance
<Axem>   did anyone catch jesus' birth certificate?
<Nuclear>   and jesus didnt actually give the 5000 their fish...he gave it to the romans and let it trickle down
<Axem>and he was totally pro tax breaks
<Axem>he threw out all those tax collectors at the temple
<Nuclear>   he drove a V8 camel too
<Nuclear>   with a sword rack for his fully-automatic daggers

Esarai: hey gaiz, what's a good improvised, final attack for a ship fighting to buy others time to escape to use?
RangerKarl|AtWork: stick your penis in the warp core
DarthGeek: no don't do that
amki: don't EVER do that

 

Offline Water

  • 210
Re: Blender to Freespace?
When you hit 3 (sideview) the nose should be on the left.

Before export you need to apply rotation and scaling - select all and hit CTRL-a (trying to figure why this turns your stuff into a mess)

Turrets on top face forward - Turrets on bottom need to face backwards.

Multipart turrets on sides are only for people who like a challange.  :P

I haven't checked if the export script handles stuff not being on layer 0

Detail 0 (high) Detail 1 (lower) Detail 3 or 4 (lowest detail levels, 4 =pyramid 4 faces)

EDIT:

For heirarchy in Blender you will need to be more structured. The reason you have the turrets facing one way in Blender vs Truespace is Scaling and Rotation. The rotation for each part for export should be 0 and the scale 1.
If you scale an object its children are scaled as well, but the children's scale factor still stays at 1. So when you "apply" scale to the parent it keeps its size but the children loose the scaling. The only way around it is to not parent everything till the final stage. Rotation of children has the same problem.

If you do rotate a turret with heirarchy, then remove all turret parenting, apply scale and rotation (CTRL-a) to all its parts and re-setup the heirarchy. After that you can copy it multiple times without any problems. Lamps don't care about rotation.

Use PCS2 to setup subsystems.
navigation, communication, weapons,  sensors,  engine01-5
5 engines are different from 5 engine glows. You can have 1 or 2 engines with 5 engine glows (thrusters).
« Last Edit: March 08, 2008, 05:28:40 am by Water »

 

Offline Vasudan Admiral

  • Member
  • 211
    • Twisted Infinities
Re: Blender to Freespace?
Water has pretty much covered all the issues there, yeah.

About the turret hierarchy stuff and applying scale and rotation, select everything and clear the parenting (alt-p as opposed to ctrl-p) and apply scale and rotation (ctrl-a). You might have to do it for each object. As Water said - if you press n a little properties window pops up. If scale and rotation has been applied to an object then the Scale x, y and z fields are all 1.0, while the Rotation x, y and z fields are all 0.0.

After this you will need to re-build the hierarchy again, parenting arms to bases, and then selecting all bases and parenting them to the main hull. If you want to be lazy and the positions of the turrets haven't changed, you can just parent all lights to the main hull rather than the individual correct turret - PCS2 doesn't care what the data lights (such as firepoints) are parented to, as long as the name of the light itself is right. It's only interested in name and location. It's just easier for making modifications to the turret layout if the light is parented to the turret base or arms. :)


Also, side multipart turrets are a bit trickier than regular turrets, but all they require is a forward vector (identical to a firepoint) and an upward vector. So if you had a turret on the starboard side of the ship, you would give it a forward vector of 0,0,1 and an upward vector of 1,0,0 (I think. Might be a -1. Depends on whether FS sees starboard as positive or negative X.)

So, your Subobject Properties for the base of that turret would look like this:
Code: [Select]
$special=subsystem
$fov=180
$name=gun turret
$uvec:1,0,0
$fvec:0,0,1
Get the 2014 Media VPs and report any bugs you find in them to the FSU Mantis so that we may squish them. || Blender to POF model conversion guide
Twisted Infinities

  

Offline esarai

  • 29
  • Steathy boi
Re: Blender to Freespace?
Thanks all! I haven't had a chance to get around to this, but it seems like it will help. I'll post again if that doesn't work it out.

I encountered another problem with the LOD's. I get the fact that level 0 is the highest, level 4 the lowest, but for some odd reason during export, the levels got flipped. Level 4 held the second highest detail, level three the medium, and level two the lowest, and level one the full detail model.
<Nuclear>   truth: the good samaritan actually checked for proof of citizenship and health insurance
<Axem>   did anyone catch jesus' birth certificate?
<Nuclear>   and jesus didnt actually give the 5000 their fish...he gave it to the romans and let it trickle down
<Axem>and he was totally pro tax breaks
<Axem>he threw out all those tax collectors at the temple
<Nuclear>   he drove a V8 camel too
<Nuclear>   with a sword rack for his fully-automatic daggers

Esarai: hey gaiz, what's a good improvised, final attack for a ship fighting to buy others time to escape to use?
RangerKarl|AtWork: stick your penis in the warp core
DarthGeek: no don't do that
amki: don't EVER do that

 

Offline Water

  • 210
Re: Blender to Freespace?
I encountered another problem with the LOD's. I get the fact that level 0 is the highest, level 4 the lowest, but for some odd reason during export, the levels got flipped. Level 4 held the second highest detail, level three the medium, and level two the lowest, and level one the full detail model.
The LOD's are mixed up in blender, but they are ok in the pof
In the Blend file:
detail 0 2052 tri (1026 quads)
detail1 248 faces (rename to detail3)
detail2 512
detail 3 1026 (rename to detail1)



 

Offline esarai

  • 29
  • Steathy boi
Re: Blender to Freespace?
The scrambling in blender was done purposefully to make the pof file work properly.
When the blender LOD's weren't scrambled, the pof LODs were.
<Nuclear>   truth: the good samaritan actually checked for proof of citizenship and health insurance
<Axem>   did anyone catch jesus' birth certificate?
<Nuclear>   and jesus didnt actually give the 5000 their fish...he gave it to the romans and let it trickle down
<Axem>and he was totally pro tax breaks
<Axem>he threw out all those tax collectors at the temple
<Nuclear>   he drove a V8 camel too
<Nuclear>   with a sword rack for his fully-automatic daggers

Esarai: hey gaiz, what's a good improvised, final attack for a ship fighting to buy others time to escape to use?
RangerKarl|AtWork: stick your penis in the warp core
DarthGeek: no don't do that
amki: don't EVER do that

 

Offline esarai

  • 29
  • Steathy boi
Re: Blender to Freespace?
Alrighty, this is starting to piss me off. I just did everything you guys told me to do to the letter, and for some reason, FS2 will not, absolutely will not see the turret systems, the subsystems, or any weapons. The model's subobjects all have scale 1, rot 1 for all axes, the heirarchy checks out, and all editors/pof readers I have do not encounter any errors when processing this model. Is it still something with the table file?

Any help is greatly appreciated, as always.
<Nuclear>   truth: the good samaritan actually checked for proof of citizenship and health insurance
<Axem>   did anyone catch jesus' birth certificate?
<Nuclear>   and jesus didnt actually give the 5000 their fish...he gave it to the romans and let it trickle down
<Axem>and he was totally pro tax breaks
<Axem>he threw out all those tax collectors at the temple
<Nuclear>   he drove a V8 camel too
<Nuclear>   with a sword rack for his fully-automatic daggers

Esarai: hey gaiz, what's a good improvised, final attack for a ship fighting to buy others time to escape to use?
RangerKarl|AtWork: stick your penis in the warp core
DarthGeek: no don't do that
amki: don't EVER do that

 

Offline Water

  • 210
Re: Blender to Freespace?
The pof and table contain most of the turret data, but the mission file also contains a list of each cap ships subsystems, including turrets.

Otherwise repost your re-edited blend + pof + table and test mission file (if you have one)


 

Offline Vasudan Admiral

  • Member
  • 211
    • Twisted Infinities
Re: Blender to Freespace?
The turret stuff stored in the mission files shouldn't affect anything.

To have a working multipart turret, as a general guide you need to:
1) Have the barrels (arms) as child objects of the rotating base object, and have the base object a child of the main hull.

2) Also make sure that the centres of rotation of each object are in the appropriate places or the bits will rotate all over the place)

3) Make sure the arms on all turrets are pointing directly away from the hull beneath. This usually means straight up or down for regular top/bottom turrets.

4) In PCS2, the subobject properties for the base subobject are set as follows:
Movement Type: Rotate
Axis: Y Axis (This is the up-down axis and is used for turrets on the top or bottom of your ship. You need to use fvec and uvec for anything else)
Properties:
$special=subsystem
$fov=180 (Imagine a targetting cone with the point attached to the turret base, and the rest of the cone straight above or below it. The FOV is the angle of the pointy end of that cone.)
$name=main turret (This doesn't actually have an effect, but is probably still nessecary. Never could be bothered to test. ;) )

5) In the Turrets section of PCS2, add (if it's not there already) a turret with:
'Parent' set to your turrets rotating base subobject
'Physical' set to your turrets barrels subobject
'Normal' set to point in the same direction the arms are pointing, ie. straight away from the hull below.
Then add as many firepoints as you have barrels with the limit being 3 max and stick them where you want the shots to emerge.

6) In the table entry for the ship, make reference to the turret somewhere in the subsystem section at the bottom. The format is:
$Subsystem: <name>, <percent of main hull strength subsystem has>, <time taken for turret to do full 360° rotation>
$Default PBanks: ( "<weapon1>" "<weapon2>" )

So for example:
$Subsystem: turret01,0.833,1.0
$Default PBanks: ( "Terran Huge Turret" )

There are a few other specialised options you can find in the wiki. :)
Get the 2014 Media VPs and report any bugs you find in them to the FSU Mantis so that we may squish them. || Blender to POF model conversion guide
Twisted Infinities

 

Offline esarai

  • 29
  • Steathy boi
Re: Blender to Freespace?

Then add as many firepoints as you have barrels with the limit being 3 max  and stick them where you want the shots to emerge.


. . .

I think we have the culprit. Every turret carries four firing points.

Just to verify, the name in the $subsystem entry needs to be the same as in the .pof, right?
<Nuclear>   truth: the good samaritan actually checked for proof of citizenship and health insurance
<Axem>   did anyone catch jesus' birth certificate?
<Nuclear>   and jesus didnt actually give the 5000 their fish...he gave it to the romans and let it trickle down
<Axem>and he was totally pro tax breaks
<Axem>he threw out all those tax collectors at the temple
<Nuclear>   he drove a V8 camel too
<Nuclear>   with a sword rack for his fully-automatic daggers

Esarai: hey gaiz, what's a good improvised, final attack for a ship fighting to buy others time to escape to use?
RangerKarl|AtWork: stick your penis in the warp core
DarthGeek: no don't do that
amki: don't EVER do that

 

Offline Vasudan Admiral

  • Member
  • 211
    • Twisted Infinities
Re: Blender to Freespace?
Yeah - the name of the turret's base subobject. :)
Get the 2014 Media VPs and report any bugs you find in them to the FSU Mantis so that we may squish them. || Blender to POF model conversion guide
Twisted Infinities

 

Offline esarai

  • 29
  • Steathy boi
Re: Blender to Freespace?
Okay, everything is as it should be, but its still throwing fits. Is it possible it's being cranky because my file is lacking turret debris models? (Although that doesn't explain why the subsystems don't appear...)

Files currently in use:

GTDIoaT3.pof
http://files.filefront.com/GTDIoaT3pof/;9812763;/fileinfo.html

GTDIoa_MasterExporterNoLayers3Firepoints.blend (FEAR THE USELESS LONG NAME!)
http://files.filefront.com/GTDIoa+MasterExporterNoLablend/;9812784;/fileinfo.html

And the Ioa Table Entry:
http://files.filefront.com/GTDIoatxt/;9812803;/fileinfo.html
<Nuclear>   truth: the good samaritan actually checked for proof of citizenship and health insurance
<Axem>   did anyone catch jesus' birth certificate?
<Nuclear>   and jesus didnt actually give the 5000 their fish...he gave it to the romans and let it trickle down
<Axem>and he was totally pro tax breaks
<Axem>he threw out all those tax collectors at the temple
<Nuclear>   he drove a V8 camel too
<Nuclear>   with a sword rack for his fully-automatic daggers

Esarai: hey gaiz, what's a good improvised, final attack for a ship fighting to buy others time to escape to use?
RangerKarl|AtWork: stick your penis in the warp core
DarthGeek: no don't do that
amki: don't EVER do that

 

Offline Vasudan Admiral

  • Member
  • 211
    • Twisted Infinities
Re: Blender to Freespace?
It looks like you converted that file in PCS1 - I strongly recommend you open the pof in PCS2, go to data>purge BSP cache and resave.

Anyway, the problem appears to be in your table. Where you have "$Subsystem: turret01, 3, 3.0" etc for each turret in the table, in the POF your turret subobjects are named "turret01-base" etc.

So, all I needed to do to get the weapons working according to Fred was add "-base" to the end of each subsystem name in the table so the names match that of the subobjects. :)
Get the 2014 Media VPs and report any bugs you find in them to the FSU Mantis so that we may squish them. || Blender to POF model conversion guide
Twisted Infinities