Hard Light Productions Forums
Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: Bobboau on June 16, 2002, 04:06:14 pm
-
OK lets get one of the wish list done, this should be one of the easier ones, glow points,
I want someone else to work on this too but I am going to try and get it implemented, what I need is someone who is willing to write a simple editor (Kazan would be my choice cause he could add to his PCS) that would let me have some ability to make the model to test this on the format is prety much the same as thruster glows at this point (could I just copy some FUEL chunk data and rename it to GLOW)
also I would like to restate that I am an idiot and don't realy know what I am doing, so I would like someone who does know what they are doing to see this more as a desperate plea than as "someone is already doing this, so I shouldn't waist my time".
I will post my changes in a minute so you can get a good chucle out of them
-
what I added to the read_model_file function
case ID_GLOW:
char props[MAX_PROP_LEN];
pm->n_glows = cfread_int(fp);
pm->glows = (glow_bank *)malloc(sizeof(glow_bank) * pm->n_glows);
Assert( pm->glows != NULL );
for (int q= 0; q< pm->n_glows; q++ ) {
glow_bank *bank = &pm->glows[q];
bank->num_slots = cfread_int(fp);
if (pm->version < 2117) {
bank->glow_bitmap = -1;
} else {
cfread_string_len( props, MAX_PROP_LEN, fp );
// look for $glow_texture=xxx
int length = strlen(props);
if (length > 0) {
int base_length = strlen("$glow_texture=");
Assert( strstr( (const char *)&props, "$glow_texture=") != NULL );
Assert( length > base_length );
char *glow_texture_name = props + base_length;
if (glow_texture_name[0] == '$') {
glow_texture_name++;
}
bank->glow_bitmap = bm_load( glow_texture_name );
if (bank->glow_bitmap < 0) {
Error( LOCATION, "Couldn't open texture '%s'\nreferenced by model '%s'\n", glow_texture_name, pm->filename );
}
}
}
for (j = 0; j < bank->num_slots; j++) {
cfread_vector( &(bank->pnt[j]), fp );
cfread_vector( &(bank->norm[j]), fp );
if ( pm->version > 2004 ) {
bank->radius[j] = cfread_float( fp );
//mprintf(( "Rad = %.2f\n", rad ));
} else {
bank->radius[j] = 1.0f;
}
}
//mprintf(( "Num slots = %d\n", bank->num_slots ));
}
break;
I also added
int n_glows;
glow_bank *glows;
to
typedef struct polymodel {
just below the thruster equivelent, and
typedef struct glow_bank {
int num_slots;
vector pnt[MAX_THRUSTER_SLOTS];
vector norm[MAX_THRUSTER_SLOTS];
float radius[MAX_THRUSTER_SLOTS];
int glow_bitmap;
} glow_bank;
just below the thruster_bank typedef note there is a bitmap index number (int) were wash info index (char) used to be
also
#define ID_GLOW 'WOLG' // glow points
in ModelsInc.h just below
#define ID_FUEL 'LEUF' // thruster points
almost forgot that
this is all just trying to get the data parsed from a POF, if you thinks this should work now I'll try getting the actual effect working
-
glow points? which ones?
-
well I want to make glow points like the thrusters but are not conected to engines and can have there own seperate textures
there like little sprites that look like lens flares
I war has them I beleve, and this is sort of a must have for BTP, and something everyone else will want
-
what I have done so far doesn't seem to have broken anything, but I have yet to fully test this in a mission (just opened fs and went to the tech DB it didn't crash so I'm guessing it worked (also seems that just copying and renameing the fuel chunk worked))
-
oh, ok, i see. Well, that would be neat indeed, but make sure to increase the allowed number of glows a pof can have. for now it's 15 I think, I did a test once, and I think FS2 crashed with about this amount of glows.
-
ok this is the rendering code
//start rendering glow points -Bobboau
if ( (pm->glows->glow_bitmap != -1) && (Interp_flags & MR_SHOW_THRUSTERS) /*&& (Detail.engine_glows)*/ ) {
for (i = 0; i < pm->n_glows; i++ ) {
glow_bank *bank = &pm->glows[i];
int j;
for ( j=0; jnum_slots; j++ ) {
float d;
vector tempv;
vm_vec_sub(&tempv,&View_position,&bank->pnt[j]);
vm_vec_normalize(&tempv);
d = vm_vec_dot(&tempv,&bank->norm[j]);
if ( d > 0.0f) {
vertex p;
// Make glow bitmap fade in/out quicker from sides.
d *= 3.0f;
if ( d > 1.0f ) d = 1.0f;
// fade them in the nebula as well
if(The_mission.flags & MISSION_FLAG_FULLNEB){
d *= (1.0f - Interp_fog_level);
}
float w = bank->radius[j];
// disable fogging
gr_fog_set(GR_FOGMODE_NONE, 0, 0, 0);
g3_rotate_vertex( &p, &bank->pnt[j] );
gr_set_bitmap( bank->glow_bitmap, GR_ALPHABLEND_FILTER, GR_BITBLT_MODE_NORMAL, d );
{
extern int Gr_scaler_zbuffering;
Gr_scaler_zbuffering = 1;
g3_draw_bitmap(&p,0,w*0.5f, TMAP_FLAG_TEXTURED );
//g3_draw_rotated_bitmap(&p,0.0f,w,w, TMAP_FLAG_TEXTURED );
Gr_scaler_zbuffering = 0;
}
}
}
}
}
//end rendering glow points
put it right under the thruster glow rendering code,
it works in the tech room, but it crashes after rendering the first frame in game,
don't know why,
did that quickly though
that goes into
model_really_render()
wich is in
ModelInterp.ccp
line 2808 or around there
BTW
I'm gona try to figure out what I broke now, please if you can, tell me what I did wrong
-
(http://freespace.volitionwatch.com/blackwater/glowexample.jpg)
works in tech room but not in game
(had to coment out the && (Interp_flags & MR_SHOW_THRUSTERS) bit to get it to work in tech room)
-
Purdy....
-
Now THATS cool!
I'd like to be able to set them to blink as well. Just imagine a carrier landing...or flying past a destroyer with a set of lights winking every once in a while.
-
would be cool but if I or someone who does know what there doing can't get it working, it will just end up like the fighter beams, just functional enough to show off how cool it would be, but not enough to actualy use it anywere
please please please, anybody with an understanding of C please help me, I am beond novice at this stuff, I've taken no classes, only read part of one realy crappy C++ book, I have (ok, almost :rolleyes: ) no Idea what I'm doing, I'm sure you can do better
-
Iwar2 has "glow points" and "glow channels" These are two different things entirely.
A "Glow point" is an omnidirectional light source in the ship's setup scene. The light source has its various lens flare properties set, including animation channels (like the intensity channel, for flashing the glow point).
A "glow channel" is a specially named surface. There are, I think, two basic glow channels (glow1 and glow2). Basically, the polygons that are assigned to this special surface become self illuminated in the engine. The two basic glow channels are simple fade-in/fade-outs.
You can also specify an animation channel hook to glows. For example, if you have a ring of polys around an engine that you want to glow brighter as the ships throttle is increased, you would include the throttle handle (Z+ in this case) and a range of values that determine how bright the glow is at 0% deflection and 100% deflection. The engine interpolates the 'tweens. The same goes for glow points (this is how engine flare glows are handled).
-
yes, well, does that... have anything to do with ... this
:confused:
-
Originally posted by Bobboau
yes, well, does that... have anything to do with ... this
:confused:
Well, yes, as a matter of fact it does, since it was you that mentioned Iwar glowpoints. Um... here:
Originally posted by Bobboau
well I want to make glow points like the thrusters but are not conected to engines and can have there own seperate textures
there like little sprites that look like lens flares
I war has them I beleve, and this is sort of a must have for BTP, and something everyone else will want
I explained them so that you could, perhaps, use the same sort of methodology for implementing the same in Freespace, should you so desire (being that it is a damned good system allowing for all kinds of wonderful dynamic in-game effects).
-
oh, ok, well yes, I could link the glows to diferent things if I so wanted, but I'd need to get them working in some sort of basic fasion first
sorry if I'm comming off as an ass here :D eh he
-
Well, there's atleast one bug in your loading function.
glow_bank *bank = &pm->glows;
should be
glow_bank *bank = &pm->glows;
From quickly looking, I can't spot anything else. I can't do more "looks" at the moment, I'll try at evening.
-
Also, make the glows throw some lightning... like a blue glow blinks and releases blue lighning :)
-
Wanna put this in CVS?
-
Originally posted by IceFire
Now THATS cool!
I'd like to be able to set them to blink as well. Just imagine a carrier landing...or flying past a destroyer with a set of lights winking every once in a while.
Amen, totally - thats a great boost to the incentive to get things rolling! If you could get the blink rate adjustable as a ships.tbl function that'd be great - thus "0" would be no blinks per second - always on. 2 would be 2 blinks per second and so on...
-
it looks like the code frames saw the and thought I meant I wanted something itialisised, I'll change it to something less confusing
and this can go in CVS when it stops crashing the game
and sence this isn't conected to anything that is currently in the ships table, it would probly be easier to add "on time" and "off time" into the glow chunk for each bank probly also be nice to have a time displacement value
-
Originally posted by Eternal One
Well, there's atleast one bug in your loading function.
glow_bank *bank = &pm->glows;
should be
glow_bank *bank = &pm->glows;
From quickly looking, I can't spot anything else. I can't do more "looks" at the moment, I'll try at evening.
I don't see this...
Also what would be nice would be some way to turn them on and off with a SEXP, for all those missions with derelicts... :nod:
-
Well, CVS isn't just for final stuff, it's for collaboration, backup, and a convenient way to let others test stuff out.
You can do all sorts of stuff with CVS to "mark" your in dev build ;) That's the point of it :)
It is very cool, btw.
-
coolmon, you don't see it becase I edited it, look were it says [q] that was but I just changed it becase the forum thought I meant as in italics tags
-
just like ^ that ^ :rolleyes:
-
ok, I just found it crashes when I select any other ship (ie one without glow points) maybe the glow point rendering and thruster rendering are fighting each other
-
case ID_GLOW:{ //start glowpoint reading -Bobboau
//
char props[MAX_PROP_LEN];
pm->n_glows = cfread_int(fp);
pm->glows = (glow_bank *)malloc(sizeof(glow_bank) * pm->n_glows);
Assert( pm->glows != NULL );
for (int q = 0; q < pm->n_glows; q++ ) {
glow_bank *bank = &pm->glows[q];
bank->num_slots = cfread_int(fp);
if (pm->version < 2117) {
bank->glow_bitmap = -1;
} else {
cfread_string_len( props, MAX_PROP_LEN, fp );
// look for $glow_texture=xxx
int length = strlen(props);
if (length > 0) {
int base_length = strlen("$glow_texture=");
Assert( strstr( (const char *)&props, "$glow_texture=") != NULL );
Assert( length > base_length );
char *glow_texture_name = props + base_length;
if (glow_texture_name[0] == '$') {
glow_texture_name++;
}
bank->glow_bitmap = bm_load( glow_texture_name );
if (bank->glow_bitmap < 0) {
Error( LOCATION, "Couldn't open texture '%s'\nreferenced by model '%s'\n", glow_texture_name, pm->filename );
}
}
}
for (j = 0; j < bank->num_slots; j++) {
cfread_vector( &(bank->pnt[j]), fp );
cfread_vector( &(bank->norm[j]), fp );
if ( pm->version > 2004 ) {
bank->radius[j] = cfread_float( fp );
//mprintf(( "Rad = %.2f\n", rad ));
} else {
bank->radius[j] = 1.0f;
}
}
//mprintf(( "Num slots = %d\n", bank->num_slots ));
}
break;
} //end glowpoint reading -Bobboau
I think I had broken the thruster loading part, or I may have fixed it without knowing how, but I did something here and it worked in game untill I targeted one of the fighters
here (http://freespace.volitionwatch.com/blackwater/glowfs.zip) is the EXE and test pof (note there is are some small errors in the new pof data, but they are mearly cosmetic)
-
I couldn't seem to get this to run - can you post up some instructions (yes, by rights I should know where everything goes but I tried a combination of stuff and nothing seemed to have any effect)... also, when running the mod if I targeted a hostile ship the game crashed out to Windows...not sure if that's just me or a general problem with the sub-targeting code....
-
Originally posted by Bobboau
it worked in game untill I targeted one of the fighters
:p
-
well just put the fs3 exe and the other files in the main fs2 folder (there should be three small pcx graphics in this, I forgot to include them when I first uploaded the file then remembered a few hours later if you are missing these redownload)
the canges wont show up in the tech room in this version, but they will in game, but only on the ulysses (only model I have modified so far)
-
Bobboau, you are using this thread EXACTLYH how CVS should be used, FYI :)
Can I browbeat you into using it?
:)
-
well how does it work
-
well I'm gona clean house and start over, I'm thinking I may have done something a while ago and now it's broken something and I would have no Idea what or were it is, so I'm reloading the origonals and copy\pasting the changes I have posted here, then completly rebuild everything, lets hope I screwed something long ago and forgot about it
-
Whatever works :)
I managed to get the release version working - very impressive! And yes I was an idiot, didn't notice you knew about the "crashing on target" bug. But aside from that it's really good looking so far.
-
Another plug for CVS: You can roll back code changes if you screw something up ;)
-
well if I can get this working I'll get CVS, as for the problem I still have no Idea wha tis causeing it, it seems the game doesn't like me adding thins to the polymodel struct
-
I'm downloading it to test now, but for those who have a better idea of how to check this stuff...
Has anyone tried disabling the target view in the corner before targeting other fighters?
Does it work if you target a friendly/enemy ulyssus? (Since they've already been set up with them.)
-
I don't really see how changing the IFF of a ship should make any difference to how the game interprets glow points on the ships...
-
ok I realy think it has to do with the two things I added to the polymodel type def, don't know much more than that tough
it seems sheild code gets broken as well as targeting stuff
-
Um, not to nitpick (go knows I haven;t even got past the point of reading the files in notepad), but wouldn't it be as effective to allow the $ND entries to work in both Glide and Direct X, but with the addition of possibly some lighting effects (maybe like those made when lasers are fired) to make it 'anti-aliased' visually.
-
Well Thunder, they said that it would be an enemy ship would cause it to crash. But he only has ONE ship rigged with the glowpoints.
So I'm asking if it would crash if the enemy ship was a uly.
-
Ahah!
Discovered what was causing it to crash.
I went into the Hud settings and disabled everything, then slowly added stuff.
The Lead Indicator is apparently the problem here.
Every time I tried to activate it, boom. Desktop.
Here's screens.
(http://www.furnation.com/corwyn/freespacestuff/screen00.jpg)
(http://www.furnation.com/corwyn/freespacestuff/screen01.jpg)
(http://www.furnation.com/corwyn/freespacestuff/screen03.jpg)
And yeah, you did kill something in the shields. I hear the buzz of a hit, but there's zero protection or appearance going on there.
Also, does anyone else hear problems with the sound? Or notice how things run slower than the normal game?
-
Kewl. I never used that damn thing anyway. Fix the shield problem and this'll be a great SC alteration....
-
updated it, don't know why what I did to fix it fixed it, but it did,
I moved the new parts of the polymodel typedef to the very end, seems to have fixed everything.
ok, beta test this for a while,
and Inquisitor, talk to me about CVS :)
-
Woot!
Now we just have to combine this with Komet's MOD and the fighter beams and I'll be real happy....
-
ok now what is everthing everybody wants,
float fov
float time_on //in ms
float time_off //in ms
float time_displacement //amount of time to add to timestamp in ms for things like lights that blink in sequence
subsystem //an optional subsystem to link this to
dynamic // places a light at it's position
// these only set if dynamic is true
float intensity;
float r,g,b;
float rad1, rad1_squared;
-
Question, what was different in the model pof's though?
-
in the updated file I just uploaded, I don't think anything, but I just included it so people who havn't DLed the first one would have the files, now I've just uploaded a new update that includes two more models with glow points (http://freespace.volitionwatch.com/blackwater/glowfs.zip) (herc and medusa), they need some serius tweakage but they should show you what is posable
(http://freespace.volitionwatch.com/blackwater/glowtest02.jpg)
-
Purdy....
I'd download, but my computer is fu>
-
quick tutorial for adding glow points as I have it set up now,
1) make a copy of the ship
2) open the origonal up in PCS
3) erase the existing fuel stuff (thruster glows)
4) make a new thruster
5) add one or more glow points
6) were it says "$engine_subsystem=$engine01" replace with "$glow_texture=$"insert texture file you want for the glow here
7) position the glow points, all glow points in this "thruster" are going to use the same texture
8) make as many new thrusters (glow banks) as you want were is says "$engine_subsystem=$engine##" replace with "$glow_texture=$the_glow_texture_for_these_glows", with as many glow points as you want (within reason)
9) save the POF
10) open it in a hex editor
11) go to the word "FUEL" and change it to "GLOW"
// optional intstructions for getting the origonal thruster glows back
12) open the copy of the file
13) in the copy look for the word "FUEL"
14) select the entire chunk (everything untill the next chunk, probly be SHLD), then copy and paste it just before the new GLOW chunk in the other file
//end optional instructions
15) save the file (not the copy, don't give a damn about the copy now)
16) open FS and select the model in the tech room
it should be showing the new glow points you made, now go to a mission with that ship and see if it works there
-
Where can we get HEX editors? I.E. what do we use?
-
well I don't have a direct link to any, but there's a bunch of them out there, many of them free, I use AXE, don't know the site for it though,
I'm realy sure someone will put up a link to one soon.
-
ok, complete listing of what I have changed as it is right now
//start rendering glow points -Bobboau
if ( (pm->n_glows) /*&& (Interp_flags & MR_SHOW_THRUSTERS) /*&& (Detail.engine_glows)*/ ) {
for (i = 0; i < pm->n_glows; i++ ) {
glow_bank *bank = &pm->glows[i];
int j;
for ( j=0; jnum_slots; j++ ) {
float d;
vector tempv;
vm_vec_sub(&tempv,&View_position,&bank->pnt[j]);
vm_vec_normalize(&tempv);
d = vm_vec_dot(&tempv,&bank->norm[j]);
if ( d > 0.0f) {
vertex p;
// Make glow bitmap fade in/out quicker from sides.
d *= 3.0f;
if ( d > 1.0f ) d = 1.0f;
// fade them in the nebula as well
if(The_mission.flags & MISSION_FLAG_FULLNEB){
d *= (1.0f - Interp_fog_level);
}
float w = bank->radius[j];
// disable fogging
gr_fog_set(GR_FOGMODE_NONE, 0, 0, 0);
g3_rotate_vertex( &p, &bank->pnt[j] );
gr_set_bitmap( bank->glow_bitmap, GR_ALPHABLEND_FILTER, GR_BITBLT_MODE_NORMAL, d );
{
extern int Gr_scaler_zbuffering;
Gr_scaler_zbuffering = 1;
g3_draw_bitmap(&p,0,w*0.5f, TMAP_FLAG_TEXTURED );
//g3_draw_rotated_bitmap(&p,0.0f,w,w, TMAP_FLAG_TEXTURED );
Gr_scaler_zbuffering = 0;
}
}
}
}
}
//end rendering glow points
that goes into model_really_render just before the thruster glow rendering, in modelInterp.ccp
case ID_GLOW:{ //start glowpoint reading -Bobboau
//
char props[MAX_PROP_LEN];
pm->n_glows = cfread_int(fp);
pm->glows = (glow_bank *)malloc(sizeof(glow_bank) * pm->n_glows);
Assert( pm->glows != NULL );
for (int q = 0; q < pm->n_glows; q++ ) {
glow_bank *bank = &pm->glows[q];
bank->num_slots = cfread_int(fp);
cfread_string_len( props, MAX_PROP_LEN, fp );
// look for $glow_texture=xxx
int length = strlen(props);
if (length > 0) {
int base_length = strlen("$glow_texture=");
Assert( strstr( (const char *)&props, "$glow_texture=") != NULL );
Assert( length > base_length );
char *glow_texture_name = props + base_length;
if (glow_texture_name[0] == '$') {
glow_texture_name++;
}
bank->glow_bitmap = bm_load( glow_texture_name );
if (bank->glow_bitmap < 0) {
Error( LOCATION, "Couldn't open texture '%s'\nreferenced by model '%s'\n", glow_texture_name, pm->filename );
}
}
for (j = 0; j < bank->num_slots; j++) {
cfread_vector( &(bank->pnt[j]), fp );
cfread_vector( &(bank->norm[j]), fp );
bank->radius[j] = cfread_float( fp );
//mprintf(( "Rad = %.2f\n", rad ));
}
//mprintf(( "Num slots = %d\n", bank->num_slots ));
}
break;
} //end glowpoint reading -Bobboau
that goes into read_model_file just before the Fuel chunk loading part in modelRead.ccp
if ( pm->glows ) { // free the glows!!! -Bobboau
free(pm->glows);
}
that goes into model_unload just after the thruster, bit in ModelRead.ccp
int n_glows; // number of glows on this ship. -Bobboau
glow_bank *glows; // array of glow objects -Bobboau
that goes at the END of the polymodel typedef in model.h
typedef struct glow_bank { // glow bank struckture -Bobboau
int num_slots;
vector pnt[MAX_THRUSTER_SLOTS];
vector norm[MAX_THRUSTER_SLOTS];
float radius[MAX_THRUSTER_SLOTS];
int glow_bitmap;
} glow_bank;
that goes in model.h too just after the thruster_bank type def
#define ID_GLOW 'WOLG' // glow points -Bobboau
and that goes into ModelsInc.h
I think that's it
-
Great!!! Oh btw, you are gonna make a new .pof converter so that we don't have to do all that stuff in the future right???
Also, how do we determine the color of the glows???
-
I was hopeing Kazan would make an addition to PCS
and you asign a bitmap, a bitmap with what ever colors you want in it
-
Got an issue when I added some glowpoints to the fenris/leviathan pof.
I can get the model to load, but the glowpoints are reversed as well as offcenter.
Error: Couldn't open texture 'tem=$engine'
referenced by model 'cruiser01.pof'
File:D:\Games\projects\freespace2_public\code\Model\ModelRead.cpp
Line: 1657
Call stack:
------------------------------------------------------------------
FS3.EXE 00434953()
FS3.EXE 00518f7e()
FS3.EXE 0051b24f()
FS3.EXE 00429e9a()
FS3.EXE 004c5df7()
FS3.EXE 0042af30()
FS3.EXE 0042af9c()
FS3.EXE 005e55ce()
KERNEL32.DLL bff8b560()
KERNEL32.DLL bff8b412()
KERNEL32.DLL bff89dd5()
------------------------------------------------------------------
-
what did you put in the string feild
-
I followed the directions you put up there in your post for how to modify the models in pcs and through an editor. (AXE).
Here's the ship itself.
http://www.furnation.com/corwyn/freespacestuff/cruiser01.pof
I downloaded pcs and whatnot yesterday, so unless Kazan's keeping older versions on his site something else is screwy.
It doesn't crash the game, just spits you out to the desktop spouting the error above.
Alt-Tab'ing will get back into the game, and everything's there, just wrong... :(
-
you didn't erase the old thruster glow data, you have to erase the old thruster glow data make the glowpoint data, and use a hex editor to rename it to GLOW, then also useing a hex editor, copy the old thruster data from a copy of the model, looks like you got most of it, but there were still some old thruster glows.
-
Look at what you put up for creating the stuff.
You said to delete the old stuff first, then add thrusters.
So I made a copy of the info then deleted them, and re-made the thrusters.
Then made the glowpoints as you said.
Then found the FUEL and changed it to GLOW.
Unless you meant to change the thruster's info to be the glowpoints string instead.
-
I didn't mean re make the origonal data, I meant click the button that would make a new thruster, the new thruster will become the glow bank, I got your model to work, just useing the hex editor change the GLOW back to FUEL (assuming you havn't copied the origonal FUEL chunck yet, if you have just select the whole thing and cut it) and you can edit it further, all I had to do was erase the last thruster in the list (the one that didn't say $glow_texture= ) and convert it back, you can check you're work before converting it to glow points by opining it up in modelview and clicking thrusters, it will render them like it normaly does thrusters, wich will tell you if you have them in the right position and the right vector, from what I saw almost all your glows were off by quite a bit, have you done much POF editing?
-
Actually as a test I started with a cargo container cargo01.pof.
After a little work I figured stuff out enough to get it to work.
But the ships were another issue.
So what makes the ship's engines show up if I delete the stuff out of the ship info?
-
well, after you erase the old thrusters and make the glow points and then hex it into the GLOW chunk then you copy the old FUEL chunk from the original POF.
-
*Beats his head against the wall to let the light of knowlegde shine in and finally gets it...*
I mis-read that earlier then, I thought the extra stuff with the // marks between them was for RESTORING the old file back to normal.
Alright, I get it now.
And as for the POF modeling no, I still can't get the lights to glue properly for the systems and junk. :(
So with other stuff having precedence I gave up on that.
For glowpoint placement I was using copies of the ships I had in 3DS and figuring their xyz's.
-
no, I meant POF editing, like gun points and subsystems and thrusters and stuff, modelview has part of a pof editor in it, that's how I got the position for my points
-
I though you said you were an 'idiot' nd didn't know almost anything?????? what changed? :D
-
I am an idiot and basicly don't know anything, I just copyed the parts of code that dealt with thrusters, and added a bit of code that loads a specified texture and use that to render instead of the normal glow texture. I'm gona have a hell of a time getting all the new things people want with this,
BTW what is you're wishlist regarding this, I mean everyone
-
Wishlist?
Blinking lights.
Definitely Blinking Lights.
-
well I'd like to get a full list before I change the format, but I'll get most of the code done for this
-
ok I got it to blink on and off by bank, but I can't implement it untill I get a POF editor, that would suport it
-
Well, I downloaded modelview so I could get accurate measurements for ship sizes instead of the possibly faulty models I have that were converted over.
And I noticed some things were way off between them.
So I went through, taking down the size numbers untill I noticed something else. The program loads the models where you view them at an angle. I noticed this and didn't mind untill I discovered the numbers were way off on the Deimos. If it's 714 meters long, then it sure as hell can't be 550 wide or tall!
Has anyone else seen this?
-
Who wants to integrate this into our master CVS?
-
I can do it...:nod:
-
great job on this Bobboau...although i do have a couple of things on my wishlist:
[wishlist]
sexp/event triggered glowpoints both blinking and non. This would be useful for dock points so that blinking lights are triggered whenever a ship is lining up for docking (this would best be done through a sexp such as illuminate-dockpoint).
be really convenient if the color of the glow can be selected in a model editor instead of refering to a specific glow effect, although it would be even better to keep both options available. Kinda like the hud setup in the first option.
[/wishlist]
-
WM: email me with a username and password for CVS as well as an email address for the dev list.
-
Originally posted by LtNarol
great job on this Bobboau...although i do have a couple of things on my wishlist:
[wishlist]
sexp/event triggered glowpoints both blinking and non. This would be useful for dock points so that blinking lights are triggered whenever a ship is lining up for docking (this would best be done through a sexp such as illuminate-dockpoint).
be really convenient if the color of the glow can be selected in a model editor instead of refering to a specific glow effect, although it would be even better to keep both options available. Kinda like the hud setup in the first option.
[/wishlist]
Well, actually I speculated a bit about lights, before bobboau began this thread. But the way I would have done them if able, where to add them as sub objects / subsystems of the ship. But again I’m not sure if this could even work with the current POF format. because I presume PCS will write any properties maybe even specials into a poffile or else my idea would not work.
The properties would be
Life = X; how long this thing glows 0 or better -1 for a constant light
Delay = X; how long this thing does not glow to start with (so you can have running lights or any other combination)
Off = x; how long this thing is off while not giving light.
And RGB (red, green and blue); defined in the subsystem section in the table file so you could set what kind of color to light should have.
That way you could let the artist have complete control over the light "show".
And finally not have the needed sub-object rendered just like when thrusters are disabled. Or the artist could make the object very small.
Regarding the dock lights. That would require some special light sub objects/systems that would only trigger on dock so it should be named something special like dockglow[01], so the engine knows where to start and where to end. Again this would require the model to have suspended lights.
But this is all way off my schedule (and for now, capability) and just a thought. But something I will look at eventually. But for know I let it rest as I let bobboau do the work so I might not have to do that.
It is after all, his project (first come, first served) :).
Nice work. You are doing great!.
So if you are an idiot, I must be ….. :D
-
This change has been added (I believe) to our main codebase courtesy of WMCoolmon.
So, DTP, if you want to play with it, you need to repsond to my email about a CVS password :) You sent a username, but no password :)
-
Originally posted by Inquisitor
This change has been added (I believe) to our main codebase courtesy of WMCoolmon.
So, DTP, if you want to play with it, you need to repsond to my email about a CVS password :) You sent a username, but no password :)
u got mail. my ISP mail server is up again. just had a lightning storm
-
Originally posted by Inquisitor
This change has been added (I believe) to our main codebase courtesy of WMCoolmon.
Yep, have fun :D
-
Um, why is ID_GLOW defined only in the BIG_ENDIAN section of modelsinc.h? :) And is it supposed to be GLOW backwards on a little endian system too?
-
Originally posted by EdrickV
Um, why is ID_GLOW defined only in the BIG_ENDIAN section of modelsinc.h? :) And is it supposed to be GLOW backwards on a little endian system too?
I'll fix that.
edit Done (love the 5 minute fixes). All who checked this out can do an update (you can just update the one file -- code/Model/modelsinc.h -- and it will be faster) I love CVS :) :) :)
edit again: if you're using command-line CVS: "cvs update code/Model/modelsinc.h", if you're using WinCVS or similar... I dunno, I guess click on that file and hit update or something) The makefile doesn't have proper header file dependencies (yet) so to be safe, delete "Debug\model*.obj" or "Release\model*.obj" and remake. (To be really safe, you should "nmake /f fs2_open.w32.make /CFG=whatever clean" but then you need to rebuild all -- which is time-consuming)
Also: I changed it to use hex constants (like the others) as using multi-character constants is not ANSI C++ (it makes gcc *****y).
-
when I get a version of PCS with an editor I am going to make quite a few additions to this, Kaz put the source up on a CVS somewere, but I still don't have half a clue on how to use CVS, and from what I've seen I might have a bit more of a diucult time makeing changes to it, don't supose one of you guys would like to take a crack at this, I would also like some discusion on what should be added to this, so when a new version of the data type is made it will have all the data we will need for all future versions of the code
-
Originally posted by Bobboau
when I get a version of PCS with an editor I am going to make quite a few additions to this, Kaz put the source up on a CVS somewere, but I still don't have half a clue on how to use CVS, and from what I've seen I might have a bit more of a diucult time makeing changes to it, don't supose one of you guys would like to take a crack at this, I would also like some discusion on what should be added to this, so when a new version of the data type is made it will have all the data we will need for all future versions of the code
Kazan's stuff is in CVS at SourceForge. I could take look at adding the GLOW tags, I am assuming they are identical in behavior to FUEL tags, so it should just be some cut & paste... If I have time and can get it to work, I'll petition Kazan for CVS commit access to his project (I have a SF membership already), or I'll send him patches.
BTW what happens if you run a GLOW-enabled model on plain vanilla FS2.exe? Does it silently ignore unknown tags?
*checks source*
Yeah, it bleats out a warning via mprintf (which is a no-op in release builds) but ignores the "chunk"
-
Ladies and gentlemen, may I introduce the power of collaborative programming with CVS. Bobboau conceived it, WM implemented it, penguin made a bugfix to it.
-
and Inquisitor p1mped it ;7
-
And I found that one small bug when I tried to compile it. :)
(FYI, it still compiles under PS2Linux, but under gdb I'm getting an undefined symbol problem when it's loading shared libraries.)
-
Hey guys: use glow points SPARINGLY. That Medusa looks like a freakin' Christmas tree.
-
Originally posted by GalacticEmperor
Hey guys: use glow points SPARINGLY. That Medusa looks like a freakin' Christmas tree.
Yep. It has now been permanent TAGged :p
-
Originally posted by GalacticEmperor
Hey guys: use glow points SPARINGLY. That Medusa looks like a freakin' Christmas tree.
Agreed, and some of those glows are f-ing huge, use smaller ones or this will grow old rather fast. I would say that the glow on the bottom fin of the Herc is a bit too large too.
-
Yeah, those are indeed too big and not used well. But I think that those are just tests... glow points would be really nice if used correctly. :)
-
well becase I have vertualy no way to see what I'm doing, and it takes about twenty minutes to convert it as this is set now (hex editing) I'm gona wait untill we have better editing of this before fixing that, I was just makeing a few tests, if you're gona make the new data editor I would also like
int on_time
int off_time
int time_disp
for each bank