Author Topic: what I was doing over the break (materials)  (Read 34792 times)

0 Members and 1 Guest are viewing this topic.

Offline vyper

  • 210
  • The Sexy Scotsman
what I was doing over the break (materials)
I have only one response: Cool :yes:
"But you live, you learn.  Unless you die.  Then you're ****ed." - aldo14

 

Offline Taristin

  • Snipes
  • 213
  • BlueScalie
    • Skelkwank Shipyards
what I was doing over the break (materials)
Hurry up with it! I want my shinemaps back! :D
Freelance Modeler | Amateur Artist

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
what I was doing over the break (materials)
well if I had my homework done I'd be right on it, but I am haveing quite a time finding the material I need.
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 Taristin

  • Snipes
  • 213
  • BlueScalie
    • Skelkwank Shipyards
what I was doing over the break (materials)
The PETA vids?
Freelance Modeler | Amateur Artist

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
what I was doing over the break (materials)
yip :)
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
what I was doing over the break (materials)
im taking a couple days off to recover from work (i remember the days back when i went to work to recover from my days off :D) so if ya got anything cool to test now would be a good time. ever implement those gatling turrets?

another idea would be a matfile system. you would have a matfile that would contain the various textures used and the blending script for the material. then you could use the name of the matfile in your texture list. i dont know how your set up right now but it might streamline things.
« Last Edit: April 24, 2005, 03:15:39 am by 766 »
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
what I was doing over the break (materials)
ok, got my speach done, got an A. next I have a big'ole programming assignment, I have to implement 6 diferent sorting ruteens, though I get a few hours to work on it tomarow.

as for this, the next big thing I need to figure out is a variable system, so I'm thinking each material should be given a expression class, this would manage a bunch of element classes, each element would be derived as either a variable or an opperator, I'll do some parseing majic so that externaly everything runs like one would expect, but internaly, there will be an array of elements, opporators will take the value of the next two elements as parameters and evaluate them acordingly, variables will be passed a current_ship pointer and execute a function pointer they are given on instansiation (wich would consist of something like "return ship->engine output;")

I'll have to limit return types to floats
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 redsniper

  • 211
  • Aim for the Top!
what I was doing over the break (materials)
do you realize how awesome it is that you (and all the other coders too) do this for free?
"Think about nice things not unhappy things.
The future makes happy, if you make it yourself.
No war; think about happy things."   -WouterSmitssm

Hard Light Productions:
"...this conversation is pointlessly confrontational."

 

Offline Nuke

  • Ka-Boom!
  • 212
  • Mutants Worship Me
what I was doing over the break (materials)
the reason i make mods for free

1. i hate capitalisim
2. it builds my experience
3. its fun
4. capitalisim sucks
5. i would never sell out my talents

im sure the coders dont have far too different reasons. were all sub-perfessionals, the only difference between a professional and a sub-professional is that sub-pros dont get paid for their work (see 1 and 4). there are plenty of professionals who dont know a **** how to do their job but are damn good at selling out. so i think were better :D

honestly my most recent work is much better than crap like tachyon or perhaps even freelancer
« Last Edit: April 25, 2005, 06:28:12 pm by 766 »
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 Drew

  • 29
    • http://www.galactic-quest.com
what I was doing over the break (materials)
capitalism made possible the computer your using, the clothes your wearing, and the food your eating.  dont be hatin.
[(WWF - steroids + ties - spandex) / Atomic Piledrivers] - viewing audience = C-SPAN

My god.. He emptied the gasoline tank from the van onto your cat, lit him on fire, threw him in the house and dove for cover.  :wtf: Family indeed.  ~ KT

Happiness is belt fed.

 

Offline Nuke

  • Ka-Boom!
  • 212
  • Mutants Worship Me
what I was doing over the break (materials)
all of witch we can do without...

capitalisim is like a booster rocket on the space shuttle, it gets you up to a certain altitude and then must be ejected or else its weight would just impede the ships progress to orbit. capitalisim has established a society and it is fast becoming time to get rid of it. a point will be reached eventually when the current system will no longer function. when this happens society will either crumble, or we may choose a new system. its the same cycle thats been running for an eternity. sence i dont believe in free will, i think were pretty much ****ed.

none the less this isnt the place to discuss my nihilistic point of view. back on topic...
« Last Edit: April 26, 2005, 02:15:12 am by 766 »
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 WMCoolmon

  • Purveyor of space crack
  • 213
what I was doing over the break (materials)
*Starts to derail the thread with a discussion of politics/economics - hestitates*

No...that's what they'd be expecting me to do...


A lot of things have made a lot of other things possible in the past which are now considered bad. Simply because something has worked in the past doesn't mean it's the best thing for the future.


There. Something broad enough that it's on-topic. :p
-C

 

Offline Black Wolf

  • Twisted Infinities
  • 212
  • Hey! You! Get off-a my cloud!
    • Visit the TI homepage!
what I was doing over the break (materials)
"Yay Capitalism!"
TWISTED INFINITIES · SECTORGAME· FRONTLINES
Rarely Updated P3D.
Burn the heretic who killed F2S! Burn him, burn him!!- GalEmp

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
what I was doing over the break (materials)
2 and 3,
I love capitolism, it's the perfict way to continue evolution in a powerful socal animal.
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
what I was doing over the break (materials)
and this is sort of what I'm thinking for the whole user variable system
Code: [Select]
#include "ship/ship.h"

class variable{
public:
virtual float value(ship*shipp=NULL) = 0;
};

class constant:public variable{
float val;
public:
constant(float in):val(in){};
float value(ship*shipp=NULL){return val;};
};


class operate:public variable{
protected:
variable *operand1, *operand2;
public:
virtual float value(ship*shipp=NULL) = 0;
operate(variable*op1, variable*op2){operand1 = op1; operand2 = op2;}
};

class add:public operate{
public:
add(variable*op1, variable*op2):operate(op1,op2){}
float value(ship*shipp=NULL){return operand1->value(shipp) + operand2->value(shipp);}
};

class sub:public operate{
public:
sub(variable*op1, variable*op2):operate(op1,op2){}
float value(ship*shipp=NULL){return operand1->value(shipp) - operand2->value(shipp);};
};

class mult:public operate{
public:
mult(variable*op1, variable*op2):operate(op1,op2){}
float value(ship*shipp=NULL){return operand1->value(shipp) * operand2->value(shipp);};
};

class div:public operate{
public:
div(variable*op1, variable*op2):operate(op1,op2){}
float value(ship*shipp=NULL){return operand1->value(shipp) / operand2->value(shipp);};
};


class expression:public variable{
int n_var; //number of variables in the expression
variable** var; //an array of pointers, each points to a diferent subclass
variable *head; //the head of the expression

variable* parse_next(char**);
public:
expression(char*);
~expression(){for(int i = 0;i float value(ship*shipp=NULL);
}

/*
variable* con = new constant(1.0f);
variable* op = new add(con,con);
*/


Code: [Select]
#include "graphics/materials/variables.h"

expression::expression(char* in_str):n_var(0),var(NULL),head(NULL){
while(*in_str){
}
}

variable* expression::parse_next(char**in_str){
//do some parseing
//get the string into pre-fix notation

char ship_idnt[] = "ship:";
char op_char[] = "+-*/"
if(!strcmp(in_str,ship_idnt)){
//it's a ship variable
}else{
//it's a constant, or an opporateor
if(strchr(op_char, **in_str)){
//it must be an operator
}else{
//it must be a constant
}
}
}

float expression::value(ship*shipp=NULL){
}


I need to make a class that takes a string, allocates enough variable pointers, allocates each pointer to the corect type, and while doing that passes the corect pointers to all operate type variables.
to set up the variable cascade corectly it will need to convert to prefix notation.

each new ship variable type would requier a new class be defined for example ship:thrust would be
Code: [Select]

class thrust:public variable{
public:
float value(ship*shipp=NULL){if(shipp)return ship->what_ever_the_member_was; else return 0.0f;};
};

global variables like fov would just ignore the ship parameter
« Last Edit: April 26, 2005, 08:29:00 am by 57 »
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
what I was doing over the break (materials)
yay! variable thing pretymuch done, now back to this.

first thing I'm gona add with this is a texture matrix
each step of each pass can have a diferent texture matrix assosiated with it, this is all totaly optional, if you don't add the texture matrix section it will fill it in with a default identity (change nothing) matrix. for those of you who don't know a matrix is basicly a 2d list of numbers, it is used in transformations with a texture matrix you can scale rotate move a texture on a surface (I will provide scale(x,y) rotate(a) move(x,y) pan(x,y) auto-matrix features once I get the low level version working so people who have no idea what they are doing can use these features).
now the syntax of the low level texture matrix code I'm thinking right now should be something sort f like this

Code: [Select]
$Material: fullbright
#Instance_set{
#Instance{
$Format: ("pos" "uv_1")
#Pass{
$Z_Buffer:
+read: yes
+Write: yes
+opp: lessequal
$Alpha: +preset:none
$Cull: 1
$Lighting: no

$Render_Step:
+Opp: arg1
+Arg1:
+type: texture
+value: 0
[b]+texture_matrix(
("1.0" "0.0" "0.0")
("0.0" "1.0" "0.0")
("0.0" "0.0" "1.0")
)texture_matrix[/b]
}Pass
}Instance
}Instance_set


each one of those numbers can be an expression so rather than 1.0 for the first one you could use fpart(:global{time}) and it would evaluate that expression every time it rendered that.

I have the underlying code set up to minimize expression evaluations so if an element is from the identity there won't even be a constant variable used.
« Last Edit: April 30, 2005, 04:01:01 pm by 57 »
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 WMCoolmon

  • Purveyor of space crack
  • 213
what I was doing over the break (materials)
I did a search for matrices (since I'd like to know something beyond 'magical things that let you rotate stuff.' :p)

So far I've found "Matrices: A Lesbian and Lesbian Feminist Research and Network" and this site, which is a bit more relevant.
-C

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
what I was doing over the break (materials)
haveing knowledge about matricese in general is good, but there are some specific things about how they function in this instance that you need to know, I'll try to give everyone a run down on it when I get everything working.
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
what I was doing over the break (materials)
oih my god it ****ing works! this is ****ing SWEET!!!:D:D:D

it'll be somewhat limited untill we get model files that suport it, but my material system now has the capability to run any texture translation effect you can think of.!!!!!
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
what I was doing over the break (materials)
ok things that need expressions and/or need to be implemented.

frame selector- wich frame out of a multi-frame animation.
pass variable, I need to rework some stuff, each pass gets one variable,
I need to figure a way to allow activation of a single color chanel within the variable system that is transparent.

can't think of anything else off the top of my head, put up some more ideas for were thid could be usefull
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