2 registered members (AndrewAMD, TipmyPip),
747
guests, and 4
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: PhysX Fluid and Sof Body Beta Samples
[Re: rojart]
#434707
12/24/13 16:40
12/24/13 16:40
|
Joined: Oct 2004
Posts: 900 Lgh
rojart
OP
User
|
OP
User
Joined: Oct 2004
Posts: 900
Lgh
|
@3run @gri @Random: Hello again, because the OVERLAY flag works now i've sent the demo to you. If your GPU is not nVidia, reduce the MAX_PARTICLES to 5000-10000 depends of your CPU. The emiter, drain and form has no effect yet. If you have kepler GPU, please use the both kepler files from KeplerPatch32 folder. If you have problems, please send me the acklog.txt file, thanks! Merry Christmas!
|
|
|
Re: PhysX Fluid and Sof Body Beta Samples
[Re: 3run]
#434863
12/28/13 19:00
12/28/13 19:00
|
Joined: Oct 2004
Posts: 900 Lgh
rojart
OP
User
|
OP
User
Joined: Oct 2004
Posts: 900
Lgh
|
This was a very quick and very precise response, thank you very much! I've looked deeply in the log files and have established, that kepler dll has started a bit faster. results wihout KeplerPatch32: Opening PhysX...
- GPU: NVIDIA GeForce GT 430
- gHardwareSimulation: 1
ok LevelInit at 7.553 0 lmaps 0 textures...ok results with KeplerPatch32: Opening PhysX...
- GPU: NVIDIA GeForce GT 430
- gHardwareSimulation: 1
ok LevelInit at 1.272 0 lmaps 0 textures...ok
|
|
|
Re: PhysX Cloth Beta Samples
[Re: Tele]
#445815
09/26/14 08:35
09/26/14 08:35
|
Joined: Oct 2004
Posts: 900 Lgh
rojart
OP
User
|
OP
User
Joined: Oct 2004
Posts: 900
Lgh
|
You're right, fixed issue with wind and external acceleration on second cloths. Check out this ackphysX.dll file with code below.
#include <default.c>
#include <ackphysX.h>
#include <mtlFX.c>
PANEL* pInfo = NULL;
FONT* fA20b = "Arial#20b";
function fBallinit()
{
set(my,SHADOW|CAST);
pXent_settype(my,PH_RIGID,PH_SPHERE);
pXent_setmass(my,6);
pXent_setelasticity(my,100);
pXent_addvelcentral(my,vec_rotate(vector(1000,0,400),camera.pan));
pXent_addtorquelocal(my,vector(100,5,0));
wait(-30);
ent_remove(me);
}
function on_space_event()
{
ent_create ("basket_ball.mdl", camera.x, fBallinit);
}
function main()
{
PANEL* pInfo = pan_create(NULL,5);
pan_setdigits(pInfo,0,5,2,"%4.0f x", fA20b, 1, screen_size.x);
pan_setdigits(pInfo,0,50,2,"%4.0f", fA20b, 1, screen_size.y);
pan_setstring(pInfo,0,90,2, fA20b,str_create("PhysX Cloth Demo by Robert Judycki"));
pan_setstring(pInfo,0,5,40, fA20b,str_create("Press [Space] key to shoot a ball into the scene"));
set(pInfo, OUTLINE|SHADOW|SHOW);
shadow_stencil = 2;
fps_max = 60;
level_load("");
physX_open();
vec_set(sky_color,COLOR_BLUE);
vec_set(sun_angle.pan,vector(300,60,5000));
vec_set(camera.x,vector(-1200,0,500));
vec_set(camera.pan,vector(0,-10,0));
camera.arc = 90;
// generate ground plane
ENTITY *ground = ent_createterrain(NULL,vector(0,0,0),16,16,1000);
bmap_fill(bmap_for_entity(ground,0),COLOR_GREEN,100);
pXent_settype(NULL,PH_STATIC,PH_PLANE);
//////////////////////////////
// Cloth #1
//////////////////////////////
// generate flag pole
ENTITY *pole = ent_create(CUBE_MDL,vector(0,400,40*8),NULL);
vec_set(pole.scale_x,vector(0.5,.5,40));
vec_set(pole.pan,vector(0,0,0));
vec_set(pole.blue,COLOR_WHITE);
set(pole,SHADOW|CAST);
pXent_settype(pole,PH_STATIC,PH_BOX);
// generate flag
ENTITY *cloth = ent_create("clothflag.mdl",NULL,NULL);
vec_set(cloth.pan,vector(0,0,0));
cloth.material = mtl_twosided_alpha;
cloth.ambient = 50;
set(cloth,SHADOW|CAST);
set(cloth.material,PASS_SOLID); // required for shadow
ent_clone(cloth); // Prevents, that all clothes move the same way
// attach flag to pole
c_setminmax(pole);
c_setminmax(cloth);
vec_set(cloth.x,vector(
pole.x,
pole.y+(cloth.max_y-cloth.min_y)/2,
pole.z+pole.max_z-(cloth.max_z-cloth.min_z)/2));
// setup flag cloth
var cloth_options[40];
memcpy(cloth_options,CLOTH_DEFAULT,40*sizeof(var));
vec_set(cloth_options[25],vector(-1,-1,0)); // external acceleration
vec_set(cloth_options[28],vector(0,30,0)); // random wind acceleration
cloth_options[9] = 4; // Tear Factor
cloth_options[37] |= NX_CLF_GRAVITY|NX_CLF_BENDING|NX_CLF_COLLISION_TWOWAY|NX_CLF_SELFCOLLISION|NX_CLF_TEARABLE;
pXent_cloth(cloth,pole,NX_CLOTH_ATTACHMENT_TWOWAY,0,0,cloth_options);
//////////////////////////////
// Cloth #2
//////////////////////////////
//generate flag
ENTITY *cloth2 = ent_create("clothflag.mdl",NULL,NULL);
vec_set(cloth2.pan,vector(0,0,0));
cloth2.material = mtl_twosided_alpha;
cloth2.ambient = 50;
set(cloth2,SHADOW|CAST);
set(cloth2.material,PASS_SOLID); // required for shadow
ent_clone(cloth2); // Prevents, that all clothes move the same way
ENTITY *pole2 = ent_create(CUBE_MDL,vector(-300,-550,40*8),NULL);
vec_set(pole2.scale_x,vector(.5,.5,40));
vec_set(pole2.pan,vector(0,0,0));
vec_set(pole2.blue,COLOR_WHITE);
set(pole2,SHADOW|CAST);
pXent_settype(pole2,PH_STATIC,PH_BOX);
// attach flag to pole
c_setminmax(pole2);
c_setminmax(cloth2);
vec_set(cloth2.x,vector(pole2.x,pole2.y+(cloth2.max_y-cloth2.min_y)/2,pole2.z+pole2.max_z-(cloth2.max_z-cloth2.min_z)/2));
vec_set(cloth_options[25],vector(1,1,0)); // external acceleration
vec_set(cloth_options[28],vector(0,60,0)); // random wind acceleration
cloth_options[37] &= ~NX_CLF_TEARABLE;
pXent_cloth(cloth2,pole2,NX_CLOTH_ATTACHMENT_TWOWAY,0,0,cloth_options);
//////////////////////////////
// Cloth #3
//////////////////////////////
//generate flag
ENTITY *cloth3 = ent_create("clothflag.mdl",NULL,NULL);
vec_set(cloth3.pan,vector(0,0,0));
cloth3.pan = 180;
cloth3.material = mtl_twosided_alpha;
cloth3.ambient = 50;
set(cloth3,SHADOW|CAST);
set(cloth3.material,PASS_SOLID); // required for shadow
//ent_clone(cloth3); // Prevents, that all clothes move the same way
ENTITY *pole3 = ent_create(CUBE_MDL,vector(500,0,40*8),NULL);
vec_set(pole3.scale_x,vector(.5,.5,40));
vec_set(pole3.pan,vector(0,0,0));
vec_set(pole3.blue,COLOR_WHITE);
set(pole3,SHADOW|CAST);
pXent_settype(pole3,PH_STATIC,PH_BOX);
// attach flag to pole
c_setminmax(pole3);
c_setminmax(cloth3);
vec_set(cloth3.x,vector(pole3.x,pole3.y+cloth3.min_y,pole3.z+pole3.max_z-(cloth3.max_z-cloth3.min_z)/2));
vec_set(cloth_options[25],vector(0,1,0)); // external acceleration
vec_set(cloth_options[28],vector(0,-50,0)); // random wind acceleration
cloth_options[37] |= NX_CLF_TEARABLE;
pXent_cloth(cloth3,pole3,NX_CLOTH_ATTACHMENT_TWOWAY,0,0,cloth_options);
}
|
|
|
Re: PhysX Cloth Beta Samples
[Re: rojart]
#445834
09/26/14 16:29
09/26/14 16:29
|
Joined: Mar 2005
Posts: 68 Baesweiler
Tele
Junior Member
|
Junior Member
Joined: Mar 2005
Posts: 68
Baesweiler
|
Hallo rojart Danke für die hielfe...usw Ich hab die DDL in Acknex_plugins koppiert.
Die Flaggen werden dargestellt, aber beim anzeigen der 2. und 3. Flagge bricht die Windanim für 2 Flaggen zusammen.
als ob die:
var cloth_options[40]; memcpy(cloth_options,CLOTH_DEFAULT,40*sizeof(var)); vec_set(cloth_options[25],vector(-1,-1,0)); // external acceleration vec_set(cloth_options[28],vector(0,30,0)); // random wind acceleration
für die anderren 2 Flaggen nicht mehr gültig sind.
auch mit memcopy....var cloth_options_1[40]; cloth_options_2[40]; usw keine wirkung. Beide Flaggen hängen runter :-( No Wind
Gruss Tele
Last edited by Tele; 09/26/14 17:24.
|
|
|
Re: PhysX Cloth Beta Samples
[Re: Tele]
#445876
09/28/14 10:26
09/28/14 10:26
|
Joined: Oct 2004
Posts: 900 Lgh
rojart
OP
User
|
OP
User
Joined: Oct 2004
Posts: 900
Lgh
|
Seltsam, es funktioniert gut bei mir. Überprüfe es, ob mehr als eine ackphysX.dll in deinem A8 Engine Ordner sich befindet (auch Unterordner), wenn ja lösche es, dann neu versuchen. Sonst probiere es mit dem fertigen clothdemo2 von mir. Nicht schlecht wäre auch acklog.txt zu posten, wenn es immer noch Probleme gibt.
|
|
|
PhysX Cloths Sample
[Re: Tele]
#445883
09/28/14 18:10
09/28/14 18:10
|
Joined: Oct 2004
Posts: 900 Lgh
rojart
OP
User
|
OP
User
Joined: Oct 2004
Posts: 900
Lgh
|
Hallo Tele Ja, es stimmt, ich hatte gerade noch mal meine ackphysX.dll mit Dependency Walker kontrolliert, es fehlen drei dll's. Hier noch mal das gleiche neu komprimiert.
|
|
|
|