Author Topic: I made PCS explain it'self a little better  (Read 5291 times)

0 Members and 1 Guest are viewing this topic.

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
I made PCS explain it'self a little better

http://freespace.volitionwatch.com/blackwater/PCSB.zip

for all you people who have problems with PCS saying; "one or more of the twenty thousand of your polygons is in some way not to my liking so I'm not going to convert your model" ie the stack overflow message, this should be somewhat more useful, unfortunately due to the way Kaz structured his BSP builder getting all the data together was extremely more complicated than it should have been, so I added in two more to give you information when it was easily available in the program. it'll tell you roughly were the problem is and then in what subobject, you need to remember that this is in FS units so what it gives you needs to be modified by the scaleing factor and TS XYZ == FS ZXY, and I think X is negitive, but other than that it usualy lands on at least one of the problem pollies, though in theory it could return a large box with multable polys inside.

anyway this is all just hacked in cause I was haveing problems with an increadably complex model I was trying to convert, and I needed a clue, and I figured it would be usefull to others.

it also suports auto-faceted shadeing. have fun:)
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 karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: I made PCS explain it'self a little better
Well this is ****ing ironic. I spent all last night locked in mortal combat with PCS trying to get it to convert a model for BtRL.

It never worked but I did uncover a possible bug I'm wondering if your build fixes.

In cobconversion.cpp you have this

Code: [Select]
//BSPData = new char[409600]; // four hundred K should be enough


BSPData = new char[4194304]; // four MEGABYTES per sobj should be enough for SCP

Problem is that on two occasions elsewhere in the code you have this

Code: [Select]
memset(BSPData, 0, 409600);

So it's only flushing the first 400kB of the buffer.



Anyway is there any chance I can get hold of your source code for the is change (and also for SDL the download I have is borked, continually asking for strings.h with no clue of which of the 5 million variations of strings.h it actually wants).
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline Nuke

  • Ka-Boom!
  • 212
  • Mutants Worship Me
Re: I made PCS explain it'self a little better
ah cool, any chance you can add a few more formats?
I can no longer sit back and allow communist infiltration, communist indoctrination, communist subversion, and the international communist conspiracy to sap and impurify all of our precious bodily fluids.

Nuke's Scripting SVN

 

Offline Col. Fishguts

  • voodoo doll
  • 211
Re: I made PCS explain it'self a little better
Yay :yes:

Now while you're at it, add a simple edit box for the ship radius field, pretty please ?
"I don't think that people accept the fact that life doesn't make sense. I think it makes people terribly uncomfortable. It seems like religion and myth were invented against that, trying to make sense out of it." - D. Lynch

Visit The Babylon Project, now also with HTL flavour  ¦ GTB Rhea

 

Offline IPAndrews

  • Disgruntled Customer
  • 212
  • This site stole my work
Re: I made PCS explain it'self a little better
Does this build do smooth groups correctly? And fix the glowpoint import bug? Per chance? Yes I know it's asking a lot put the answer just might be yes.
Be warned: This site's admins stole 100s of hours of my work. They will do it to you.

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
Re: I made PCS explain it'self a little better
@karajorma:
well I didn't when you posted that, but I just went and added a geometry buffer size in the options frame, and altered those sections of code, don't know how well it works though.
I should mention it seemed like he figured some sort of dynamic buffer, so that might have been legacy code.

I'll post the sln tonight, I've been up way too long and I have school tonight.


@everyone else:
eye's gots ta sleep!
I'll do all that later sure(exept for the formats thing), but it'll be a horrable dirty hack. I consiter this dead code as Kaz has a replacement in the womb.

@IP:I think Kaz fixed the glowpoint import thingy a while back, and this was taken from CVS a few hours ago.
and it uses my auto-facet code from a while back, it works for me and I am a full bore artist as well as coder, (unlike kas who is primarily coding) so take that as you will.

BTW 90% of the time I spent was getting it to compile, Kaz and his damned non-standard libs...
and MS and it's damned dropped suport for standard libs.
« Last Edit: March 21, 2007, 11:24:06 am 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 karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: I made PCS explain it'self a little better
Thanks bob. Actually I got my code from a CVS checkout yesterday so unless I checked out the wrong module or something I can't see how I'd have old code.

Mine also has the same build number as yours (1.3.5 R72) so it looks like we're working from the same source.


While I'm at it Kazan suggests getting write access to CVS and committing those changes.
« Last Edit: March 21, 2007, 11:35:40 am by karajorma »
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline Kazan

  • PCS2 Wizard
  • 212
  • Soul lives in the Mountains
    • http://alliance.sourceforge.net
Re: I made PCS explain it'self a little better
heh that lack of flushing isn't a problem due to the way the system works, nice bug though, fix it pls

it's crufty because it's based off cob2pof or whatever the command line program was, and i didn't really understand what i was writing yet - PCS2 is much cleaner, and if both you guys would like to help me on PCS2.. it would help motivate me to work on it

PS: PCS2 requires wxWidgets, OpenIL .. and nothing else i think
PCS2 2.0.3 | POF CS2 wiki page | Important PCS2 Threads | PCS2 Mantis

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

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: I made PCS explain it'self a little better
Actually I checked out PCS2 earlier today. I won't have time to do much with it until the BtRL demo is out and even then I'm not much of a graphics, models or physics programmer so I doubt I'll be doing much except fixing bugs in the GUI for a long while :D
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline Kazan

  • PCS2 Wizard
  • 212
  • Soul lives in the Mountains
    • http://alliance.sourceforge.net
Re: I made PCS explain it'self a little better
if one of you wants to do the GUI for me.. that would be the biggest help you could give - i hate writing user interface - an the module interface to PMF (the internal model format) is pretty straight up

PCS2 is really a design that shows
1) lessons i learned from mistakes with PCS1
2) my progress becoming a better programmer
3) my inability to type on insufficient sleep and too much stress
PCS2 2.0.3 | POF CS2 wiki page | Important PCS2 Threads | PCS2 Mantis

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

 

Offline Turey

  • Installer dude
  • 211
  • The diminutive form of Turambar.
    • FreeSpace Open Installer Homepage
Re: I made PCS explain it'self a little better
For anyone who uses this, a bit more useful version of Bob's coordinate conversion:
TS  FS
X = Z
Y = -X
Z = Y

I used the output of this build, and it seems to get the coordinates exact. Good Job!  :yes:

Now to find out how those 15 points differ from the rest of the model...  :doubt:
Creator of the FreeSpace Open Installer.
"Calm. The ****. Down." -Taristin
why would an SCP error be considered as news? :wtf: *smacks Cobra*It's a feature.

 

Offline Col. Fishguts

  • voodoo doll
  • 211
Re: I made PCS explain it'self a little better
Oh, and while you coding people are here. I've got a question on how the collision detection on a POF works.

I gather it uses a BSP tree, but is that data stored seperately from the polygon data in the POF ? If so, I guess there's a function in PCS that calculates the collision detection stuff from the COB file.

Now, would it be possible to get a feature into PCS, that would allow the user to re-generate the BSP stuff for an existing POF ? I'm asking because POFs generated with the 3DSMax exporter often have non-solid parts or collisions get detected slightly outside/inside the ship's hull.
If PCS could generate the collision detection data for such POFs, that would be super awesome.
"I don't think that people accept the fact that life doesn't make sense. I think it makes people terribly uncomfortable. It seems like religion and myth were invented against that, trying to make sense out of it." - D. Lynch

Visit The Babylon Project, now also with HTL flavour  ¦ GTB Rhea

 

Offline takashi

  • Better than TrashMan
  • 29
Re: I made PCS explain it'self a little better
any hope of a modelview style viewer so people can see where they're putting things? (remembers making a ship with PCS only to find the lasers and missles popped out of random places)

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
Re: I made PCS explain it'self a little better
what is and is not done in PCS2?

I actualy got a lot of experience with wxWidgets from makeing proXimus.


source as promised
http://freespace.volitionwatch.com/blackwater/PCSsource.zip
I wasn't expecting anyone to ever see any of that, and I was a bit angery when I wrote that so it realy is an example of codeing violence, it's realy bad the few things I changed, it realy realy should not be made a permanent fixture of the code, I wasn't even planing to release this to the public until after how usefull it turned out to be.

you'll also need these odd creatures
http://freespace.volitionwatch.com/blackwater/ap.zip

and SDL, which I don't have a link to
« Last Edit: March 21, 2007, 03:55:45 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
Re: I made PCS explain it'self a little better
most of the interface needs to be done in PCS2 and the COB->PMF conversion code (which is where all the "Autogen" features from PCS1 get ported to) - wxWidgets is capable of beautiful interfaces, and I am terrible at making beautiful interfaces.

all model files get converted into PMF once loaded into PCS2 - that allows me to only have to worry about doing the BSP split once in the PMF to POF conversion (when a POF is loaded the BSP is cached in the PMF so it doesn't have to be regenerated)

Col. Fishguts: I could easily make PCS2 regenerate POF BSP trees (the geometry and data is interleaved)
« Last Edit: March 21, 2007, 04:43:56 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 karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: I made PCS explain it'self a little better
and SDL, which I don't have a link to

Damn. That was the one that was screwing me over. I kept getting errors in the actual SDL includes until I changed strings.h to string.h and although it compiled I'm not at all certain that was a good idea.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
Re: I made PCS explain it'self a little better
MS dropped suport for a lot of standard .h libraries when they went to .net (ie they used to suport <iostream> and <iostream.h> but now they don't), that was a huge pain to deal with, especaly all the std namespace crap.

alright, so basicly you have a fully functional POF handeling (loading/data accessing/saveing) class, and (little or) no interface code for it, that should be not too hard, I'll give it a shot.
are you useing some third party interface designer or is it just pure, by hand, WX?

and I hope you made more use of stl this time, in this sort of application you realy don't need to reinvent the wheel especially if it involves dropping functionality. lack of std::vector and std::string were a real hinderence when medling with the PCS source.
« Last Edit: March 21, 2007, 09:48:11 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 Nuke

  • Ka-Boom!
  • 212
  • Mutants Worship Me
Re: I made PCS explain it'self a little better
somone demonkey kaz, i bet it makes him feel unwelcome. you can give his monkey to say takashi :D

im sorta slowly learning c while i port my lua 3d engine to it. so i might (though very unlikely) be able to help on some stuff later down the line. but dont expect no miracles :D
I can no longer sit back and allow communist infiltration, communist indoctrination, communist subversion, and the international communist conspiracy to sap and impurify all of our precious bodily fluids.

Nuke's Scripting SVN

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
Re: I made PCS explain it'self a little better
BTW kaz, I'm using MSVC 2005 now if that's a problem for you.

and it looks like I'm going to have to do a lot of the same things to get it to compile, would you rather I used the std namespace explicitly everywhere I needed to (file/io streams) or would you prefer a type casting?
« Last Edit: March 21, 2007, 11:11:01 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

 
Re: I made PCS explain it'self a little better
Sweet it looks like pcs2 might actually on the roll  :)
That's cool and ....disturbing at the same time o_o  - Vasudan Admiral

"Don't play games with me. You just killed someone I like, that is not a safe place to stand. I'm the Doctor. And you're in the biggest library in the universe. Look me up."

"Quick everyone out of the universe now!"