Hard Light Productions Forums

Modding, Mission Design, and Coding => The Modding Workshop => Topic started by: Bobboau on March 22, 2007, 04:04:02 pm

Title: PCS 2 UI Discussion
Post by: Bobboau on March 22, 2007, 04:04:02 pm
k, I've decided to help kaz work on PCS2 and I'll be working on the UI, I want some general user feed back before I do much work, I am planning on writing this stuff starting with the details, so item editors before chunk editors. arrays will have there own common control with a combo box and new/delete/copy buttons.
thing I'm not sure how to proceed with right now is vectors, should I go with the traditional three box editor, or would a single box be better? with a single box you'd be able to copy and paste whole vectors a lot easier, but it would require some sort of parsed syntax like x,y,z which might be a little clumsy.
Title: Re: PCS2 UI discussion
Post by: Kazan on March 22, 2007, 04:10:31 pm
i need to dig up my feature list plan and link it... finding it
http://www.hard-light.net/forums/index.php/topic,41648.0.html
Title: Re: PCS2 UI discussion
Post by: Bobboau on March 22, 2007, 04:33:25 pm
ok, but this thread is specificly for the UI.

BTW anyone here want to make some icons for the new/delete/copy buttons?
if not you'll be inflicted with the ones I used on Aurora, well I thought they were pretty good, I'll give them tool tips this time. or maybe just text buttons, but it'd be nice if they could all be the same shape and size.
Title: Re: PCS2 UI discussion
Post by: Taristin on March 22, 2007, 04:45:53 pm
Make it skinnable :D THat way I can eventually match it to my vista theme! :p
Title: Re: PCS2 UI discussion
Post by: takashi on March 22, 2007, 05:47:36 pm
and, as any noob would want, a viewer to see where things are going. maybe even having all the images and backrounds as editable files? (one way to make it skinnable, like fidos SFDB)
Title: Re: PCS2 UI discussion
Post by: Unknown Target on March 22, 2007, 05:58:11 pm
Bob, I'd really suggest taking a looking at Modelview for how to work the interface - it's very useful to have the WYSIWYG ability of Modelview.
Title: Re: PCS2 UI discussion
Post by: Turambar on March 22, 2007, 07:23:22 pm
a half-decent renderer and less confusing tabbage please.
Title: Re: PCS2 UI discussion
Post by: Turey on March 22, 2007, 07:26:13 pm
a half-decent renderer and less confusing tabbage please.


Either shading on the render or better texture support. It's hard to see with just a white blob.
Title: Re: PCS2 UI discussion
Post by: Unknown Target on March 22, 2007, 07:35:16 pm
You know what would be awesome? A 3D interface, with windowed options menus.
Title: Re: PCS2 UI discussion
Post by: Bobboau on March 22, 2007, 07:55:29 pm
yeah, a 3d display is already there, it'll work sort of like my ill fated Aurora did, editors on one side 3d display on the other, or that's the general jist.

my current plan of action is to have two control panels, one for navigating the model's data types, the other for editing data. the navigator will be a tree which will have all of the diferent data types and as subnodes you will be able to get at the individual data items, if you select a parent there will be an editor pop up in the editor pane, you will be able to select an entire chunk or just part of it.

how does that sound?

and does anyone have anything to say about the vector thing?
Title: Re: PCS2 UI discussion
Post by: Kazan on March 22, 2007, 08:16:07 pm
for those of you who haven't seen the PCS interface
http://www.ferrium.org/media/pcs-alpha-20050902.jpg
Title: Re: PCS2 UI discussion
Post by: Flipside on March 22, 2007, 08:38:59 pm
Would this thread serve you better if I moved it to SCP? Since there's two threads on this already, you could use this one to discuss development and the others to collect input?

Let me know if that'll help and I'll move it over :)
Title: Re: PCS2 UI discussion
Post by: Scooby_Doo on March 22, 2007, 08:49:43 pm
I like that interface, reminds me a bit of HWSE.  :)
Title: Re: PCS2 UI discussion
Post by: Nuke on March 22, 2007, 10:52:07 pm
can we get vector fields that look like this

note the copy and paste buttons, so you can copy individual fields or the whole vector. actually id like to be able to copy and paste from any level of scope.

[attachment deleted by admin]
Title: Re: PCS2 UI discussion
Post by: Bobboau on March 23, 2007, 01:40:32 am
Would this thread serve you better if I moved it to SCP? Since there's two threads on this already, you could use this one to discuss development and the others to collect input?

Let me know if that'll help and I'll move it over :)
no, looking for modder feedback, not FSO feedback, the other thread was about me hacking a few message boxes into PCS1, it got hijacked by this, it's not about this.

@nuke: I suppose I could do it that way, but it would be a bit clumsy to code and to use, if others vote for that over anything else I'll do it.
Title: Re: PCS2 UI discussion
Post by: Nuke on March 23, 2007, 12:40:15 pm
or just have single fields for vectors with separators like 0.123'4.56'7.89, then they can be cut+paste all as a string then converted back to numbers internally. you could probably use some internal formatting, sorta like the ip address fields in network settings. with a right click menu you still have the option to copy + paste a single number.



[attachment deleted by admin]
Title: Re: PCS2 UI discussion
Post by: Kazan on March 23, 2007, 06:47:24 pm
feel free to flesh out the interface to the pcs_file class with needed function (look at POFHandler if you don't get what i mean - it's fleshed out)
Title: Re: PCS2 UI discussion
Post by: Scooby_Doo on March 23, 2007, 07:12:45 pm
A slightly dumb request. I know it'll slow down conversion a bit but PLEASE but in some sort of progress bar during the conversion.  That way you'll know it's actually working and not hung up.
Title: Re: PCS2 UI discussion
Post by: Kazan on March 23, 2007, 11:33:20 pm
A slightly dumb request. I know it'll slow down conversion a bit but PLEASE but in some sort of progress bar during the conversion.  That way you'll know it's actually working and not hung up.

5 steps ahead of you

and it doesn't appreciably slow things down
Title: Re: PCS2 UI discussion
Post by: Bobboau on March 23, 2007, 11:48:07 pm
yeah nuke those are basicly the two options I need to pick between, and I just can't quite figure out which one I want.
Title: Re: PCS2 UI discussion
Post by: Scooby_Doo on March 23, 2007, 11:57:38 pm
A slightly dumb request. I know it'll slow down conversion a bit but PLEASE but in some sort of progress bar during the conversion.  That way you'll know it's actually working and not hung up.

5 steps ahead of you

and it doesn't appreciably slow things down

THANK YOU!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Even with this new computer I'm never quite sure if it's still working.
Title: Re: PCS2 UI discussion
Post by: Bobboau on March 24, 2007, 04:08:59 am
for the time being I think I'm going to implement the vector editor with a single box, the way this is getting coded it should be exesively easy to change this later.
Title: Re: PCS2 UI discussion
Post by: Sandwich on March 24, 2007, 07:36:50 am
Quote from: Kazan on MSN
[03:22.28 AM] Hans Kazan: sandwich - please post in the PCS2 discussion threads in modding that i had a 5-alarm family emergency and will be out of contact
Title: Re: PCS2 UI discussion
Post by: Bobboau on March 24, 2007, 08:41:27 am
oh, so I guess he won't be responding to my PM any time soon, well it's something that can wait.

wonder what happened, hope everything's ok.

well I shall resolve to make some progress before he gets back!
Title: Re: PCS 2 UI Discussion
Post by: Starman01 on March 24, 2007, 12:49:11 pm
Only thing I really want is a render window that is as sharp and draws points(weapons, engines etc) in the same good visible manner that modelview did, so that we can finally stop working in two programs. Swichting wireframe, faced and textured is also very important (but certainly you already build that in).

Besides that, the current GUI already looks good to me (actually, once can get used to everything :) )
Title: Re: PCS 2 UI Discussion
Post by: Bobboau on March 24, 2007, 09:20:41 pm
ok, I'm rewriteing everything below the main panel, I'm assumeing that the GL canvas is self contained and that the main panel is suposed to own the model (PCS_Model)

this is the jist  of how it's getting layed out, the red is were the tree control is going (it's red so I can see it)
all three panes are resizeable. I had to scrap the exsisting panel because I had too many variables for me to take into account, I'll be porting it's funtionality in.

[attachment deleted by admin]
Title: Re: PCS 2 UI Discussion
Post by: takashi on March 24, 2007, 09:27:30 pm
so we'll have tree- style selection for subobjects, weapons, thrusters, ect. al-a trueview?
Title: Re: PCS 2 UI Discussion
Post by: Kazan on March 24, 2007, 10:08:34 pm
yes the glcanvas is a self contained object and can be moved around freely
Title: Re: PCS 2 UI Discussion
Post by: Scooby_Doo on March 24, 2007, 10:34:13 pm
Heres something I would really like.  So much so I'd even write the code for it  :lol: 

Along side of entering number positions X,Y,Z...etc in text boxes(like for subsystems, etc). I would also like 8 or 9 button little controller pad.  So you can "nudge" values rather than trying to guessimate.

(http://img.photobucket.com/albums/v356/Shodan_AI/buttons.jpg)

the 10* and 1/10 would change the values. I.e. normally clicking X+ would increase the X by 1, click 1/10 once would then increase by .1.

This would help immeasurably when your trying to home in on a particular spot.
Title: Re: PCS 2 UI Discussion
Post by: takashi on March 24, 2007, 10:40:22 pm
cool.
Title: Re: PCS 2 UI Discussion
Post by: Nuke on March 24, 2007, 11:27:18 pm
Heres something I would really like.  So much so I'd even write the code for it  :lol: 

Along side of entering number positions X,Y,Z...etc in text boxes(like for subsystems, etc). I would also like 8 or 9 button little controller pad.  So you can "nudge" values rather than trying to guessimate.

(http://img.photobucket.com/albums/v356/Shodan_AI/buttons.jpg)

the 10* and 1/10 would change the values. I.e. normally clicking X+ would increase the X by 1, click 1/10 once would then increase by .1.

This would help immeasurably when your trying to home in on a particular spot.

i like it, but dont waste too much screen space, or slave it directly to the keypad.
Title: Re: PCS 2 UI Discussion
Post by: Scooby_Doo on March 25, 2007, 02:58:02 am
Agreed or make it popup-able.

Also have it remember which textbox is in focus. That way, you can select the first textbox (probably X coords), use the panel to tweak it just right, hit tab and and repeat for Y and Z.  Although thinking that might be a problem, with selecting and focusing. Bleh. :ick:
Title: Re: PCS 2 UI Discussion
Post by: Bobboau on March 25, 2007, 04:06:54 am
I'll see what I can do about that after I get the main interface done, it shouldn't take too long now.
Title: Re: PCS 2 UI Discussion
Post by: Kazan on March 25, 2007, 12:10:19 pm
oh bob - commits email list
https://lists.sourceforge.net/lists/listinfo/alliance-cvs
Title: Re: PCS 2 UI Discussion
Post by: Bobboau on March 26, 2007, 03:59:23 am
UI test (http://freespace.volitionwatch.com/blackwater/pcs2UI.zip)
that is the first chuck done, as of now the tree is merely decorative, and only the header is editable, but this should give you an idea of were I'm going.
I have noticed that the aspect ratio seems to not be right, not sure why that is, but I didn't touch anything in there except fixing a divide by zero error. there also seem to be a number of small memory leaks, they are there even if I disable the main panel so I don't know what's up with that either.

makeing the other chunck control panels should be super fast now, the only major bump is going to be the tree control, and that's just because I don't know what exactly I'm going to do with it (from a codeing point of view)
Title: Re: PCS 2 UI Discussion
Post by: Nuke on March 26, 2007, 04:14:36 am
 not running for me. weird cause the versions kaz posted worked. i even got the msvc8 dlls and still no workie.
Title: Re: PCS 2 UI Discussion
Post by: Bobboau on March 26, 2007, 04:41:02 am
try the link again, I put a release build up this time.
Title: Re: PCS 2 UI Discussion
Post by: Vasudan Admiral on March 26, 2007, 05:02:55 am
Oooh - I like what I see on the right hand panel. :D
Not sure I follow what's going to happen with the left hand tree in terms of functionality though?

Only thing I'd recommend is allowing the vector entry fields to be toggled easily between the single box used here, and the separate boxes system of PCS1 and modview. Mainly because the 1 box system is great for copying and pasting the whole thing quickly, but decidedly slower if you only want one of the values at a time, along with making errors like accidentally truncating a minus sign during copying.

Oh yes, and will we see the import/save chunk functionality of Aurora? That feature, along with the autopathing was absolutely brilliant. Combined with the soon-to-be power of PCS2 and you really do have the ultimate FS tool. ;)
Title: Re: PCS 2 UI Discussion
Post by: Bobboau on March 26, 2007, 05:21:00 am
the tree realy doesen't do anything but hold it's place right now, later you'll be able to use it to navigate the model

hmmmm probably, I'm just doing the interface as of now, so it would be more up to kaz on how/if chunk importation will be done, but as far as the interface goes adding another button would be nothing.

and I have a funny feeling I'm not going to be able to leave this project without first implementing auto-path.
Title: Re: PCS 2 UI Discussion
Post by: Nuke on March 26, 2007, 05:27:57 am
to improve the handeling of the single field boxes, you might make it so that a double click will select a single number, and a tripple click will select the whole string. then you could avoid any selection errors and it would be fast enoug to really cut down the data entry time.

chunk import/export would be awesome. even cooler if the format it saves them in is text based and easilly editable.
Title: Re: PCS 2 UI Discussion
Post by: Getter Robo G on March 26, 2007, 12:16:16 pm
I have a funny feeling I'm not going to be able to leave this project without first implementing auto-path.

Oh the guns? Don't be alarmed, they're for you're protection... Yeah that's it!

 :nod:
Title: Re: PCS 2 UI Discussion
Post by: Bobboau on March 26, 2007, 03:47:56 pm
and the ninja lawyer zombies wielding them? my protection also?
Title: Re: PCS 2 UI Discussion
Post by: Bobboau on March 27, 2007, 12:47:16 am
ok, for documentation purposes I'm going to describe the high level interface code.
this code is all that is needed for a minimal chunk level editor, it has no repetition of code anywhere in the work flow. other than the repetition of adding the specific controls and getting setting data from them, the primitive editors do a lot of work for you.

this is a minimal editor panel

Code: [Select]
#pragma once

#include"model_editor_ctrl.h"
#include"array_ctrl.h"
#include"primitive_ctrl.h"
#include"pcs_file.h"

class ACEN_ctrl
:public editor_ctrl<vector3d>
{
vector_ctrl*auto_center;

public:
ACEN_ctrl(wxWindow*parent)
:editor_ctrl<vector3d>(parent, "Auto-Center")
{
//add controls
add_control(auto_center=new vector_ctrl(this,0,0,60,40,"Point"),0,wxEXPAND );
}

//do nothing, needed so the base destructor will get called
virtual~ACEN_ctrl(){}

//set's the control's value
void set_value(const vector3d&t){
data=t;
auto_center->set_value(t);
}

//return's the control's value
vector3d get_value(){
return auto_center->get_value();
}

//populates the control with data from the model
void set_data(PCS_Model &model){
set_value(model.GetAutoCenter());
}

//applies the data in the control to the model
void apply_data(PCS_Model &model){
model.SetAutoCenter(get_value());
}
};

for each control there are six (minimum, you can overide preset behaviours to get diferent sizer behaviour) steps
1) make a derived class from editor_ctrl<chunk_type> with a pointer to a class derived from editor<member_type> for each member

2) in the constructor instantiate the controls with 'new' providing there minimum size, and the member title, be sure to use the add_control function on the resultant control so the control adds it to the proper sizers (the sown additional parameters ensure the normal resizeing behaviour). if you want to make a sub sizer use the function add_sizer on the top level sizer of a group of controls, this is usualy only needed if you want two controls on the same row.

3)override the set_value function, mostly this involves finding the member of the passed structure and calling the related control's set value function

4)override the get_value function, you need to build a structure from the data in the control and return it, this mostly consists of calling the get_value function of the editors in the control

5)override the set_data function, sets the editor's data, this is usually little more than getting the structure representing the chunk from the model or making one, then calling set_value with it.

6)override the apply_data function, applys the value in the editor to the model, usualy little more than calling the appropriate SetData function in the model with get_value() as the parameter.

setting the editor will be little more than
Code: [Select]
control_panel = new model_editor_ctrl<vector3d, ACEN_ctrl>(control_pane, model)model_editor_ctrl is a template that has the scroll window functionality and a common interface for setting and getting data.
note ACEN isn't the perfict example cause it is just one simple data type.

with this I should be able to build the whole inter face in a day or two, but it might be untill this weekend untill I get the time to actually do this. though I'll try to get at least two done tonight.

then I'll be able to get the tree working.

now unfortunately this requiers more direct access to the data elements of the model, but I implemented simple accessors for it so if there are any tricks it can be handeled there.
Title: Re: PCS 2 UI Discussion
Post by: Kazan on March 27, 2007, 07:52:14 am
interesting approach, i can't wait to see it all once you've commited it to the repo
Title: Re: PCS 2 UI Discussion
Post by: Bobboau on March 27, 2007, 09:32:13 am
I got textures done in 15 minutes, then I worked on weapon points, one minor draw back to this method is that you can't realy stager controls that much, in most situations this isn't that apparent, but with arrays it can make it a little off balanced looking, but the UI is setup to minimize horizontal useage, so I don't realy see a better way to do it without sacrificing that. here is a shot of the gun/missle point editor (btw it would have been a lot easer to do this control if we had two seperate arrays for gun and missle points, I realy hope the order they are in isn't important to any other code, don't bother changing this now. oh and I fixed a special case bug in the kaz_vector this=&src)

[attachment deleted by admin]
Title: Re: PCS 2 UI Discussion
Post by: Kazan on March 27, 2007, 11:35:44 am
with that setup the proportions of the OpenGL surface are all outa whack, but the editor panel looks good

what is with the drop list?
i thought you were bringing back the tree?
Title: Re: PCS 2 UI Discussion
Post by: Bobboau on March 27, 2007, 12:00:24 pm
I will be, each section of that control is a seperate control, I can make a control for just one point, just one bank, one type or both types, but I'm going to try and get basic functionality (make all the main controls, then get them linked to a simplified version of the tree) before I go into minutia.
Title: Re: PCS 2 UI Discussion
Post by: Kazan on March 27, 2007, 12:04:57 pm
the code for the full tree is still there - you just need to instantiate it (mostly just comment it) and allocate it some screen space
Title: Re: PCS 2 UI Discussion
Post by: Scooby_Doo on March 29, 2007, 01:10:41 am
Does your GUI toolkit support mouse wheels, I don't see why they shouldn't.  It would be nice to zoom in and out with the mouse wheel.
Title: Re: PCS 2 UI Discussion
Post by: Nuke on March 29, 2007, 05:30:59 am
im not sure but i think sdl has support for the mousewheel. if it does they could implement it without too much hassel.
Title: Re: PCS 2 UI Discussion
Post by: Kazan on March 29, 2007, 08:54:49 am
mouse wheel scrolling is an operating system service - therefore wxWidgets on windows should automatically have it

(wxWidget's implements it's libraries in a platforms native API, and presents the programmer with a 99.9% cross-platform unified UI)
Title: Re: PCS 2 UI Discussion
Post by: Kazan on April 05, 2007, 04:36:46 am
updates?
Title: Re: PCS 2 UI Discussion
Post by: Turambar on April 05, 2007, 10:30:38 am
man i cant wait for this to come out.  it's going to make my life so much easier!

I very much appreciate what you guys are doing.
Title: Re: PCS 2 UI Discussion
Post by: takashi on April 05, 2007, 02:12:58 pm
seems its not working on XP pro service pack 2 (for me, anyway). any help? PCS 1 worked fine.
Title: Re: PCS 2 UI Discussion
Post by: Kazan on April 05, 2007, 02:43:24 pm
it's a problem with some peoples computers that i can't track down
Title: Re: PCS 2 UI Discussion
Post by: DaBrain on April 06, 2007, 05:20:06 am
I know it might make the UI a bit more complex and the feature itself could also be a though one, but would you make the object list... dynamic?

Let me expain what I mean. Now that alpha textures become more and more important for us, rendering order also got more important.
It would be really nice (killer feature) if you could change the rendering order in PCS, rather than having to export it again and again, till you got it right.

So the objects would have to be swap-able icons in PCS.

Practically a question to both of you. ;)
Title: Re: PCS 2 UI Discussion
Post by: Nuke on April 06, 2007, 07:52:03 am
ideally id like the renderer to be a spot on match with the freespace engine so that transparancy debugging of models would be possible, without loading the game. a texture stack would be nice where you can move them up or down and see in real time the effects on transparency.

also better heirarchy debugging and editing would be nice. like say you screwed up something in conversion and your turret barrel was at the same level of hierarchy as the base when it should have been under it. would be nice if this kinda thing was fixable in program. also it would help if the program/format youre modeling in has suckey heirarchy support.
Title: Re: PCS 2 UI Discussion
Post by: Kazan on April 06, 2007, 05:03:29 pm
spot on match would mean replication, and you can forget about that
Title: Re: PCS 2 UI Discussion
Post by: Raven2001 on April 22, 2007, 11:26:54 am
dunno if Im still on time for this, but a nice interface feature would be, that we had a way to "scroll" up and down the values, instead of typing them. And of course seeing the changes in realtime. See 3dsmax way of handling values, and youll see what I mean
Title: Re: PCS 2 UI Discussion
Post by: takashi on April 22, 2007, 12:37:25 pm
maybe easier squad logo allocation as a panel? people are just texturing on their favorite squad and being done with it. maybe just a "select area" in the model viewer for setting it?
Title: Re: PCS 2 UI Discussion
Post by: Kazan on April 22, 2007, 02:00:55 pm
the autoinsignia code bug that caused crashingin PCS1.x (that nobody reported!) has already been solved in the port to the 2.x codebase
Title: Re: PCS 2 UI Discussion
Post by: Bobboau on April 22, 2007, 02:34:43 pm
BTW school will be out soonish, and I can get this done, I had editors for everything but insignia, path, shields, turrets, subobjects, and glow points, and some of those might not even get an editor (insignia, shield)
Title: Re: PCS 2 UI Discussion
Post by: takashi on April 22, 2007, 06:07:13 pm
individual point editing/auto shield without need of making one in truespace?
Title: Re: PCS 2 UI Discussion
Post by: Scooby_Doo on April 22, 2007, 06:18:16 pm
individual point editing/auto shield without need of making one in truespace?

"surface shields" does that  :P
besides auto-generating shields may not look very good.
Title: Re: PCS 2 UI Discussion
Post by: takashi on April 22, 2007, 06:50:46 pm
unless it just scales up the model for the shield model. then you have tight wrapped shields!
Title: Re: PCS 2 UI Discussion
Post by: Bobboau on April 22, 2007, 09:00:07 pm
no, then you have horable looking shields
Title: Re: PCS 2 UI Discussion
Post by: takashi on April 22, 2007, 09:46:27 pm
look at the AF kato shields...or the ursa shields.
Title: Re: PCS 2 UI Discussion
Post by: WMCoolmon on April 22, 2007, 09:55:40 pm
individual point editing/auto shield without need of making one in truespace?

"surface shields" does that  :P
besides auto-generating shields may not look very good.

No, surface shields just applies damage to the shields of a ship rather than the hull, when a shot strikes a part of the hull (as opposed to the part of the shield mesh). Unless somebody's fixed decals and I don't know about it, surface shields doesn't show any shield effect right now. It also doesn't (nor, to my knowledge, ever will) generate a shield mesh for you.
Title: Re: PCS 2 UI Discussion
Post by: Scooby_Doo on April 22, 2007, 11:35:29 pm
Ok minus the special effects.  I'd sooner have the decals working than auto-generate shield skins.
Title: Re: PCS 2 UI Discussion
Post by: Kazan on April 23, 2007, 07:39:26 am
i've been trying to come up with an algorithm for autogenerating shield meshes in my head...... not likely to happen
Title: Re: PCS 2 UI Discussion
Post by: Flipside on April 23, 2007, 08:13:55 am
Shields are probably the easiest part of the model to make in the first place, they don't need texturing or even UV Mapping, so I really don't see the purpose to a generator. The algorithm for it would probably involve creating bounding boxes and then subdividing and smoothing them, doing a collision check at each subdivide, basically, it'd be far more effort for you to code than it would take to manually make the shield.
Title: Re: PCS 2 UI Discussion
Post by: Kazan on April 23, 2007, 09:10:22 am
yup... but you just solved part of what i was thinking about... bounding boxes get generated anyway.. so i could generate the BSP then make a point list out of the bounding box edges...

hmm... interesting

not slated for 2.0 .. but interesting
Title: Re: PCS 2 UI Discussion
Post by: takashi on April 23, 2007, 12:35:14 pm
what about ships without shields?
Title: Re: PCS 2 UI Discussion
Post by: Kazan on April 23, 2007, 12:52:51 pm
what about them
Title: Re: PCS 2 UI Discussion
Post by: redsniper on April 23, 2007, 02:03:23 pm
they don't need shield meshes, taka.
Title: Re: PCS 2 UI Discussion
Post by: takashi on April 23, 2007, 04:29:58 pm
my point.
Title: Re: PCS 2 UI Discussion
Post by: Kazan on April 23, 2007, 05:44:15 pm
doesn't make sense

please explain what you are asking
Title: Re: PCS 2 UI Discussion
Post by: Raven2001 on April 23, 2007, 06:38:16 pm
Kaz... leave it... ;)
Title: Re: PCS 2 UI Discussion
Post by: takashi on April 23, 2007, 06:40:37 pm
im asking for an ability to make shields for .pofs that never had shields before. individual point editing/creation.
Title: Re: PCS 2 UI Discussion
Post by: Raven2001 on April 23, 2007, 06:49:26 pm
Thats the job of a modelling program, not an exporter
Title: Re: PCS 2 UI Discussion
Post by: takashi on April 23, 2007, 07:03:09 pm
 :P
Title: Re: PCS 2 UI Discussion
Post by: Turambar on April 23, 2007, 08:03:53 pm
;_;


i usually reserve this for extreme situations, but in this case, i'm afraid i'm going to have to...


CRYMORENOOB
Title: Re: PCS 2 UI Discussion
Post by: Kazan on April 23, 2007, 08:23:22 pm
Forum Posters: We own noobs, so the devs don't have to.
Title: Re: PCS 2 UI Discussion
Post by: Vretsu on April 23, 2007, 08:59:33 pm
The interface must mold itself according to the hopes and dreams of the user. Also, it must be able to convert empty text files into hi-poly Sathanas juggernauts.
Title: Re: PCS 2 UI Discussion
Post by: takashi on April 23, 2007, 09:05:49 pm
either thats a joke or your worse than me.
Title: Re: PCS 2 UI Discussion
Post by: Kazan on April 23, 2007, 09:19:37 pm
that would be a joke, and atleast you admit you're bad

that means you know better
Title: Re: PCS 2 UI Discussion
Post by: takashi on April 23, 2007, 09:39:48 pm
that post adds nothing.
Title: Re: PCS 2 UI Discussion
Post by: Scooby_Doo on April 23, 2007, 09:49:22 pm
The interface must mold itself according to the hopes and dreams of the user. Also, it must be able to convert empty text files into hi-poly Sathanas juggernauts.


hahhah beat me too it.... i want it to accurately convert my models in max, have it setup all the points necessary, automatically add decals where appropriate and bake me a really good pumpkin pie
Title: Re: PCS 2 UI Discussion
Post by: takashi on April 23, 2007, 09:55:56 pm
i want it to model the ship, uv map, texture, turret, LOD, convert, and table all in 2 seconds.
Title: Re: PCS 2 UI Discussion
Post by: Raven2001 on April 24, 2007, 03:47:29 am
that post adds nothing.

Gotta agree with you... in fact, it felt like your posts
Title: Re: PCS 2 UI Discussion
Post by: Nuke on April 24, 2007, 03:49:55 am
i want it to model the ship, uv map, texture, turret, LOD, convert, and table all in 2 seconds.

you want to sculpt a masterpiece, yet you refuse to lift a chisel. kaz is simply making a better chisel, i doubt it would help your work ethic any :D
Title: Re: PCS 2 UI Discussion
Post by: Scooby_Doo on April 24, 2007, 05:26:01 am
i want it to model the ship, uv map, texture, turret, LOD, convert, and table all in 2 seconds.

you want to sculpt a masterpiece, yet you refuse to lift a chisel. kaz is simply making a better chisel, i doubt it would help your work ethic any :D

yoda, we have become.  :P

either that or Kosh.
Title: Re: PCS 2 UI Discussion
Post by: Flipside on April 25, 2007, 04:17:12 pm
:lol: Play nice :p

But that is a good quote Nuke ;)
Title: Re: PCS 2 UI Discussion
Post by: takashi on April 25, 2007, 04:37:25 pm
i suck at jokes.
Title: Re: PCS 2 UI Discussion
Post by: redsniper on April 25, 2007, 06:43:20 pm
No joke. Nuke is just criticizing you, and rightly so.
Title: Re: PCS 2 UI Discussion
Post by: Nuke on April 26, 2007, 06:30:43 am
its entirely possible he could become a great modder, but by then everyone would have him on ignore and would never know of the mods existance. sorta what happened with me and nukemod. :D ok now im joking what was this thread about again?
Title: Re: PCS 2 UI Discussion
Post by: Kazan on April 26, 2007, 09:39:53 am
about how we're going to flog nuke
Title: Re: PCS 2 UI Discussion
Post by: Turambar on April 26, 2007, 10:00:30 am
i thought it was about possibly the most infuential non SCP piece of code around here.

seriously, i can't wait for this stuff.
Title: Re: PCS 2 UI Discussion
Post by: Kazan on April 26, 2007, 10:48:18 am
awww.. i'm influencial!

i should get time to work on it the week after next
Title: Re: PCS 2 UI Discussion
Post by: Nuke on April 27, 2007, 06:31:11 am
surgeon generals warning: flogging nuke may cause a bondage fetish stimuli resulting in a fluids discharge

he lost his foreskin, might as well take away his monkey too :D
Title: Re: PCS 2 UI Discussion
Post by: Kazan on April 27, 2007, 08:10:23 am
 :no:  :mad:  :hopping:  :no:
Title: Re: PCS 2 UI Discussion
Post by: takashi on April 27, 2007, 05:57:59 pm
uncalled for nuke. worse than my spam even.
Title: Re: PCS 2 UI Discussion
Post by: Snail on April 27, 2007, 06:05:52 pm
Not so.
Title: Re: PCS 2 UI Discussion
Post by: Nuke on April 28, 2007, 12:55:52 am
ok that was a little wierd. but seriously demonky kaz so he feels more ambitious about pcs2 :D
Title: Re: PCS 2 UI Discussion
Post by: takashi on April 28, 2007, 02:44:14 pm
the sooner we kill the monkey hanging onto his profile, the sooner we get the godly modelview replacement we all want. (with orphographic view, i hope, unlike pcs1's model-viewer)
Title: Re: PCS 2 UI Discussion
Post by: Scooby_Doo on April 28, 2007, 04:54:08 pm
Something tells me this conversation has totally degraded  :doubt:
Title: Re: PCS 2 UI Discussion
Post by: takashi on April 28, 2007, 05:49:48 pm
say what?
Title: Re: PCS 2 UI Discussion
Post by: Windrunner on April 28, 2007, 07:00:22 pm
say what?

I warned you before about your trolling and spamming and you didn't listen. You are banned until further notice...
Title: Re: PCS 2 UI Discussion
Post by: Raven2001 on April 28, 2007, 07:42:39 pm
Well, was about time if I may say so.

On topic again: hows it coming along? :)
Title: Re: PCS 2 UI Discussion
Post by: Bobboau on May 02, 2007, 01:12:10 am
tomaro after midnight I will be done with the last of my school things for this semester.
Title: Re: PCS 2 UI Discussion
Post by: WMCoolmon on May 02, 2007, 02:48:44 am
How editable are models in the POF format? Being able to click and drag a thruster point or glowpoint around in the viewer seems like a very useful feature. Once you have that capability, it seems like a small step to apply that to individual (ship/shield/LOD) mesh points, so long as they're using the same kind of vector-based positional data as other items in the POF.

I am not familiar with IBX files or mesh data at all, though, so I'm just guessing.
Title: Re: PCS 2 UI Discussion
Post by: Bobboau on May 03, 2007, 01:17:37 am
well the big problem with that is actually getting to point you want to move around. I have some ideas on how we should proceed with 3d editing, but I need to get this UI stuff done first, which should not take too long once I get back to work on it, which should be in the next day or two.
Title: Re: PCS 2 UI Discussion
Post by: Kazan on May 07, 2007, 12:52:35 pm
PCS2 has it's own internal format - PMF - that should be VERY editable, it's more akin to COB than POF.  IT is a nice intermediate step in that it has pretty much all the features of POF that are missing from COB, but it's not compiled into BSP data as in POF.

BSP compilation is only performed when exporting to POF
Title: Re: PCS 2 UI Discussion
Post by: Scooby_Doo on May 07, 2007, 06:48:29 pm
With this PMF, can we extract subobjects and replace them with other subobjects, like turrets for example?  Or are the meshes more interconnected?
Title: Re: PCS 2 UI Discussion
Post by: Kazan on May 07, 2007, 06:59:20 pm
theoretically replacing the geometry of an object would be trivial
Title: Re: PCS 2 UI Discussion
Post by: Kazan on May 09, 2007, 10:25:08 am
hey bobboau - status update?
Title: Re: PCS 2 UI Discussion
Post by: Kazan on May 16, 2007, 09:23:01 am
bob? status update pls?
Title: Re: PCS 2 UI Discussion
Post by: Bobboau on May 17, 2007, 07:24:29 am
after I mail off something to some people, this is my next project.
Title: Re: PCS 2 UI Discussion
Post by: Bobboau on May 18, 2007, 07:33:44 pm
ok, I'm setting myself a deadline, I will have the editors done by 11:59pm saturday.
Title: Re: PCS 2 UI Discussion
Post by: Kazan on May 18, 2007, 11:01:20 pm
hardcore :D  :eek2: 

should be gravy... i've been waiting for the editors up to implements the last things on the 1.0 roadmap as most of them are end-polishy type things
Title: Re: PCS 2 UI Discussion
Post by: Nuke on May 19, 2007, 06:00:10 am
at le4ast youre making progress, ive been staring at my nuke3d engine code all day, i wrote 2 lines of code, and neither worked :D
Title: Re: PCS 2 UI Discussion
Post by: Bobboau on May 20, 2007, 01:05:01 am
well, that didn't happen, I did get started by midnight :), ok, well I have nothing else to work on for the rest of the next three months so I'm sure there will be some interesting results soon.

got the turret editor done.
Title: Re: PCS 2 UI Discussion
Post by: Kazan on May 20, 2007, 09:08:27 am
k
Title: Re: PCS 2 UI Discussion
Post by: Bobboau on May 20, 2007, 01:17:59 pm
yeah, all I have left is paths, glowpoints, and subobjects (I'm not going to make editors for insig or shields, they will probably just have the basic chunk controls of apply, discard, import, export)

with regards to paths, I'm not sure if I should support the whole 'turrets' part, my last editor didn't suport them, but it seems they do have some function in game, but I'm still not sure what that function is.
Title: Re: PCS 2 UI Discussion
Post by: Kazan on May 20, 2007, 01:53:35 pm
i'm not sure either... error on the side of support
Title: Re: PCS 2 UI Discussion
Post by: Whitelight on May 20, 2007, 08:47:58 pm
Forgive me if this reply is on the stupid side, I sometimes don`t see what is really in front of me, but...  :nervous:

Wouldn`t the paths be for, tracking the turrets position, for incomming bombers or fighters, maybe?
Title: Re: PCS 2 UI Discussion
Post by: Kazan on May 20, 2007, 09:04:16 pm
that's what i always figured
Title: Re: PCS 2 UI Discussion
Post by: Whitelight on May 20, 2007, 09:18:18 pm
Cool, then i`m good today, thanks.  :D
Oh, and thanks for the really quick reply Kazan.  :)
Title: Re: PCS 2 UI Discussion
Post by: Nuke on May 21, 2007, 01:16:11 am
i always thought they were attack paths for ais. so that they can aproach the turret, shoot it, and fly off without colidint with the cap ship. though i never went through the trouble of creating them.
Title: Re: PCS 2 UI Discussion
Post by: Kazan on May 21, 2007, 12:18:02 pm
that's what we just said :P
Title: Re: PCS 2 UI Discussion
Post by: Nuke on May 21, 2007, 06:14:39 pm
oh, my bad. are we gonna get an autopath feature. be nice if we can insert an autopath and drag the points around pretty much at will. this will shorten the time required to path large cap ships.
Title: Re: PCS 2 UI Discussion
Post by: Whitelight on May 21, 2007, 06:32:46 pm
If i`m not mistaken, I may be! But Aurora could put paths in, but for me, it had a down side to it, as it corrupted the model file making it un-useable.  :(
Putting paths in manually, as I have had to do, can be a pain, depending on the model, and or, subsystem and turret placement.. Very large cap ships are time consuming, remember each path has 4 vectors, and each consecutive vector as it approaches the target subsystem gives a smaller radius.. Umm I`m babbling now so i`ll shut my pie hole.  :lol:
Title: Re: PCS 2 UI Discussion
Post by: Bobboau on May 21, 2007, 07:20:49 pm
auto-path was a relatively easy feature, I can implement it in a mater of hours.
Title: Re: PCS 2 UI Discussion
Post by: Bobboau on May 21, 2007, 07:57:43 pm
ok, last of the easy ones (glow points) done, now onto paths and submodels.
Title: Re: PCS 2 UI Discussion
Post by: Kazan on May 21, 2007, 09:31:21 pm
cool
Title: Re: PCS 2 UI Discussion
Post by: Bobboau on May 22, 2007, 09:50:07 pm
about 80% done with paths, it seems the turret issue isn't going to be an issue, sence there does not seem to be anything in the path data structures about them.

hey, while I'm posting, I'm just wondering how posable will additional GL windows be? like if in the future I wanted to make a UV editor that had a GL canvas window in it? (not the same class as our current render window, would not need any 3d related code)

[edit]done with paths all that's left is submodels, then I start working on the tree so you can actualy USE any of these[/edit]
Title: Re: PCS 2 UI Discussion
Post by: Nuke on May 23, 2007, 01:56:08 am
go bob go!
Title: Re: PCS 2 UI Discussion
Post by: Bobboau on May 23, 2007, 11:21:28 pm
I'm working on subobjects now, it's turning out to be easier than I had thought, especially sense I'm just making it edit only one subobject at a time (the tree will select which one), I'm going to need to make a few more primitive controls, multi-line string editors and int list selectors (combo box you select an option for which gets converted to an int for the moment I'm just useing normal int controls which will get the job done for the moment but allow for illegal values and don't tell you what the valid ones are)

alright, submodels is semi-done pending me making the int list control, which I'll do tomorrow, then I'll get the tree working, which will take a few days, they it will be time to fine tune the interface (most of the controls have some issues with some data sections not standing out as well as they should I need to add some white space to make things flow better).

it will soon be time to start talking about how the UI is going to talk with the render window. the jist of how I'm thinking this should work is a set of functions in the UI base class that will give out several lists of grpoints (a general purpose vector based class for use in the 3d UI would have a position a radius and a normal even if they weren't always used, flags will determine how they are displayed (ie a flag to determine weather or not to draw a normal, if the normal data is junk it shouldn't be displayed)). I'm thinking a vector of vectors of grpoints, and an int to identify the currently selected list and another int to identify the currently selected point in that list, the GL windo gets this, draws it, and if the GL window makes any changes it sends the modified vector of vectors of grpoints back to the UI to do the actual editing, so there would only need to be one set of functions in the GL window for graphically editing 95% of all data in the model, and these set's of functions would be COMPLETLY generic, so they wouldn't have to worry about what data is selected or if any data is selected it would just have to manage this vector of vectors, update the display when it gets a new one, call a function when it makes changes to it.

let's not do anything concrete until I make my commit and the text editor it in good shape though.
Title: Re: PCS 2 UI Discussion
Post by: Col. Fishguts on May 24, 2007, 03:51:05 am
*cheers for Bob*

You seem to be on a coding spree, don't let anything stop you !
Title: Re: PCS 2 UI Discussion
Post by: Kazan on May 24, 2007, 09:19:20 am
k, feel free to edit the renderer as you need - openGL is not that hard, if you have to add runtime variables to the PMF class make sure to stick their decs in the right comment block (Rendering data) in the header - the PMF class stores all the data, so really you just need to stick some context data in - ie what subdata to render (like gunpoints) and any small context variables like "Current selected index", etc and write the code to render the context.
Title: Re: PCS 2 UI Discussion
Post by: Bobboau on May 25, 2007, 04:34:54 am
is the pof file specs up somewhere I forget which int relates to which movement type.

[edit]nevermind, I found it on the net archives, and they don't tell me what I want to know. :(

figured it out using a hex editor and the source.[/edit]
Title: Re: PCS 2 UI Discussion
Post by: Bobboau on May 25, 2007, 07:30:13 am
http://freespace.volitionwatch.com/blackwater/pcs2.zip

ok, I've got the basics working for submodels, I'll get the rest of them working later. I _am_ slowly progressing on this. I still have some work to do with the way the control panel is managed, currently it is always deleted and as a result there is a somewhat noticeable flicker when you switch submodels, it might be worth the effort to either have all the controls in exsistance but only one visible, but each control holds a temporary copy of it's data so I doubt it (we'd be effectively doubling our memory usage).

we may want to consider auto-applying data when you switch data items (raqther than adding a nag), that is one thing that always pissed me off about modelview's editor.
Title: Re: PCS 2 UI Discussion
Post by: Kazan on May 25, 2007, 09:13:34 am
PCSHandler.h should have #defines for which movement type is which.. and commit your changes to cvs!
Title: Re: PCS 2 UI Discussion
Post by: Vasudan Admiral on May 25, 2007, 09:31:47 am
It's looking good. :D
Not entirely sure if you want bug reports yet, but just in case:

1) The textures seem to be reading the UV map upside down. At least, that's what it looks like on all the models I've tried (you'll need to test on UV mapped ships rather than tiled ones for obvious reasons though.)
2) Loading any model with a nameplate immediately crashes PCS (fenris, hecate, deimos etc). The little status bar down the bottom left freezes at 'nameplate'.
3) Turret bases or rotating things like radar dishes don't seem to display their axis of rotation. The arms of the same turrets do though.
4) Not really a bug, but could the controls for the roll axis and the zoom get switched around? Most other 3d model windows do this, so it gets kinda awkward using one that doesn't. ;)

Can't wait to see this finished.  :yes:
Title: Re: PCS 2 UI Discussion
Post by: Kazan on May 25, 2007, 09:33:42 am
1) he hasn't updated from CVS in a while it seems :D
2) noted, will investigate once he commits cvs updates and cvs commits
3) elaborate
Title: Re: PCS 2 UI Discussion
Post by: Vasudan Admiral on May 25, 2007, 09:43:13 am
3) Upon opening any ship with multipart turrets and/or radar dishes, say the orion, selecting SubObjects>detail-0>turret01a will select the base of that turret. All the properties display correctly, but the axis is "none" for all rotating bases. In fact, I just then noticed that the non rotating turrets actually have the X axis defined, though they're set to No Movement.

Essentially, in the second level of heirarchy (the turrets), stuff that is supposed to rotate is set to Movement Type -> Rotate but the axis is set to None. Stuff that isn't supposed to rotate is set to No Movement, but they have the X Axis defined as the Axis of rotation. This same case applies to non moving stuff like the LODs and debris.

Meanwhile the third level of heirarchy (the turret arms) are fine on both accounts.
Title: Re: PCS 2 UI Discussion
Post by: Bobboau on May 25, 2007, 03:57:31 pm
a lot of stuf that has no movement type will have an axis set, most model editors just blanked that out if there was no movement type so you wouldn't see it, with turrets, rotation information is sort of optional, I'm fairly sure what it is showing is what is in the file, nothing raised any red flags for me anyway.
Title: Re: PCS 2 UI Discussion
Post by: Vasudan Admiral on May 25, 2007, 07:04:35 pm
Both PCS1 and modelview show that the orions turret01a has an axis defined for the base, though modview muddled up which one.

While I don't know if FS bothers at all with the axis defined for the turret bases, I do know it needs to be set correctly for radar dishes - currently PCS2 is displaying 'None' there as well on the orion and fenris (loading the original models).
Title: Re: PCS 2 UI Discussion
Post by: Bobboau on May 27, 2007, 01:24:16 am
ok, so I need you people to do some actual discussion about something here, what would you prefer in the tree when you select an item, it shows only that item or it brings up the item's chunk with it selected?
Title: Re: PCS 2 UI Discussion
Post by: Nuke on May 27, 2007, 01:35:34 am
i cant seem to get into any of the other editors. i cant load a cob. and it srews up the uv of any pofs it loads. but the tree looks nice. :D
it will be hard to judge the interface for real until its at least a little more complete and i actually have to process a model through it.
Title: Re: PCS 2 UI Discussion
Post by: Bobboau on May 27, 2007, 01:38:11 am
none of the other editors have been implemented yet, as I have not decided on how to implement them, hence me asking for oppionions on the matter.
Title: Re: PCS 2 UI Discussion
Post by: Nuke on May 27, 2007, 01:43:02 am
i was under the impression you had. ideally id like all functionality to be preasent in the tree and on the control panels. the tree should then be set up for fast editing by advanced users who know what they are doing and want to do it as quickly as possible. the panes should be layed out for the les skilled, with more information about what everything does. also it helps advanced users quickly see any mistakes they may have made.
Title: Re: PCS 2 UI Discussion
Post by: Vasudan Admiral on May 27, 2007, 01:56:58 am
I think it would depend on the thing being selected.

Ie, for engine glow points assuming the tree looks like this:

Engines
|-- Thruster01
|   |--GlowPoint01
|   |--GlowPoint02
|
|-- Thruster02
    |--GlowPoint01

Selecting GlowPoint02 in the Thruster01 group for example should display in the pane what we currently see in the "Thruster" box in PCS 1.
That is:
1) The GlowPoint count of the Thruster01 group (and the add/copy/remove buttons)
2) The properties of the Thruster01 group
3) A list of the GlowPoints positions and radii present in the Thruster01, kinda like how modview displays it, with GlowPoint02 highlighted.

Selecting either of the Thruster## groups or the Engines root should display in the pane a list of the all the Thruster groups in the model along with the usual add/copy/remove buttons, as well as the Import Data button.

About 3) - best idea here I think would be a sort of mini table thing as you might have in MS Word - so the cursor can be moved around with tab or arrow keys to enable you to quickly edit any values you need to.
Title: Re: PCS 2 UI Discussion
Post by: Nuke on May 27, 2007, 05:16:54 am
can it be possible to say drag and drop a thruster glowpoint from one thruster to another, or rearange thrusters in a group via drag+drop. and when you get down to the low level bits of data like normals, position vectors, and other vars, make them interchangeable as well (so long as the data/object type is compatable).
Title: Re: PCS 2 UI Discussion
Post by: Kazan on May 27, 2007, 09:56:32 am
i thought I fixed the UV issues in HEAD
Title: Re: PCS 2 UI Discussion
Post by: Vasudan Admiral on May 27, 2007, 10:19:26 am
Just checked, and they were present in the 20070507b build.

Or do you mean what's in CVS at the moment? Ie, later stuff than that build?
Title: Re: PCS 2 UI Discussion
Post by: Kazan on May 27, 2007, 10:32:18 am
yes i belive so
Title: Re: PCS 2 UI Discussion
Post by: Bobboau on May 27, 2007, 10:48:14 pm
can it be possible to say drag and drop a thruster glowpoint from one thruster to another, or rearange thrusters in a group via drag+drop. and when you get down to the low level bits of data like normals, position vectors, and other vars, make them interchangeable as well (so long as the data/object type is compatable).

I would very much like to do this.
Title: Re: PCS 2 UI Discussion
Post by: Kazan on May 28, 2007, 09:40:40 am
feel free to implement awesome features


*cough*cvs commit*cough*i haven't seen any commit emails*cough*
Title: Re: PCS 2 UI Discussion
Post by: Nuke on May 28, 2007, 06:54:24 pm
yea get your code synced up so we can provide more useful test data.
Title: Re: PCS 2 UI Discussion
Post by: Bobboau on May 28, 2007, 08:55:04 pm
I updated my code right after that build I posted, I've been sort of busy with stuff, I hope to know exactly what I want to do by the time I get to work on this again, (I should have time tomorrow). Ill commit when I have something that can be used (when I get the tree's basic functionality done, which should not be too huge a task). this is why I asked for discusion on how exactly everyone wanted the tree to work. and I'm thinking as of right now that selecting an item in the tree will mearly load it's chunk editor and bring the item to focus, which is also a lot easier to code than the other method.
Title: Re: PCS 2 UI Discussion
Post by: Kazan on May 28, 2007, 11:12:05 pm
I'm thinking as of right now that selecting an item in the tree will mearly load it's chunk editor and bring the item to focus, which is also a lot easier to code than the other method.

that's what i had in mind when i originally coded the tree
Title: Re: PCS 2 UI Discussion
Post by: Nuke on May 29, 2007, 01:00:49 am
it woulf be cool if you could follow every branch down to the individual data types, which could then me edited by clicking on them in the tree.
Title: Re: PCS 2 UI Discussion
Post by: Bobboau on May 29, 2007, 03:57:07 am
yeah, and the way I have it coded it wouldn't be obsenely hard to do, but the more I think about it the more I realse that as cool as that might be I don't think it would be very useful, how oftine do you need to edit just the radius of a thruster, usualy it's best to have all the information at hand. I think makeing it so that selecting a data element places the curser into the relivent control will have the same effect without hideing useful information from you, and the most important thing about the tree will be the drag and drop ability to move nodes around at will, and copy data of the same type.
Title: Re: PCS 2 UI Discussion
Post by: Nuke on May 29, 2007, 04:43:31 am
that seems like it might work. editing data directly in the tree may prove more difficult than just punching the data into the right box.
Title: Re: PCS 2 UI Discussion
Post by: Vasudan Admiral on May 29, 2007, 05:59:34 am
About the chunk editor, would a MS word style table format be possible?

Almost like how modview does it:
(http://i5.photobucket.com/albums/y184/VA--Twisted_Infinities/Misc/RightPanelSuggestion.jpg)

Except that you could edit values directly into the table there and use the arrow keys or tab to move between cells. Something like that strikes me as the fastest way to edit most pof data, since you could do it pretty much entirely with the keyboard.
Title: Re: PCS 2 UI Discussion
Post by: Bobboau on June 02, 2007, 05:41:16 pm
new build (http://freespace.volitionwatch.com/blackwater/pcs2.zip)
basic tree functionality is implemented, I will probably be committing soon if no major bugs are found.

next item on the list for the tree is drag and drop functionality, but I might work on integrating the 3d display a bit more first.
Title: Re: PCS 2 UI Discussion
Post by: Topgun on June 02, 2007, 06:38:02 pm
is there any way we can tell the exact size of a model?
Title: Re: PCS 2 UI Discussion
Post by: Bobboau on June 02, 2007, 06:58:37 pm
well in the header editor it will give you the max radius and bounding box for the model.
Title: Re: PCS 2 UI Discussion
Post by: Topgun on June 02, 2007, 07:21:30 pm
the reason I am asking is because I am making a tie fighter for swtc fate of the galaxy and I want it to be perfectly scaled to cannon size.
Title: Re: PCS 2 UI Discussion
Post by: Bobboau on June 02, 2007, 08:17:24 pm
bounding box will probably be more useful to you then.
Title: Re: PCS 2 UI Discussion
Post by: Bobboau on June 02, 2007, 08:39:27 pm
while you all bug hunt, I'm going to wite the omnipoint code, it won't stop me from commiting because it won't be used untill after I commit. this will be the main method by which things will be edited in the 3d controls. it's basicly a 2d vector of points with a radius and normal that the editor makes and gives to the GL canvas, the GL canvas makes changes to it and sends it back to the editor, which applys these changes to it's copy of the data. flags tell the GL canvas how the data is to be used and displayed (if the normal and radius are to be used for instance). and three colors are provided for unselected items, items that are in the selected list and the selected item.

this is mostly a heads up for kazan, so he has some idea how I'm planning on going along with this sence he's probly going to have to write the low level code for this.
Title: Re: PCS 2 UI Discussion
Post by: Kazan on June 02, 2007, 08:52:13 pm
that makes no sense - data should never be written to the GL canvas.. the GL canvas is not in any way part of the data storage - it's just displaying - consider all actions in relation to it const - i'm not sure what you're trying to describe or do there

any flags/bits of data you need to store for it should be stored as runtime-only variables inside the PCS file class, just like the variables that are already there.
Title: Re: PCS 2 UI Discussion
Post by: Vasudan Admiral on June 02, 2007, 09:30:56 pm
I'm getting a crashes during load on a lot of models with this build that didn't happen before. A lot still work, but a lot will lock it up.

Some examples of retail models that freeze it:
- awacs2t-01
- BeamSaber
- bomber2t-01
- bomber2t-03
- bomber2v-02
- bomber04 up to bomber10

to name a few.

Also, clicking on the turrets item in the tree on a model that doesn't have any causes an instant CTD.

The tree itself looks great so far though. :)
Title: Re: PCS 2 UI Discussion
Post by: Scooby_Doo on June 02, 2007, 09:55:32 pm
I just noticed something, maybe you already know it.  When load a model, it'll view very nicely, but if you maximize the window, it disappears.
Title: Re: PCS 2 UI Discussion
Post by: Bobboau on June 02, 2007, 10:00:44 pm
@VA: I still have a bit of buffer protection to implement, it's probly trying to read or write to something that doesn't exsist, which will crash it like that. if it crashes after the progress bar on the bottom fills all the way, then it's probly my fault.

@SD: the renderer doesn't seem to handle changeing aspect ratio's properly, try moveing the editor or tree panes to make the render window bigger (or smaller), that might help for the moment.
Title: Re: PCS 2 UI Discussion
Post by: Vasudan Admiral on June 02, 2007, 11:29:27 pm
As far as I can tell, it's crashing before the loading bar fills. It's a bit tricky to tell though, since it's so fast at loading. ;)

The "Loading Model" text down the bottom right appears, and it hangs there for a second or so with no apparent movement on the bar before the menu bar and tree view white out. After that point it just stays that way - there's no eror message of any kind.
Title: Re: PCS 2 UI Discussion
Post by: Bobboau on June 03, 2007, 12:24:57 am
actualy looking at it, it seems to be crashing in SignalModelChange before hitting any of my code, around the multi-threaded stuff, so that's probly not my bug, see if the most recent build Kaz released does it.
Title: Re: PCS 2 UI Discussion
Post by: Vasudan Admiral on June 03, 2007, 12:46:48 am
Oh....
Yeah it does happen in Kaz' latest build.

I guess I just didn't notice when testing that version, though I wonder how I could have missed something like that. :\
Title: Re: PCS 2 UI Discussion
Post by: Scooby_Doo on June 03, 2007, 12:59:44 am
I see the problem...

Load a model, it'll appear in the view,
now resize the toolbar (either one) and it'll get messed up. (the model gets distorted)

It looks like your trying to maintain the aspect ratio, when you should be maintaining model size.
Title: Re: PCS 2 UI Discussion
Post by: Bobboau on June 03, 2007, 03:04:53 am
yeah, that's... what I think I said...

and the zip is updated, I tried adding in some more buffer protection, but I might have made a > were I should have made a < and thus caused it to cull off valid data. make sure it doesn't crash when selecting adding or removing stuff, and that when you do any of that it actualy does what it's suposed to do (remember you need to hit the apply button for data in the tree to get updated).

and if there are no problems by the time I wake up I'll probably see about committing this stuff finally.
Title: Re: PCS 2 UI Discussion
Post by: Bobboau on June 03, 2007, 11:49:38 pm
ok, so no problems?

well I need kaz to walk me through how to get CVS working again for me to commit into sourceforge.
Title: Re: PCS 2 UI Discussion
Post by: Kazan on June 04, 2007, 07:24:07 am
http://sourceforge.net/cvs/?group_id=26889
Title: Re: PCS 2 UI Discussion
Post by: Bobboau on June 04, 2007, 03:29:53 pm
I remember it took me three days and you guiding me by hand and at one point me letting you hijack my computer to get it working last time...
Title: Re: PCS 2 UI Discussion
Post by: Kazan on June 04, 2007, 05:27:55 pm
putty+tortoiseCVS+setting up shared key for your sf.net account
Title: Re: PCS 2 UI Discussion
Post by: Bobboau on June 04, 2007, 10:38:52 pm
you do realise the link you provided mentions all of 'if you are a developer you use SSH' in terms of what I'm suposed to do right?

I vaguely remember putty being related to something I have to run externaly to my CVS client and it had half a dozen components. I just installed tortise after fighting with a similar client for the last few hours.

I am still listed as a dev with right privileges, right?
also what should my SSH parameters be? I seem to still have all the putty stuff from when I worked on FE2.
Title: Re: PCS 2 UI Discussion
Post by: Kazan on June 04, 2007, 11:31:00 pm
read tortoiseCVS's instructions for EXT SSH, using putty and pagent, you have dev rights

site doc for shared keys: http://sourceforge.net/docs/F02/
site doc for CVS services: http://sourceforge.net/docs/E04/
Title: Re: PCS 2 UI Discussion
Post by: Bobboau on June 05, 2007, 01:39:47 am
hey, I think I got it working... alright! that went a lot smoother than I was expecting it to.

I added a bunch of new files, mostly the editors, I'm going to try and clean out as much of the old unused UI stuff as I can tomorrow.
Title: Re: PCS 2 UI Discussion
Post by: Kazan on June 05, 2007, 07:43:22 am
this interface is brilliant bro

[edit]
now i guess we need to work on context rendering and bug fixing
Title: Re: PCS 2 UI Discussion
Post by: Bobboau on June 05, 2007, 03:54:50 pm
thanks :)
I already started a little bit on getting the basics for context rendering, I'm useing what I call omnipoints to represent 99.9% of everything we are going to need, the idea I have is that there is a 2d vector of these and the GL canvas doesn't need to know anything about them, the editors will simply pass a few flags about what should be rendered the GL canvas modifies the value for one or more of the points, then sends the vector back to the editor which applies the changes. the editors already have some (sloppily written while I was waiting for bug reports) get and set functions for omnipoints, mostly what needs to be done interface wise is get and set omnipoint functions for the GL canvas, and get and set functions for which point is selected (the function would have two ints).

the biggest pitfall in this system is that the number of omnipoints in any part of the vector absolutely can not be changed by the GL canvas, and the editor absolutely must make sure it updates the GL canvas with a new omnipoint vector anytime any data (especaly new points/banks) is altered. so we will need to basicly have a 'start edit' mode when the user clicks on the GL canvas with a key pressed (or something) were the data in the editor is transfered (copied actualy) to the GL canvas (or maybe not sence the editor should be keeping the GL canvas up to date) and then the GL canvas makes changes to the data and the editor can not make changes to it's own data untill after edit mode is ended and the data is transfered back to the editor. I'm prety sure most if not all edit modes would only be operating on one (set maybe, if we allow multable selection in the tree) of data at a time, so this probly shouldn't be as monolithic as it might sound, I'm just going into detail on something I've only partaly worked out.

but there is still a fair bit of cleaning to do with what we have before we get side tracked on that, if you want to work out a way of efficently drawing a set of spheres of a set position and radius with a specific color (preferably useing vertex and index buffers), that would probably be a good use of time in regards to this.  there will be three seprate colors for this to deal with, unselected, selected row, and selected item, I'm sure the meanings of these are obvius. I think geodesic spheres in wire frame and lightly alpha blended, if posable, would be cool.
Title: Re: PCS 2 UI Discussion
Post by: Bobboau on June 05, 2007, 11:36:23 pm
ok, I just removed most-if-not-all of the old UI that wasn't being used anymore, make sure I didn't forget anything or do something stupid or generally **** anything up, doesn't look like I did, hopefully you didn't modify any of the effected files since last night.

oh, and tester people, if you get an error of the "Array out of bounds!" sort, that is a top priority bug, that error should _never_ ever happen, EVER! that is a last line of defence error message and will crash the app.
make sure you tell me about it and what model you were loading when it happened, even especially if you think you have an odd/damaged model.
and I want you to try to make it do this, doing things involving adding and/or deleting things and/or moving your selection are things that would be most likely to trigger this.
Title: Re: PCS 2 UI Discussion
Post by: Bobboau on June 06, 2007, 07:19:30 am
ok folks new build (http://freespace.volitionwatch.com/blackwater/pcs2.zip) fr today, I did a lot of work on polishing the UI,I changed a bunch of int text boxes to int lists for things like model numbers, that required a slight bit of hackitry due to the way that the lower children have absolutely no means of getting direct access to the model, but you needant worry yourselves with that.. so long as it works anyway... which it will!... you need to test this...

I also spent a chunk of time making more useful defaults for new items, I'm particularly happy with how paths worked out. I'll start working on either 3d related stuff next or do some automation things like, everyone's favorite, auto-turret.
Title: Re: PCS 2 UI Discussion
Post by: Axem on June 06, 2007, 09:03:38 am
Um, I can't seem to see the model when I load it. The 3D window is just blank all the time.  :(
Title: Re: PCS 2 UI Discussion
Post by: Kazan on June 06, 2007, 09:20:14 am
[edit]
nevermind.. he just replaced it

oh.. bob... i just noticed when i maximize the window it doesn't resize the status bar at the bottom... i think it used to... can you make sure it gets resized


[edit again]
it did... you didn't create an onsize event for your new main pane... making it for you

[edit]
i'm getting an exception on exit from ntdll.dll and the cloest line it resolves to is window.cpp from wxWindowMSW

[editweee]
ok... i had to add a bool isDestroyed to main_panel and Destroy immediately sets it to true and then the EVT_SIZE function returns immediatelty if (isDestroyed) - but ihave the status bar resizing working
Title: Re: PCS 2 UI Discussion
Post by: Bobboau on June 06, 2007, 02:32:52 pm
ok, so you fixed the status bar thing, but the exception on exit is still there? I'm not getting one.

[edit]just fixed and commited a small bug preventing the editor window from scrolling when it needed to[/edit]
Title: Re: PCS 2 UI Discussion
Post by: Kazan on June 06, 2007, 03:02:36 pm
the code that was causing the exception on exit (i don't know WHY it was causing the exception, it just was) is disabled after main_panel->Destroy() is called (bool isDestroyed is set to true, so OnSize simply returns)
Title: Re: PCS 2 UI Discussion
Post by: Bobboau on June 06, 2007, 07:27:20 pm
I'm wondering if our current data flow is the way we want to go, that is the whole apply/revert buttons, I can probably without much trouble have the data in the model updated as soon as the user modifies it in the editor.
Title: Re: PCS 2 UI Discussion
Post by: Kazan on June 06, 2007, 07:36:14 pm
do it... and later maybe an undo buffer can be added
Title: Re: PCS 2 UI Discussion
Post by: Bobboau on June 06, 2007, 07:42:30 pm
I'm going to leave the buttons there, because I intend to add load/save chunk abilities there. and I don't feel like removing them just so I can put them back almost exactly like they are now a week from now.
Title: Re: PCS 2 UI Discussion
Post by: Mav on June 07, 2007, 06:53:28 pm
http://sourceforge.net/cvs/?group_id=26889

Uh, hi :) .
I just tried to check the CVS out as anonymous, but it didn't want to connect - I'd guess I most like made an error when I used "fs2_open" as projectname and modulename... So what should these be? :confused:
Or do I need this putty too for anonymous checkout?

Sorry for leading the discussion off-topic :nervous: , but this seemed a good place to ask as you already had the same topic popping up, at least shortly.


And of course I'm happy to see that PCS2 seems to progress quite well so far :)  - keep on with it  :yes: .
Title: Re: PCS 2 UI Discussion
Post by: Kazan on June 07, 2007, 07:02:24 pm
project name is alliance
module name is pcs2

fs2_open is the SCP, and they're on different servers
Title: Re: PCS 2 UI Discussion
Post by: Mav on June 07, 2007, 07:49:34 pm
Thanks :)

... Ooops, so that adress (warpcore or something like that) from the wiki is still actual? Because I got an error there, too; though a somewhat stranger one - "cvs [server aborted]: "import" requires write access to the repository"...  :shaking: :confused:
Title: Re: PCS 2 UI Discussion
Post by: Kazan on June 07, 2007, 09:01:47 pm
warpcore is not where my apps are hosted, i use sf.net
Title: Re: PCS 2 UI Discussion
Post by: Bobboau on June 08, 2007, 12:47:21 am
yeah PCS2 is (from a code point of view) totally unrelated to the SCP (other than the fact that it writes file for it of course.)
Title: Re: PCS 2 UI Discussion
Post by: Bobboau on June 09, 2007, 03:08:40 pm
hey, kaz, is there any particular reason why the GL canvas doesn't accept wheel events?
probably has to do with it not accepting focus.

also I am in the proccess of adding omnipoint editing capabilities, though not drawing, in theory all you will need to do is make a function that takes an omnipoints structure and build a (set of) vertex (and posably index) buffer(s) out of it, and code to draw that (set of) buffer(s) in the GL render function. you should wait untill I commit this before working on anything remotely high level about this.
Title: Re: PCS 2 UI Discussion
Post by: Kazan on June 09, 2007, 03:35:23 pm
i think the outermost panel has to capture wheel events... but i've never dealt with them before
Title: Re: PCS 2 UI Discussion
Post by: Bobboau on June 09, 2007, 03:51:03 pm
I got it to work by forcing the GL window to get focus, to further complicate the issue I also captured which window had focus before hand and give it focus back on the mouse leave event. this could cause problems if the window which had focus gets deleted in the time between when the mouse enters the render window and leaves again. but I don't think that's likely, because for the user to do anything that would cause any window to be deleted they would have to leave the window.

while I was in the GL canvas I took a look at the code responcable for fixing the aspect ratio and it's the damndest thing, I though I had figured out why it wasn't working (you had it doing integer division when it should have been float) but changeing that to what it should have been didn't change anything, it's still only accepting the integer part of the passed float.

(maybe if I rebuild the solution it's just magically fix itm [edit]nope, to see what I meen, load a model, if the render window get's taller than it is wide the model will disapear, if it get's two or three times as wide than it is tall it will fix it's self but only for 2.0 or 3.0 (ect) aspect ratios[/edit])
Title: Re: PCS 2 UI Discussion
Post by: Bobboau on June 09, 2007, 07:12:41 pm
ok, I just committed today's work, right now it would probly be a good time to work on omnipoint rendering. my recommendation would be to add code to wxGL_PMFCanvas::refresh_omni_points (called when ever something on the outside made a modification to the internal omnipoints) that makes one or more vertex/index buffers from wxGL_PMFCanvas::omni, and add code to wxGL_PMFCanvas::Render to draw these buffers if they exist. omni is a struct which represents a 2d array of omnipoints, it in addition to the array also has render (and data type) flags, and colors for unselected points, points in the array which is selected, and the point in the selected array which is selected. hopefully different colors can be done with the same vertex buffer. it might be worth it to have the selected point be drawn on it's own so when it's moved nothing else has to be constantly rebuilt (internal modification of the omnipoints is not taken into account with regards to the refresh_omni_points method). I moved all omnipoint related stuff into it's own header (including a color class that could probably be better off somewhere else). omnipoint editing should work right now unfortunately you can't see what you are doing, don't worry too much about making it look pretty at this point, once I have some basic code in place I'll see about making a geosphere based indicator.
Title: Re: PCS 2 UI Discussion
Post by: Kazan on June 09, 2007, 10:59:28 pm
feel free to make those changes yourself - openGL is easy and straightforward
Title: Re: PCS 2 UI Discussion
Post by: Bobboau on June 09, 2007, 11:02:24 pm
well if this was an API I knew I could do it in an hour or two, I don't realy want to learn a whole new graphics API just to draw some spheres. I'm suposed to be the UI programmer not graphics, and I've gotten everything but the low level drawing code done.
Title: Re: PCS 2 UI Discussion
Post by: Getter Robo G on June 10, 2007, 10:57:10 am
Heh, you guys deserve your own Project Badge for this: (PCS2).

 :D
Title: Re: PCS 2 UI Discussion
Post by: Bobboau on June 11, 2007, 01:03:06 am
tell you what, I just doodled some crap code that seems like it can make a vector of vector3ds (points) and one of int triples (representing triangles) and a third vector which tells you were to start looking in the triangle vector for a geodesic sphere of a given resolution. I also have some very straightforward formulas for telling you how many points and triangles should be in a sphere of a given resolution. I was just curious as to how complex a process it would be, hence the doodle code (nothing actualy directly useful), but the basic idea behind it might be useful.
if you could just give me an entry point, a graphic vert struct that has position and color, and a function that would take (1) an kaz_vector of those and make GL's equivalent to a vertex buffer and (2) a vector of shorts and make an index buffer, and then set those to be drawn I'll do all the procedural geometry stuff. all I need you to do, is the lowest of the low level API stuff.
Title: Re: PCS 2 UI Discussion
Post by: Bobboau on June 12, 2007, 12:02:39 am
well I'm working on drag and drop now, it seems that icons for all items in the tree are a requirement of this, so I've had to make a bunch of icons, and as a result I have a nifty batch file for  converting normal editable graphics into XPM
Code: [Select]
@echo off

:LOOP
if   "%1"==""  goto  DONE
set str=%1

convert %str:~0,-4%.%str:~-3% %str:~0,-4%.xpm
shift

goto LOOP
:DONE

this batch file requires you have Image Magick (http://file:///H:/Program%20Files/ImageMagick-6.3.4-Q16/index.html) installed, you just drag one or more files onto it and it'll convert all of them.

also for things like the insignia, I have thought for a long time that the way to go with that would be to have a non-pof data chunk representing a few boxes that would define were the insignia should be, and then to have the editor build the geometry when saveing as POF, given that PCS has a native non-pof working file format, I think this would work even better, however there is no way to reconstruct the insg boxes from an exsisting insg chunk, so importing of insg would be lost, unless we did something tricky.
Title: Re: PCS 2 UI Discussion
Post by: Bobboau on June 12, 2007, 01:09:40 am
for everyone else, this is how drag and drop is going to work.
there are three levels dragability, the first level is undragable items, these will be the chunks, draging a chunk makes no sense cause there is no were for you to go with it. the second and probably most intuitive will be abstract data, abstract data is any collection of primitive data which exists in arrays, this will be things like your weapon points and your paths and stuff like that. abstract data will generally have the most drag and drop flexibility, as it will use DND primaraly as a means to allow hierarchy modification, for example moving (or copying) a (posably more than one) thruster point from one bank to another. abstract data will only be dragable if it makes sence for it to be, if there is no were to go with it you won't be able to drag it, for example you will be able to move the verts of a path, but not the paths themselves (reordering is a seperate operation from draging) because there is only one array with paths in it, this means some chunks will have nod draggable items at all, like specal points and eyes. the final catagory will be primitive data, this will be your ints and strings, the only thing you will be able to do with primitive data is overwriteing one primitive data's contents with another. for example, selecting the position vector of a thruster and draging it onto the position vector of a special point will move the specal point to the location of the thruster. this final catagory is the lowest priority and might not ever get done, but I't what I have in mind.
Title: Re: PCS 2 UI Discussion
Post by: Bobboau on June 12, 2007, 03:15:25 am
ok, you people better apreciate how screwed I'm going to be in five hours cause I stayed up till 3am when I have to wake up for work at 6 working on this.

new build (http://freespace.volitionwatch.com/blackwater/pcs2.zip)
you now have all, or most, of the submodel editing abilities you realy realy wanted, you can rearainge the hierarchy (only for submodels) and if you hold down control you can move them on the screen, cause I hooked them into the omnipoint editing system. so you can prety much do anything sort of polygon/uv editing or rotateing submodels. yes, your welcome... there will probly be repricusions in terms of bounding boxes needing to be recalculated or something, but that is for another time.

and there seems to be a slight bug in my omnipoint code in that it will assign the value of the last thing you were moveing to the thing you just started moveing, consitering this is the first visual feed back I've got with the system it's not suprizeing, I'll fix it tomorow.
Title: Re: PCS 2 UI Discussion
Post by: Mav on June 12, 2007, 01:05:29 pm
ok, you people better apreciate how screwed I'm going to be in five hours cause I stayed up till 3am when I have to wake up for work at 6 working on this.

    ...

... so you can prety much do anything sort of polygon/uv editing or rotateing submodels...
:jaw: :jaw: :jaw:
Take it as appreciated... wow!  :yes2: :cool: :yes:

And Getter Robo G is right - you should get a badge for this :nod: .
Title: Re: PCS 2 UI Discussion
Post by: Bobboau on June 12, 2007, 03:44:09 pm
eh, that should have been short not sort. I was half asleep when I wrote that post.
so, you can not do that yet. but you will eventually.

anyway, is nobody reading this? I would have expected more of a response by now, that's the sort of feature people have been begging for for years.
Title: Re: PCS 2 UI Discussion
Post by: RazorsKiss on June 12, 2007, 04:03:48 pm
It's still afternoon, in the US.

You'll get some more later today, I'm sure.  It looks very nice thus far.
Title: Re: PCS 2 UI Discussion
Post by: Spuddy2000 on June 12, 2007, 04:06:32 pm
Yes I am. ;) ;)
Have downloaded latest version.
Works out of the box no textures though!! :confused:
Yes I have paths for textures in the .ini file.
Good to have all the options of PCS!!
I can't see any selection indicators on my main model screen when I select something though!!
Is this intended or a problem with me??
I have Windows 2000 and Inspiron 8000 laptop with 500Meg RAM. ATI graphics chipset.

PCS2.....Its a great modelling tool........ upgraded to be even cooler so bozos like me can use it!!!Keeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeep Goiiiiiiiiiiiiiiiiiiiiiiiing

 :tumbleweed:
Title: Re: PCS 2 UI Discussion
Post by: Bobboau on June 12, 2007, 04:56:46 pm
if by selection indicators you mean something in the 3d window to show the various points of the POF data, then that has not been implemented, I don't know Open GL and kaz seems to be refusing to write the last bit of code for that for some odd reason, guess he's busy with something else, but it should be working in a build or two.
Title: Re: PCS 2 UI Discussion
Post by: Mav on June 12, 2007, 05:28:11 pm
eh, that should have been short not sort. I was half asleep when I wrote that post.
so, you can not do that yet. but you will eventually.
Oops... But still it's great :) . And as long as you are planning to implement those, well... :yes:
Though I'll most likely stick to tS for these things, anyway :D .  (prepares to defend against tS-rants...  :shaking: ;) )
It would be nice to have the option to quickly correct small errors (that you've recognised too late) this way, though.
Title: Re: PCS 2 UI Discussion
Post by: Water on June 13, 2007, 01:42:56 am
anyway, is nobody reading this? I would have expected more of a response by now, that's the sort of feature people have been begging for for years.
Seems to work ok, but closes tree after each move.

Unrelated:
Your DevIL ver 1.6.1
Kazan uses ver 1.6.6
New one crashes if devil  *.dll files not 1.6.1

Saving large pofs seems to work now.  ;)
Textures don't show on vLarge objects. (black view) Probable auto zoom guesses wrong
Title: Re: PCS 2 UI Discussion
Post by: Bobboau on June 13, 2007, 01:51:43 am
yeah the tree closing is sort of annoying, it's weird that it's doing that I would expect either everything to close or nothing, I'll have to look into that.

hmm and here I thought I was using the most up to date DevIL, maybe I just grabbed the wrong DLLs.
Title: Re: PCS 2 UI Discussion
Post by: WMCoolmon on June 13, 2007, 02:54:38 am
I'm just playing with PCS2 in an empty state, but it seems like
A) Every time I add a gun point, my missile point will disappear (And vice versa)
B) The tree starts out completely collapsed and way too small
Title: Re: PCS 2 UI Discussion
Post by: Nuke on June 13, 2007, 03:02:58 am
im still getting that uv bug.
Title: Re: PCS 2 UI Discussion
Post by: Bobboau on June 13, 2007, 03:13:41 am
hmmm... yes, weapon points do seem to have a bug there, I hate haveing to deal with weapon points, Kaz made a bad design choice on how he handled them... rather than two separate lists there is one list and you have to differentiate everything based on it's type (an int in the bank structure), I must have simply set the list in the model to a sublist containing only the items in the control, I'm suprized no one else noticed that bug yet.

not sure what you mean in part B, there should be about a dozen root nodes each one colapsed (cause there is nothing in them, except for the weapon points which is divided), is this not how it is for you? what do you mean by 'way too small', you mean how thin it is? there was some sort of odd bug with the resizing frame I haven't been able to resolve were that frame will not get any smaller than what I initially set it to be.



UV bug?
loading textures upside down?
if that's the case I bet it's DevIL, it does that for some things, for no good reason.
what is the texture format? (I know it load TGAs upside down)
were has Kaz been? some of this is stuff he needs to look into.



ok everyone, I want you to download tonight's build (http://freespace.volitionwatch.com/blackwater/pcs2.zip) and I want you to load up a model and I want you to go to the path's section and I want you to look towards the bottom and tell me if you see anything interesting.
Title: Re: PCS 2 UI Discussion
Post by: Nuke on June 13, 2007, 03:35:48 am
im a little drunk right now so im probibly not too good at debugging things. but my texture format is usually dxt 1 or 5, and in the case of the ships i tested, both formats were used. seems to be a case of texture inversion.
Title: Re: PCS 2 UI Discussion
Post by: Water on June 13, 2007, 03:40:51 am
hmm and here I thought I was using the most up to date DevIL, maybe I just grabbed the wrong DLLs.

Sorry my mistake - Kazens dlls work ok with your one. I had a DevIL rc2 in there by mistake (this was causing the crash)
Title: Re: PCS 2 UI Discussion
Post by: WMCoolmon on June 13, 2007, 06:04:21 am
Attached is how PCS2 looks when I first start it up. (New build). Note how the tree is almost completely nonvisible, you have to drag it out. It's a minor thing but is probably easy to fix.

I don't see what use there would be in making the tree get any smaller, if you want it to disappear entirely you'd be better off relying on a menu item or a button, which you could assign a hotkey to. Hiding the tree and settings pane along the right might not be a bad idea, it'd help people with precision placements of points using the graphical interface, or just taking pretty pictures of ships.

[attachment deleted by admin]
Title: Re: PCS 2 UI Discussion
Post by: Nuke on June 13, 2007, 11:05:07 am
well id put a little tab on it that you could click to expand the tree withut the need of a drag and drop event. the tree would allocate as much space as it needs to display everything without scrolling.
Title: Re: PCS 2 UI Discussion
Post by: Kazan on June 13, 2007, 11:31:16 am
hmmm... yes, weapon points do seem to have a bug there, I hate haveing to deal with weapon points, Kaz made a bad design choice on how he handled them...

i didn't want to putz with code duplication or function redirection (IE look at how POFHandler.h handles GPNT/MPNT and TGUN/TMIS) so I made them one list of "hardpoints" with a type flag

[edit]
some notes

A) Memory leaks increased significantly when i CVS-updated this morning
B) Scroll wheel zooming needs to be faster
C) Please tell me what features you have implemented from the feature request thread (http://www.hard-light.net/forums/index.php/topic,41648.0.html) so I can mark them "in testing"
D) Please use the PCS2 Test Builds Thread (http://www.hard-light.net/forums/index.php/topic,47023.0.html) for posting builds
Title: Re: PCS 2 UI Discussion
Post by: Bobboau on June 13, 2007, 06:41:37 pm
well all I know is with that setup weapon points, which should be one of the simplest bit's of data has been practically the bane of my existence, it's probably too late to change it now though.

A)when was the last time you had updated? I've seen a bunch of memory leaks for a while (usually like <4 bytes) I have been under the impression that they are coming from wxWinows. but I have been on a lookout for anything that could be causing it. but I don't use the new operator much (if at all) except for when making new windows, which wxWindows then tells me it'll take care of.

B) I agree, I'm intending to focus on the 3d controls a lot more soon.

C) all data is editable now, more or less (maybe one or two things which I overlooked, or things which get ignored).

I just wrote some auto-path code, it's not 100% done, but the feature most people are going to use is done. I don't have a thing for setting a given path automatically, only genorateing a new set of paths, which nesisaraly erases existing paths (I exempt docking bay paths)

I can probably write a gunpoint convergence calculator after I take a nap (which is what I have scheduled next on my itenerary) that should be ridiculously simple.

C) had forgotten about that.
Title: Re: PCS 2 UI Discussion
Post by: Kazan on June 13, 2007, 08:01:17 pm
from what i've read i think they're false positives from CrtDebug... it's the memory manager fragmenting.. it's not really leaked, it's just unallocated memory that hasn't bee reclaimed yet
Title: Re: PCS 2 UI Discussion
Post by: Kazan on June 14, 2007, 09:22:37 am
oh bob... they should be able to store comments in PINF so make it editable

[edit]
important note for geometry editing.  if you edit the geometry of a subobject you MUST call PCS_Model::SetObjectChanged(unsigned int idx) with that subobjects number otherwise the BSP cache, if present, will still be used when writing to a POF

(this is a new function that will be in CVS soon)

also making it so PMFs write their BSP cache to disk, and when BSP cache is present and a SOBJ is changed when it's saved to POF again it'll cache the new BSP.

this ups the PMF file version to 102 (not that that matters to you)

also found a bug in PMF writing - forgot to update the output version number to 101 when I implemented those changes.. so any version 101 PMFs written before now would read in corrupt (because the reader sees version 100 so skips reading some data that is present in 101... gettting offsets all fusterclucked)
Title: Re: PCS 2 UI Discussion
Post by: Bobboau on June 14, 2007, 05:14:43 pm
PINF editing should be so trivial it'll take me less than ten minutes, if that.
in fact, lets time it.
Title: Re: PCS 2 UI Discussion
Post by: Bobboau on June 14, 2007, 05:33:00 pm
alright, more or less done, I didn't realise till the last second that PINF was a list of strings, I thought it was just one so I'm going to have to go back and make a multi-line string list, in stead of just a multi-line string.

hmmm. took a little longer than I was expecting, 15 minutes.
Title: Re: PCS 2 UI Discussion
Post by: Kazan on June 15, 2007, 12:11:52 pm
i assume the current tree graphics are place holders?

[edit]
oh... and the mouse scroll... way too fast now.. model went into oblivion and won't come back.. we need a reset for that :P
Title: Re: PCS 2 UI Discussion
Post by: Bobboau on June 15, 2007, 09:49:47 pm
they are placeholders that are good enough if we don't think of anything else.

working on the scroll wheel...
Title: Re: PCS 2 UI Discussion
Post by: Bobboau on June 16, 2007, 07:22:56 pm
anyway, I'd realy like the 3d stuff, so...

ok, if I'm gona draw something, it would be like

Code: [Select]
glBegin(GL_POLYGON);

for(each vert in the poly list){
glTexCoord2f(u,v);
glNormal3fv((GLfloat *)/*pointer to a vector*/);
glVertex3fv((GLfloat *)/*pointer to a vector*/);
}
glEnd();
???
Title: Re: PCS 2 UI Discussion
Post by: Bobboau on June 17, 2007, 04:45:51 am
linking error?... LINKING ERROR!?!?! well, gotdamnit you knew good and well that was suposed to be inline'ed! MSVC quit screwing with me!!!!
Title: Re: PCS 2 UI Discussion
Post by: Kazan on June 17, 2007, 10:08:39 am
anyway, I'd realy like the 3d stuff, so...

ok, if I'm gona draw something, it would be like

Code: [Select]
glBegin(GL_POLYGON);

for(each vert in the poly list){
glTexCoord2f(u,v);
glNormal3fv((GLfloat *)/*pointer to a vector*/);
glVertex3fv((GLfloat *)/*pointer to a vector*/);
}
glEnd();
???

pretty much yup - each list of coords between the begin and end defines one polygon.. you can also define triangle strips, lines, etc - right there you only have point normals.. you forgot polygon normals

Code: [Select]
void PCS_Model::RenderGeometryRecursive(int sobj, TextureControl &tc)
{
vector3d trans = OffsetFromParent(sobj);

glTranslatef(trans.x, trans.y, trans.z);

// Prep for rendering the geometry

kaz_vector<pcs_polygon> &polygons = subobjects[sobj].polygons;
// render geometry
unsigned int i;
int tex_id;
for (i = 0; i < polygons.size(); i++)
{
tex_id = tc.TextureTranslate(polygons[i].texture_id);
if (!Wireframe)
{
if (tex_id != -1 && !Textureless)
glEnable(GL_TEXTURE_2D);
glBindTexture(GL_TEXTURE_2D, tex_id);
glBegin(GL_POLYGON);
}
else
{
glBegin(GL_LINE_STRIP);
}

glNormal3fv((GLfloat *) &polygons[i].norm);
for (unsigned int j = 0; j < polygons[i].verts.size(); j++)
{
if (!Wireframe && tex_id != -1 && !Textureless)
glTexCoord2f(polygons[i].verts[j].u, polygons[i].verts[j].v);

glNormal3fv((GLfloat *) &polygons[i].verts[j].norm);
glVertex3fv((GLfloat *) &polygons[i].verts[j].point);
}


glEnd();

if (!Wireframe && tex_id != -1 && !Textureless)
glDisable(GL_TEXTURE_2D);
}

// render children
kaz_string name;
for (i = 0; i < subobjects.size(); i++)
{
name = subobjects[i].name.str_to_lower();

if (subobjects[i].parent_sobj == sobj &&
strstr(name.c_str(), "-destroyed") == NULL)
RenderGeometryRecursive(i, tc);
}


// return to parents position
glTranslatef(-trans.x, -trans.y, -trans.z);

}
Title: Re: PCS 2 UI Discussion
Post by: Bobboau on June 17, 2007, 12:45:06 pm
I think I have a rudimentry handle on it, I made a primitive renderer for the omnipoints.
I posted a build and committed it.
Title: Re: PCS 2 UI Discussion
Post by: Kazan on June 25, 2007, 03:12:00 pm
You were complaining about problems w/ loading because of the Threads?

it's easy - make a copy of main_panel::SignalModelChange and change the second argument to new wxPCS2OpenThread from &model to a pointer to the PCS_File you wish to load the model into - may be a good idea to create a wxP...

here i'll just do it very quick

[edit]
private main_panel::LoadImportModel(kaz_string filename) Loads filename into private PCS_Model::import_model
Title: Re: PCS 2 UI Discussion
Post by: Bobboau on June 25, 2007, 06:28:17 pm
I made a modification were you pass it a (local) model rather than have one that you will need to have hang around all the time, even when you are done with it. you don't think there will be any dependencies do you?
Title: Re: PCS 2 UI Discussion
Post by: Bobboau on June 25, 2007, 06:56:09 pm
ok, I have single chunk import from other POF/PMF/COB working, but I'm not going to post anything untill I get global import and take care of the speacal case code around subobjects, then we'll have something REAL neat to talk about.
Title: Re: PCS 2 UI Discussion
Post by: Kazan on June 25, 2007, 06:58:40 pm
soon as you were done with the model you could call import_model.Reset() and it would be purged
Title: Re: PCS 2 UI Discussion
Post by: chief1983 on July 01, 2007, 09:01:38 pm
I just ran across a bug in the Preferences pane.  If I highlight a directory and hit delete, the next directory I select gets updated with the last directory's path, instead of updating the patch box with the new one's info.  It doesn't happen when the deleted directory was the last in the list, but it happens when any other directory is deleted.
Title: Re: PCS 2 UI Discussion
Post by: chief1983 on July 02, 2007, 01:17:10 am
I think it would be great if in addition to checking the directories listed in the Preferences for textures, if it also searched the folder the current model is located in.  I also think that it would be cool if the program supported drag and drop loading, ie drag the icon from windows explorer onto the main pcs2 window and have it load it from that.  That'd probably be a bit more work than the last thing I suggested though, and not a huge increase in productivity from it.  However, something I think would help productivity a ton is an Undo feature.  I noticed there are a lot of things that can be easily edited in the gui now, so easily that it could even happen by accident.  An undo feature would help in situations like that among others.  That's all I've noticed so far.
Title: Re: PCS 2 UI Discussion
Post by: Bobboau on July 02, 2007, 01:39:16 am
add .\ to your texture paths

undo we have under consideration.
Title: Re: PCS 2 UI Discussion
Post by: chief1983 on July 02, 2007, 02:07:47 am
Ah.  Well then, I guess I would suggest having .\ be in the default list of texture paths.  Other than that, it's awesome.  Keep it up.
Title: Re: PCS 2 UI Discussion
Post by: Trivial Psychic on July 02, 2007, 12:01:54 pm
Something's not working for me with regards to texture paths.  I've got paths set to the root FS2 path (I've got my MVPs in with my root... bad me), FSPort mod directory, and my personal mod directory which is FSPort-derived.  You would expect that it would be able to load textures from all three, but if I open a model in my mod directory and the texture it needs is in the MVPs, it doesn't seem to load them.  It will work if the maps are extracted from the VP into my mod directory, or into the maps folder of root FS2, but it won't grab them from the media VPs.  Any thoughts?
Title: Re: PCS 2 UI Discussion
Post by: Kazan on July 02, 2007, 01:57:59 pm
are the mediaVPs in a path specified in the paths?

ie
c:\games\freespace2\mediavps is where they are and it's specified as a path
Title: Re: PCS 2 UI Discussion
Post by: chief1983 on July 02, 2007, 04:32:46 pm
He said his mvps are in his root, and his root is in the paths.

I would check that the priority you want is correct, I'd bet that it's either loading from another path first, or, PCS2 didn't follow the same priority order for going through the mediavps that FS2 would.  That would probably be a bug then.  But yeah, shame on you for throwing your mvps in with all your other stuff.  The other possibility is that your paths didn't get saved the way you thought you typed them in, there's a couple small bugs in the preferences pane that might have caused that.  But yeah, I bet it's some sort of priority issue, if everything is set up right on your end.
Title: Re: PCS 2 UI Discussion
Post by: Bobboau on July 02, 2007, 05:22:43 pm
I know PCS2 does not follow FSO's load order.
Title: Re: PCS 2 UI Discussion
Post by: Trivial Psychic on July 02, 2007, 11:13:13 pm
Well, I would have put my MVPs in a separate folder, but that's one more thing to add into the command line.  Besides, I run things rather customized in terms of what I want used and what I want not used, for my basic FS2 (no mods).

There's no Mantis category for PCS2, so do I need to make any official report anywhere?
Title: Re: PCS 2 UI Discussion
Post by: RazorsKiss on July 02, 2007, 11:27:37 pm
http://ferrium.org/mantis/
Title: Re: PCS 2 UI Discussion
Post by: DarkShadow- on July 27, 2007, 03:40:12 pm
oh, and tester people, if you get an error of the "Array out of bounds!" sort, that is a top priority bug, that error should _never_ ever happen, EVER! that is a last line of defence error message and will crash the app.
make sure you tell me about it and what model you were loading when it happened, even especially if you think you have an odd/damaged model.
and I want you to try to make it do this, doing things involving adding and/or deleting things and/or moving your selection are things that would be most likely to trigger this.

Well, yay, got that error.  :doubt:

I was working on Trashman's Cobra class frigate (Hades Combine -> Terran Frigate -> Cobra Class Frigate). I tried to add a turret by copying turret16 and renaming the copy to turret19. Then I moved both turrets (length) and tried to save the file. Well, crash. Trying to find the error, I reopened the model and just changed the position of turret16, even to some weird places. No crash at all, moving on. This time I just copied turret16 and didn't change any position. When saving, the program crashed again (Array out of bounds).

So, any idea what's the problem causing this bug?
Title: Re: PCS 2 UI Discussion
Post by: Bobboau on July 27, 2007, 04:07:46 pm
so it crashed on save? when you copied a submodel?
Title: Re: PCS 2 UI Discussion
Post by: TrashMan on July 27, 2007, 04:16:46 pm
BOB, you decided on icons yet? You're gonna use the ones I made?
Title: Re: PCS 2 UI Discussion
Post by: DarkShadow- on July 27, 2007, 04:27:25 pm
Yep, when I was saving the file.

Tested some more ships:
The Boreas from Inferno works fine, added 2 turrets, moved them around, no crash.
The old Star Rider Gunboat (Hades Combine -> Terran Transports -> Star Rider ALPHA Release) crashes if I copy a turret and save.
The Orc from Inferno works fine.