Author Topic: PCS 2 UI Discussion  (Read 43977 times)

0 Members and 1 Guest are viewing this topic.

Offline Kazan

  • PCS2 Wizard
  • 212
  • Soul lives in the Mountains
    • http://alliance.sourceforge.net
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);

}
PCS2 2.0.3 | POF CS2 wiki page | Important PCS2 Threads | PCS2 Mantis

"The Mountains are calling, and I must go" - John Muir

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
I think I have a rudimentry handle on it, I made a primitive renderer for the omnipoints.
I posted a build and committed it.
« Last Edit: June 17, 2007, 01:19:46 pm by Bobboau »
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together

 

Offline Kazan

  • PCS2 Wizard
  • 212
  • Soul lives in the Mountains
    • http://alliance.sourceforge.net
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
« Last Edit: June 25, 2007, 03:26:34 pm by Kazan »
PCS2 2.0.3 | POF CS2 wiki page | Important PCS2 Threads | PCS2 Mantis

"The Mountains are calling, and I must go" - John Muir

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
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?
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
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.
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together

 

Offline Kazan

  • PCS2 Wizard
  • 212
  • Soul lives in the Mountains
    • http://alliance.sourceforge.net
soon as you were done with the model you could call import_model.Reset() and it would be purged
PCS2 2.0.3 | POF CS2 wiki page | Important PCS2 Threads | PCS2 Mantis

"The Mountains are calling, and I must go" - John Muir

  

Offline chief1983

  • Still lacks a custom title
  • 212
  • ⬇️⬆️⬅️⬅️🅰➡️⬇️
    • Skype
    • Steam
    • Twitter
    • Fate of the Galaxy
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.
Fate of the Galaxy - Now Hiring!  Apply within | Diaspora | SCP Home | Collada Importer for PCS2
Karajorma's 'How to report bugs' | Mantis
#freespace | #scp-swc | #diaspora | #SCP | #hard-light on EsperNet

"You may not sell or otherwise commercially exploit the source or things you created based on the source." -- Excerpt from FSO license, for reference

Nuclear1:  Jesus Christ zack you're a little too hamyurger for HLP right now...
iamzack:  i dont have hamynerge i just want ptatoc hips D:
redsniper:  Platonic hips?!
iamzack:  lays

 

Offline chief1983

  • Still lacks a custom title
  • 212
  • ⬇️⬆️⬅️⬅️🅰➡️⬇️
    • Skype
    • Steam
    • Twitter
    • Fate of the Galaxy
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.
Fate of the Galaxy - Now Hiring!  Apply within | Diaspora | SCP Home | Collada Importer for PCS2
Karajorma's 'How to report bugs' | Mantis
#freespace | #scp-swc | #diaspora | #SCP | #hard-light on EsperNet

"You may not sell or otherwise commercially exploit the source or things you created based on the source." -- Excerpt from FSO license, for reference

Nuclear1:  Jesus Christ zack you're a little too hamyurger for HLP right now...
iamzack:  i dont have hamynerge i just want ptatoc hips D:
redsniper:  Platonic hips?!
iamzack:  lays

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
add .\ to your texture paths

undo we have under consideration.
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together

 

Offline chief1983

  • Still lacks a custom title
  • 212
  • ⬇️⬆️⬅️⬅️🅰➡️⬇️
    • Skype
    • Steam
    • Twitter
    • Fate of the Galaxy
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.
Fate of the Galaxy - Now Hiring!  Apply within | Diaspora | SCP Home | Collada Importer for PCS2
Karajorma's 'How to report bugs' | Mantis
#freespace | #scp-swc | #diaspora | #SCP | #hard-light on EsperNet

"You may not sell or otherwise commercially exploit the source or things you created based on the source." -- Excerpt from FSO license, for reference

Nuclear1:  Jesus Christ zack you're a little too hamyurger for HLP right now...
iamzack:  i dont have hamynerge i just want ptatoc hips D:
redsniper:  Platonic hips?!
iamzack:  lays

 

Offline Trivial Psychic

  • 212
  • Snoop Junkie
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?
The Trivial Psychic Strikes Again!

 

Offline Kazan

  • PCS2 Wizard
  • 212
  • Soul lives in the Mountains
    • http://alliance.sourceforge.net
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
PCS2 2.0.3 | POF CS2 wiki page | Important PCS2 Threads | PCS2 Mantis

"The Mountains are calling, and I must go" - John Muir

 

Offline chief1983

  • Still lacks a custom title
  • 212
  • ⬇️⬆️⬅️⬅️🅰➡️⬇️
    • Skype
    • Steam
    • Twitter
    • Fate of the Galaxy
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.
Fate of the Galaxy - Now Hiring!  Apply within | Diaspora | SCP Home | Collada Importer for PCS2
Karajorma's 'How to report bugs' | Mantis
#freespace | #scp-swc | #diaspora | #SCP | #hard-light on EsperNet

"You may not sell or otherwise commercially exploit the source or things you created based on the source." -- Excerpt from FSO license, for reference

Nuclear1:  Jesus Christ zack you're a little too hamyurger for HLP right now...
iamzack:  i dont have hamynerge i just want ptatoc hips D:
redsniper:  Platonic hips?!
iamzack:  lays

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
I know PCS2 does not follow FSO's load order.
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together

 

Offline Trivial Psychic

  • 212
  • Snoop Junkie
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?
The Trivial Psychic Strikes Again!

 

Offline RazorsKiss

  • 28
  • The Cutting Edge
    • RazorsKiss.net
Fringespace - Tachyon: Revived   ModDB Listing   Razorskiss.net 

You only think you can outfly me.

 

Offline DarkShadow-

  • 28
  • Machina Terra
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?
"The most exciting phrase to hear in science, the one that heralds new discoveries, isn't 'Eureka!' but rather 'hmm....that's funny.'" Isaac Asimov

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
so it crashed on save? when you copied a submodel?
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together

 

Offline TrashMan

  • T-tower Avenger. srsly.
  • 213
  • God-Emperor of your kind!
    • FLAMES OF WAR
BOB, you decided on icons yet? You're gonna use the ones I made?
Nobody dies as a virgin - the life ****s us all!

You're a wrongularity from which no right can escape!

 

Offline DarkShadow-

  • 28
  • Machina Terra
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.
"The most exciting phrase to hear in science, the one that heralds new discoveries, isn't 'Eureka!' but rather 'hmm....that's funny.'" Isaac Asimov