Gamestudio Links
Zorro Links
Newest Posts
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
0 registered members (), 959 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rating: 5
Page 6 of 6 1 2 3 4 5 6
Re: supertrace plugin / second uv-set plugin [Re: DavidLancaster] #134270
11/09/07 15:59
11/09/07 15:59
Joined: Oct 2005
Posts: 57
P
picoder Offline
Junior Member
picoder  Offline
Junior Member
P

Joined: Oct 2005
Posts: 57

Re: supertrace plugin / second uv-set plugin [Re: picoder] #134271
11/10/07 04:12
11/10/07 04:12
Joined: Apr 2006
Posts: 1,551
Netherlands
D3D Offline
Serious User
D3D  Offline
Serious User

Joined: Apr 2006
Posts: 1,551
Netherlands
Did anyone tried the mesh.dll with A7 C-script or Lite-C? I'm not able to look at the demo with current engine beta. Crash without error. Maybe something changed, i'll try again with A7.0.6 later on. Thought I could ask perhaps someone knows!?


smile
Re: supertrace plugin / second uv-set plugin [Re: D3D] #134272
11/10/07 04:39
11/10/07 04:39
Joined: May 2002
Posts: 7,441
ventilator Offline OP
Senior Expert
ventilator  Offline OP
Senior Expert

Joined: May 2002
Posts: 7,441
this happens because of an engine bug with the error() function. unfortunately i use the error() function for outputting the demo message.

the error() function is supposed to show a message window but currently the message just gets written to the acknex.log and the engine closes immediately.

this should only happen with c-script and jcl will fix it. the release version of the plugin doesn't show a demo message (only real errors) so it shouldn't be a big problem in the meantime.

Re: supertrace plugin / second uv-set plugin [Re: ventilator] #134273
11/10/07 06:01
11/10/07 06:01
Joined: Apr 2006
Posts: 1,551
Netherlands
D3D Offline
Serious User
D3D  Offline
Serious User

Joined: Apr 2006
Posts: 1,551
Netherlands
Ok i've read that post too. Anyways i've now tried to run with A6.60 Lite-C and there is a wdl file with the same name containing plugindir = "."; only it didn't worked. No crash or error message just the acknex window shows up.

Furthermore mesh.dll isn't working with A7.06.1 and 7.0.7.1/2/3 beta on my computer, either with Lite-C or C-Script. If I try to run the C-Script version the compiler doesn't understand what bmap is on this line -> Code:
bmap bmap_lightmap = "landscape_lm.dds";


When I try to run the Lite-C version with A7 stable or any of the beta I get the crash without error in the demo level using the full version of the dll. Is the mesh.dll compiled with VC2005 NET?

Another problem:

Tried to run the C-Script version against A6.60 Commercial, however there was a problem because on the A6 (old key.exe) license my full name is used and on A7 it's shortened. Strange, but on A6.60 Lite-C mesh.dll didn't present this message about "the mesh plugin isn't registered to you!" What should I do next?

Code:
/*
here is the lite-c version of the example script in case anyone would like to run the plugin demo with lite-c.
it should also work with the free lite-c edition. save it as examples_litec.c and also create the file
examples_litec.wdl which contains the line: plugindir = ".";
*/

#include <acknex.h>
#include <default.c>


void ent_loadseconduvset(ENTITY* entity1, ENTITY* entity2);
void ent_exportmesh(ENTITY* entity, STRING* filename);
void ent_importmesh(ENTITY* entity, STRING* filename);


ENTITY* skycube =
{
type = "skycube+6.tga";
flags2 = SKY | CUBE | VISIBLE;
material = mat_sky;
}


void applylightmaps();
ENTITY* tempentity;


//----------------------------------------------------------------------------- mtl_lightmap

BMAP* bmap_lightmap = "landscape_lm.dds";

MATERIAL* mtl_lightmap =
{
skin1 = bmap_lightmap;

effect=
"
texture mtlSkin1;
texture entSkin1;

technique t0
{
pass p0
{
Texture[0]=<mtlSkin1>;
Texture[1]=<entSkin1>;

// mix light map with dynamic lighting
TexCoordIndex[0] = 1;
ColorArg1[0] = Texture;
ColorOp[0] = AddSigned;
ColorArg2[0] = Diffuse;

// apply lighting to texture
TexCoordIndex[1] = 0;
ColorArg1[1] = Texture;
ColorOp[1] = Modulate2x;
ColorArg2[1] = Current;
}
}
";
}



//----------------------------------------------------------------------------- main
void main()
{
video_mode = 8;

vec_set(mat_sky.emissive_blue, vector(20,20,20)); // make sky a bit brighter

wait(3);
level_load("");
wait(1);

vec_set(sky_color, vector(250, 175, 75));

vec_set(sun_angle, vector(-30, 35, 0));
sun_light = 10;

vec_set(camera.x, vector(300, 0, 200));
camera.pan = 180;



STRING* meshfilename = "landscape_lm.mesh";


/*
//-------------------- example 1

you = ent_create("landscape.mdl", nullvector, 0); // load model with texture uv-set
you.material = mtl_lightmap; // assign light map material

tempentity = ent_create("landscape_lm.mdl", nullvector, 0); // load model with light map uv-set
ent_loadseconduvset(you, tempentity); // generate and assign a new mesh with both uv-sets
ent_remove(tempentity); // tempentity isn't needed anymore

ent_exportmesh(you, meshfilename); // save mesh with both uv-sets for reuse
*/


//-------------------- example 2

// for very huge models ent_importmesh() probably is faster than ent_loadseconduvset().
// usually ent_loadseconduvset() should be fast enough though.

if(you) {ent_remove(you);}

you = ent_create("landscape.mdl", nullvector, 0); // load model with texture uv-set
you.material = mtl_lightmap; // assign light map material
ent_importmesh(you, meshfilename); // load and assign the previously saved mesh


/*
//-------------------- example 3

// applylightmaps() cycles through all entities in the level and applies a light map
// if the two "_lm" files exist for the entity.

if(you) {ent_remove(you);}

ent_create("landscape.mdl", nullvector, 0);
applylightmaps();
*/


while(!key_any) {wait(1);}
def_moveset(); // default camera movement
}



//----------------------------------------------------------------------------- example 3

var file_exists(STRING* filename)
{
var filehandle;
filehandle = file_open_read(filename);
if(filehandle)
{
file_close(filehandle);
return(1);
}
else
{
return(0);
}
}

STRING* tempstring1 = "#100";
STRING* tempstring2 = "#100";
MATERIAL* tempmaterial;

void applylightmaps()
{
you = ent_next(0);
while(you != 0)
{
str_for_entfile(tempstring1, you);
str_trunc(tempstring1, 4);
str_cpy(tempstring2, tempstring1);
str_cat(tempstring1, "_lm.mdl");
str_cat(tempstring2, "_lm.dds");

if(file_exists(tempstring1) && file_exists(tempstring2))
{
you.material = mtl_create(); // they should be removed again when changing the level
tempmaterial = you.material;
tempmaterial.effect = mtl_lightmap.effect;
tempmaterial.skin1 = bmap_create(tempstring2); // they should be removed again when changing the level

tempentity = ent_create(tempstring1, nullvector, 0);
ent_loadseconduvset(you, tempentity);
ent_remove(tempentity);
}

you = ent_next(you);
}
}




smile
Re: supertrace plugin / second uv-set plugin [Re: D3D] #134274
11/10/07 06:44
11/10/07 06:44
Joined: May 2002
Posts: 7,441
ventilator Offline OP
Senior Expert
ventilator  Offline OP
Senior Expert

Joined: May 2002
Posts: 7,441
i have sent you the a7 version. a6 and a7 (from 7.05.1 on) need different versions because of the different vertex format of the engine. do you also need it for a6?

you must not load mesh files created with the a6 plugin (maybe you used the a6 demo files?) with the a7 plugin. this will crash.

in lite-c you have to be careful about passing char* instead of the needed STRING*. this can also be a reason for a crash. "" in the source is char* and stupidly won't get converted automatically.

please try if one of these is the reason. i guess so because the plugin works without problems for me and for others.

Re: supertrace plugin / second uv-set plugin [Re: ventilator] #134275
11/10/07 06:49
11/10/07 06:49
Joined: Apr 2006
Posts: 1,551
Netherlands
D3D Offline
Serious User
D3D  Offline
Serious User

Joined: Apr 2006
Posts: 1,551
Netherlands
No I don't need the plugin for A6, thought it would not mind to try if mesh.dll worked with that version and maybe give a clue why it's not working right now.

Also i'm just using the Lite-c script example you've posted to load the Meshdemo with the full version of the dll. I have all versions of A6 on a DVD using the old key.exe and not in trial mode to see if A6.60 would work, but it didn't.

Reading the post again, I think with using the A6 demo files you meant those that are inside the Meshdemo.zip posted above? Well in that case would I only have to save them again in A7 to get it working?


smile
Re: supertrace plugin / second uv-set plugin [Re: D3D] #134276
11/10/07 06:57
11/10/07 06:57
Joined: May 2002
Posts: 7,441
ventilator Offline OP
Senior Expert
ventilator  Offline OP
Senior Expert

Joined: May 2002
Posts: 7,441
mesh_plugin_demo_a7.zip
please download this demo and use the newest a7 engine. delete the mesh_demo_a7.dll and put your dll into the directory. then run examples_litec.c.

<edit>
Quote:

Reading the post again, I think with using the A6 demo files you meant those that are inside the Meshdemo.zip posted above? Well in that case would I only have to save them again in A7 to get it working?


yes! or download the a7 demo from the link above.
</edit>

Re: supertrace plugin / second uv-set plugin [Re: ventilator] #134277
11/10/07 07:02
11/10/07 07:02
Joined: Apr 2006
Posts: 1,551
Netherlands
D3D Offline
Serious User
D3D  Offline
Serious User

Joined: Apr 2006
Posts: 1,551
Netherlands
Yeah all good now. Thanks a lot! Now on to learning Gile[s]


smile
Re: supertrace plugin / second uv-set plugin [Re: D3D] #134278
11/11/07 14:25
11/11/07 14:25
Joined: Sep 2003
Posts: 5,900
Bielefeld, Germany
Pappenheimer Offline
Senior Expert
Pappenheimer  Offline
Senior Expert

Joined: Sep 2003
Posts: 5,900
Bielefeld, Germany
Another screenshot dedicated to ventilator and his efforts!

Made without anything but WED, MED, MED's Atlasmapping and his plugin:



It is not optimized. What I am trying is a fast way to complete a game for kids with a slightly modified code of Running Food.

Re: supertrace plugin / second uv-set plugin [Re: Pappenheimer] #134279
11/11/07 15:27
11/11/07 15:27
Joined: Mar 2006
Posts: 2,758
Antwerp,Belgium
frazzle Offline
Expert
frazzle  Offline
Expert

Joined: Mar 2006
Posts: 2,758
Antwerp,Belgium
Can't say it enough, this is a great plugin !!
Btw, I hope you succeed in your project Pappenheimer

Cheers

Frazzle


Antec® Case
Intel® X58 Chipset
Intel® i7 975 Quad Core
8 GB RAM DDR3
SSD OCZ®-VERTEX2 3.5 x4 ; HD 600 GB
NVIDIA® GeForce GTX 295 Memory 1795GB
Page 6 of 6 1 2 3 4 5 6

Moderated by  adoado, checkbutton, mk_1, Perro 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1