Hard Light Productions Forums

Modding, Mission Design, and Coding => The Modding Workshop => Topic started by: Slasher on September 17, 2010, 02:06:26 am

Title: Chase cam view distant - model problem?
Post by: Slasher on September 17, 2010, 02:06:26 am
When playing the game with a ship and hitting * to go to the chase cam, the ship in question appears considerably further away from the camera than most other fighters.  I can't zoom the camera in; what you see in the thumbnail is as far as it will go.  I was wondering if there's something in the model file I can edit to change this.


(http://img844.imageshack.us/img844/5001/screen0028.th.jpg) (http://img844.imageshack.us/i/screen0028.jpg/)

Title: Re: Chase cam view distant - model problem?
Post by: headdie on September 17, 2010, 03:11:13 am
go into the ships tbl/tbm file and look for a line that looks something like this

$Closeup_pos:         0.0, 0.0, -30

this sets the default camera position, officially for the tech room according to the wiki but it affects other stuff as well like in game created shield icons and I'm pretty sure it affects the default camera position in chase view.  the lower the negative the further away from the model.  the example I gave is for a smallish (20 meter long) fighter and I'm guessing the value you have given will be larger unless the model dimensions are smaller than FS scale
Title: Re: Chase cam view distant - model problem?
Post by: Sushi on September 17, 2010, 09:54:52 am
Somewhat on topic... is there a solution for problem that chase cam completely breaks when moving backwards?
Title: Re: Chase cam view distant - model problem?
Post by: Slasher on September 17, 2010, 11:18:55 am
Thanks headdie, that fixed the tech room view at least.  No luck with the chase cam still, but at least I know it's possible it's a table value rather than a modeling/conversion issue, so I'll keep looking.

Sushi, I've noticed that too when reversing thrust.  Wish I could help.  My guess is that the current chase cam is based on the old, retail one, and I doubt V  ever planned on ships being able to move backwards, so they didn't account for that when they were coding. 
Title: Re: Chase cam view distant - model problem?
Post by: General Battuta on September 17, 2010, 11:22:32 am
I believe chase cam position is based on the ship's bounding box.
Title: Re: Chase cam view distant - model problem?
Post by: The E on September 17, 2010, 11:24:23 am
I believe that's only true if no other position is defined, as mentioned by headdie.
Title: Re: Chase cam view distant - model problem?
Post by: Slasher on September 17, 2010, 01:20:59 pm
Is the bounding box defined automatically by Blender based on the dimensions of the mesh?
Title: Re: Chase cam view distant - model problem?
Post by: headdie on September 17, 2010, 01:36:24 pm
I believe the most common cause for an oversized bounding box is to have stray vertexes in part of the model, detail0 I think tends to cause the biggest problem, in blender have you run select->non-manifold while in edit mode on all the parts, it should pick up anything that isn't joined properly top the model also when you select detail0 in PCS2 subobjects with the view set to orthographic projection does the bounding box touch the model at its extremes or is there an area where you have an unexplained gap. 

below is an example of how it should look (I apologise for the texture as it's only marking where I want texture details when i compile it into a single UV)
(http://www.mediafire.com/imgbnc.php/16dd96ef5a6d945959b9fa69a00782162g.jpg) (http://www.mediafire.com/imageview.php?quickkey=ae492472gf7yu93&thumb=5)
Title: Re: Chase cam view distant - model problem?
Post by: The E on September 17, 2010, 01:55:12 pm
Another possible cause is if you have rotation pivots far away from the model to simulate translational movement.
Title: Re: Chase cam view distant - model problem?
Post by: Slasher on September 17, 2010, 04:22:13 pm
Still a Blender newbie but I've learned a lot over the past few hours thank to everyone's help.  I checked in Blender and going to Non-Manifold in the Select menu didn't do anything on any of the objects/LODs/debris chunks.  Does this mean things are okay?  PCS2 didn't scream anything was a miss either...

(http://img833.imageshack.us/img833/2418/numero1x.th.jpg) (http://img833.imageshack.us/i/numero1x.jpg/)

However, I noted something odd.  The offset for the detail0 object is "-0.101810:-0.121340:1.960960" whereas the offset for detail1 is "-0.118070:-0.411140:11.216300," and there is a corresponding difference in the bounding box mins/maxs for those two LODs.  There is no similar discrepancy between any of the other LODs. 
Title: Re: Chase cam view distant - model problem?
Post by: headdie on September 17, 2010, 04:44:56 pm
Non-Manifold selecting nothing is good because that means that 1) there are no holes in your geometry and 2) you have no random floaty bits unless they form a solid shape, but by the fact that the bounding box looks to be good it would suggest to me you haven't go an issue with rogue bits or with the bounding box, though I am far from an expert on PCS2.  If you want you can post or message me a link to the pof and table I can take a look and see if anything is amiss.
Title: Re: Chase cam view distant - model problem?
Post by: Slasher on September 17, 2010, 04:56:08 pm
You sound like you have experience with models and conversion stuff whereas until this week I hadn't messed around in PCS or Blender since 2003, so it certainly couldn't hurt if you wanted to look at it. 



[attachment deleted by admin]
Title: Re: Chase cam view distant - model problem?
Post by: headdie on September 17, 2010, 06:23:35 pm
ok, after playing around with everything I noticed a few things, 1 was that zoom seamed to work ok for me using 3.6.12 final, secondly because I haven't got tbp I had to adjust the table to use FS2 weaponry and use the generate icon flag and comment out some stuff.  with the generate icon flag set I noticed that the generated icon was out of alignment showing the ships nose at around the centre of the image (also if you look the targeting display is similarly out) so I went back to the comment you made about the offsets on the detail levels, when I zeroed them I noticed in particular detail1-3 jumped along way to the point of placing the nose as the centre of the model.  with that discovery I exported the model back to dae and then back into blender and sure enough the centres were shown as being out on detail1-3.

I think the next steps are to check your models line up in blender (the fact the models on mine were not could have been due to the conversions) and that the pink dot you get in object mode when you select an object for each detail level is in the centre of the space when the detail object is.  This pink dot is used to define the centre of the geometry in PCS2, if when you line the geometry up (detail0 and the shield should be in the right place) and you find the pink dots are out of alignment, clear the selection and centre the 3d cursor in your view properties then select each object individually and go object->transform->Centre Cursor, this will centre that pink dot to the space.  Once you have done that press u, 2 on each detail to make sure it's a single user (the next step wont work unless its a single user and I don't know the difference I just know I get annoyed whenever I see the stupid error message about it) then on each object hit ctrl+a on and click scale and rotation to object, this will make sure that the current shape and position of the object are its zero otherwise PCS2 will move things to zero them which is a pain because you have to fix and reimport it all again.

Hope this helps

The shortcuts and instructions given are for blender 2.49b I'm still getting the hang of 2.5 and as the collada exporter seems borked on mine I'm in no hurry.

Quick question to the ppl in the know is the game supposed to use detail1+ as opposed to detail0 to setup stuff like the shield icons and targeting display?

(http://www.mediafire.com/imgbnc.php/6106e93f03399e8ec21ce64e2b5e3c962g.jpg) (http://www.mediafire.com/imageview.php?quickkey=iz0qlc0t34vpxnr&thumb=5)The original problem

(http://www.mediafire.com/imgbnc.php/292ffd47a5153682c3edc407d7664f922g.jpg) (http://www.mediafire.com/imageview.php?quickkey=m8z28rad6ovhx8m&thumb=5)Looks fine in tech room

(http://www.mediafire.com/imgbnc.php/b86dfa21ae60e418af697f232a813f102g.jpg) (http://www.mediafire.com/imageview.php?quickkey=duijfs6dwuba5nm&thumb=5)My re-centred version of the file, yes i know the texture is wrong, PCS2 to dae strips texture info and it was quicker to load one of my blanks than go hunting for the proper textures in the maps folder
Title: Re: Chase cam view distant - model problem?
Post by: Slasher on September 17, 2010, 07:31:01 pm
Okay, you were definitely right about detail1-3 not being centered correctly, they were way off mark.  So I went through a made sure the shield mesh and detail0-3 are centered appropriately and after reimporting the offset is at 0:0:0 for all non-debris subobjects and that weird difference in bounding box maxs/mins seems to be gone.  Thanks for the help. :)