Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
5 registered members (RealSerious3D, AndrewAMD, chsmac85, dr_panther, TedMar), 942 guests, and 1 spider.
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 10 of 14 1 2 8 9 10 11 12 13 14
Re: [Plugin] Import von 2. UVMap / Import of 2nd U [Re: William] #119615
05/02/07 10:36
05/02/07 10:36
Joined: Apr 2005
Posts: 4,506
Germany
F
fogman Offline
Expert
fogman  Offline
Expert
F

Joined: Apr 2005
Posts: 4,506
Germany
I hope IŽll have some time today to play around with it. IŽll give you feedback than.


no science involved
Re: [Plugin] Import von 2. UVMap / Import of 2nd U [Re: fogman] #119616
05/02/07 18:32
05/02/07 18:32
Joined: May 2002
Posts: 7,441
ventilator Offline
Senior Expert
ventilator  Offline
Senior Expert

Joined: May 2002
Posts: 7,441
the engine shutdown crash probably happens because the plugin and the engine didn't get compiled with the same directx sdk. i will find out which sdk the engine uses and try it with that one then.

i am looking forward to see some screenshots!

Re: [Plugin] Import von 2. UVMap / Import of 2nd U [Re: ventilator] #119617
05/02/07 20:55
05/02/07 20:55
Joined: Nov 2003
Posts: 1,659
San Francisco
JetpackMonkey Offline
Serious User
JetpackMonkey  Offline
Serious User

Joined: Nov 2003
Posts: 1,659
San Francisco
I get a crash in ent_loacseconduvset(e3, e4), each mesh has 1870 faces.. any ideas?

Code:

var video_mode = 8;

plugindir = ".";
dllfunction ent_exportmesh(entity, filename);
dllfunction ent_importmesh(entity, filename);
dllfunction ent_loadseconduvset(entity1, entity2);



//----------------------------------------------------------------------------- mtl_lightmap
bmap bmap_lightmap = "lightmap.dds";
bmap bmap_plantlightmap = "tower_lightmap.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;
}
}
";
}


material mtl_plantlightmap
{
skin1 = bmap_plantlightmap;

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
entity* e1;
entity* e2;

entity* e3;
entity* e4;

function main()
{
wait(3);
level_load("empty.wmb");
wait(1);

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

vec_set(sun_angle, vector(160, -35, 0));
sun_light = 20;

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



// // example 1
//
// load model with texture uv-set
e1 = ent_create("landscape.mdl", nullvector, 0);
e1.material = mtl_lightmap;

// load model with light map uv-set
e2 = ent_create("landscape_lm.mdl", nullvector, 0);

// generate and assign a new mesh with both uv-sets
ent_loadseconduvset(e1, e2);
ent_remove(e2);

// save mesh with both uv-sets for faster reuse
ent_exportmesh(e1, "landscape_lm.mesh");

////////////////////////

e3 = ent_create("plant.mdl", nullvector, 0);
e3.material = mtl_plantlightmap;

// load model with light map uv-set
e4 = ent_create("plant_lm.mdl", nullvector, 0);

// generate and assign a new mesh with both uv-sets
ent_loadseconduvset(e3, e4);
ent_remove(e4);

// save mesh with both uv-sets for faster reuse
ent_exportmesh(e3, "plant_lm.mesh");




Re: [Plugin] Import von 2. UVMap / Import of 2nd U [Re: JetpackMonkey] #119618
05/02/07 23:52
05/02/07 23:52
Joined: May 2002
Posts: 7,441
ventilator Offline
Senior Expert
ventilator  Offline
Senior Expert

Joined: May 2002
Posts: 7,441
if a model pair causes a crash i would need it for investigation.

does anyone else have crashes? (except the one when closing the engine!)

(both models need the same amount of faces, the vertex positions have to be exactly the same and the corresponding faces must have the same vertex order. maybe i forgot some check to avoid a crash if one of these isn't the case.)

...
btw. you can comment out all export and import functions since they probably aren't needed anymore.

Re: [Plugin] Import von 2. UVMap / Import of 2nd U [Re: ventilator] #119619
05/03/07 04:50
05/03/07 04:50
Joined: Aug 2001
Posts: 2,320
Alberta, Canada
William Offline
Expert
William  Offline
Expert

Joined: Aug 2001
Posts: 2,320
Alberta, Canada
No crashes here, as I still haven't tried my own models.

Currently having trouble getting my 2 models out of max. For example, I've got 2 mapping channels, the first one with the normal UV, the second with another UV. But max2mdl seems to only export models with map channel #1. Perhaps I'm doing something wrong, as I'm very new when it comes to baking levels. If someones got a solution for it, please post(I think earlier it looked like Mabyenew had no problem exporting with this?).


Edit:

Got the mesh exports working! Turns out to export as a different map channel, you have to UVW Mapping modifier, and select your map channel there. This is very simple and quick.

Anyways, i'm getting the same error as Jetpackmonkey when I try to combine my 2 meshes thru script. Basically a problem with the "loadseconduvset", then after that error, there is one with the "ent_importmesh". After running, the model has it's normal tiling textures, but with a bunch of it's faces shaded black here and there.

Code:
  str_for_entfile(tempstring,my);
//str_cpy(aemo2, tempstring);



if(str_cmp(tempstring,"YY_MAINCLIFF.MDL") == 1)
{

// // example 1
//
// // load model with texture uv-set

// // load model with light map uv-set
e2 = ent_create("l_maincliff.mdl", nullvector, 0);
//
// // generate and assign a new mesh with both uv-sets
ent_loadseconduvset(my, e2);
ent_remove(e2);
//
// // save mesh with both uv-sets for faster reuse
/// ent_exportmesh(e1, "landscape_lm.mesh");
//
//
//
//ent_remove(my);

// ent_importmesh(my, "l_maincliff.mesh");
}



Last edited by William; 05/03/07 05:53.
Re: [Plugin] Import von 2. UVMap / Import of 2nd U [Re: William] #119620
05/03/07 12:23
05/03/07 12:23
Joined: May 2002
Posts: 7,441
ventilator Offline
Senior Expert
ventilator  Offline
Senior Expert

Joined: May 2002
Posts: 7,441
how does the error message exactly look like?

are you sure you don't mix up my beta popups with crashes? i stupidly used the error() function for popups but if it is no error it says "(this is no error message!)" at the bottom.

there probably is something wrong though if you get black triangles and i would have to investigate that with your models.

Re: [Plugin] Import von 2. UVMap / Import of 2nd U [Re: ventilator] #119621
05/03/07 15:06
05/03/07 15:06
Joined: Sep 2005
Posts: 980
Aue, Sachsen, Germany
W
Wicht Offline
User
Wicht  Offline
User
W

Joined: Sep 2005
Posts: 980
Aue, Sachsen, Germany
My first screen with ventilator's mesh-plugin


Lightwave



A6-Engine


Re: [Plugin] Import von 2. UVMap / Import of 2nd U [Re: Wicht] #119622
05/03/07 15:51
05/03/07 15:51
Joined: Apr 2005
Posts: 4,506
Germany
F
fogman Offline
Expert
fogman  Offline
Expert
F

Joined: Apr 2005
Posts: 4,506
Germany
A dream comes true...
Looks like a night-shift for me.


no science involved
Re: [Plugin] Import von 2. UVMap / Import of 2nd U [Re: fogman] #119623
05/03/07 16:25
05/03/07 16:25
Joined: May 2002
Posts: 7,441
ventilator Offline
Senior Expert
ventilator  Offline
Senior Expert

Joined: May 2002
Posts: 7,441
hm... i did some tests with messing up the second model (moved some vertices around so that the correct triangles won't be found on the second model) and the algorithm seems to be quite forgiving. i didn't get any crashes. just the light map was wrong then on those triangles.

jetpack_monkey's test model worked for me and william's model seemed to work too but he forgot to send me the light map so i couldn't check if it displays correctly. he had overlapping areas in the light map uvs though which probably won't give good results.

jetpack_monkey's test model:


Re: [Plugin] Import von 2. UVMap / Import of 2nd U [Re: ventilator] #119624
05/04/07 00:47
05/04/07 00:47
Joined: Mar 2006
Posts: 2,503
SC, United States
xXxGuitar511 Offline
Expert
xXxGuitar511  Offline
Expert

Joined: Mar 2006
Posts: 2,503
SC, United States
This only works with 6.6* [private-beta] right?

I can't wait to work with it, although I probably won't be able to since I don't have any way for generating the lightmaps...


xXxGuitar511
- Programmer
Page 10 of 14 1 2 8 9 10 11 12 13 14

Moderated by  checkbutton, Inestical, 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