Gamestudio Links
Zorro Links
Newest Posts
WFO Training with parallel cores Zorro64
by Martin_HH. 02/24/26 19:51
Zorro version 3.0 prerelease!
by TipmyPip. 02/24/26 17:09
ZorroGPT
by TipmyPip. 02/23/26 21:52
Camera always moves upwards?
by clonman. 02/21/26 09:29
Sam Foster Sound | Experienced Game Composer for Hire
by titanicpiano14. 02/19/26 13:22
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
5 registered members (Martin_HH, TipmyPip, AndrewAMD, Grant, USER0328), 5,287 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
alx, ApprenticeInMuc, PatrickH90, USER0328, Sfrdragon
19199 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Enity.u / entity.v #133022
06/01/07 12:11
06/01/07 12:11
Joined: Jul 2006
Posts: 150
Deutschland/Germany, nahe Hamb...
dennis Offline OP
Member
dennis  Offline OP
Member

Joined: Jul 2006
Posts: 150
Deutschland/Germany, nahe Hamb...
I want to create a conveyor and i am using the "entity.u" property.
That does not work!

In the manual:
The pixel offsets of map entity textures, in horizontal and vertical direction. By changing these offsets in real time, effects like streaming water can be achieved.
Note: this parameter is not used anymore in newer engine versions, but can be set as a workaround for the DirectX mesh animation bug (see bugs).


Is it right that i cannot use it anymore....?

(I have got 6.60 extra)

I need a solution for this problem soon...

Original thread:
http://www.coniserver.net/ubbthreads/sho...2ec4d13550e97ee

Re: Enity.u / entity.v [Re: dennis] #133023
06/01/07 12:34
06/01/07 12:34
Joined: Jul 2000
Posts: 28,075
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,075
Frankfurt
Before installing a new version, read the compatibility notes in the installation instructions:

http://manual.conitec.net/newfeatures66.htm

Re: Enity.u / entity.v [Re: jcl] #133024
06/01/07 19:34
06/01/07 19:34
Joined: Jul 2006
Posts: 150
Deutschland/Germany, nahe Hamb...
dennis Offline OP
Member
dennis  Offline OP
Member

Joined: Jul 2006
Posts: 150
Deutschland/Germany, nahe Hamb...
Oh!

Thanks!

The fx_uvspeed() function is working.

But there's a problem:

I wrote this code...
"My.Skill1 = 1;"
WROKS FINE!
but when I wrote this code (if the speed of the computer varies)....
"My.Skill1 = 10*Time;"
THE TEXTURE OF THE CONVEYOR IS SHIVERING!

Is there a way to avoid this?

(I hope I have read all important notes this time )

Re: Enity.u / entity.v [Re: dennis] #133025
06/01/07 19:55
06/01/07 19:55
Joined: Jan 2002
Posts: 4,225
Germany / Essen
Uhrwerk Offline
Expert
Uhrwerk  Offline
Expert

Joined: Jan 2002
Posts: 4,225
Germany / Essen
Of course there is. You need to increase or decrease the value of skill1 over the time. Therefore it is
Code:
my.skill1 += time_step * 10;


or
Code:
my.skill1 -= time_step * 10;


Don't use time. This variable is deprecated. Use time_step or time_frame instead.


Always learn from history, to be sure you make the same mistakes again...
Re: Enity.u / entity.v [Re: Uhrwerk] #133026
06/01/07 20:23
06/01/07 20:23
Joined: Jul 2006
Posts: 150
Deutschland/Germany, nahe Hamb...
dennis Offline OP
Member
dennis  Offline OP
Member

Joined: Jul 2006
Posts: 150
Deutschland/Germany, nahe Hamb...
function mtl_uvspeed_render()
{
// using the material matrix:
// u' = u * mtl.matrix11 + v * mtl.matrix21 + mtl.matrix31;
// v' = u * mtl.matrix12 + v * mtl.matrix22 + mtl.matrix32;
mtl.matrix31 = floatd(my.skill1*total_ticks,256);
mtl.matrix32 = floatd(my.skill2*total_ticks,256);
}

function mtl_uvspeed_init()
{
// copy standard model material properties
mtl_copy(mat_model);
mat_identity(mtl.matrix);
mtl.event = mtl_uvspeed_render;
mtl.ENABLE_RENDER = on;
}

MATERIAL mtl_uvspeed =
{
event = mtl_uvspeed_init;
effect = "
matrix matMtl;

technique uvspeed
{
pass one
{
TextureTransformFlags[0] = Count2;
TextureTransform[0] = <matMtl>;
}
}
technique fallback { pass one { } }
";
}

//action: fx_uvspeed
//title: Texture shifting in u and v direction
//
//skill1: Speed_U 0
//help: Texture Speed in U direction, default 0
//skill2: Speed_V -2
//help: Texture Speed in V direction, default -2
//desc:
//desc: Shifts a texture in u and v direction.
//desc: To be assigned to a model.
//
action fx_uvspeed()
{

my.material = mtl_uvspeed;

mtl_uvspeed_init();

While(1)
{
My.Skill1 += 0.01*Time_Step;
Wait(1);
}

}


****

The Speed of the shifting is growing.....

Did I correct the "time" twice? (The red parts)
Or did I use the wrong matrix?

Re: Enity.u / entity.v [Re: dennis] #133027
06/01/07 21:48
06/01/07 21:48
Joined: Jan 2002
Posts: 4,225
Germany / Essen
Uhrwerk Offline
Expert
Uhrwerk  Offline
Expert

Joined: Jan 2002
Posts: 4,225
Germany / Essen
You were already increasing in the event. just replaceCode:
mtl.matrix31 = floatd(my.skill1*total_ticks,256);
mtl.matrix32 = floatd(my.skill2*total_ticks,256);

withCode:
mtl.matrix31 = floatd(my.skill1,256);
mtl.matrix32 = floatd(my.skill2,256);


That should do the trick.


Always learn from history, to be sure you make the same mistakes again...
Re: Enity.u / entity.v [Re: Uhrwerk] #133028
06/02/07 09:51
06/02/07 09:51
Joined: Jul 2006
Posts: 150
Deutschland/Germany, nahe Hamb...
dennis Offline OP
Member
dennis  Offline OP
Member

Joined: Jul 2006
Posts: 150
Deutschland/Germany, nahe Hamb...
YES! That's works very well!

Thank you!


Moderated by  old_bill, Tobias 

Gamestudio download | 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