Gamestudio Links
Zorro Links
Newest Posts
Trading Journey
by 7th_zorro. 04/27/24 04:42
Help with plotting multiple ZigZag
by M_D. 04/26/24 20:03
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
M1 Oversampling
by jcl. 04/26/24 11:12
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
Eigenwerbung
by jcl. 04/26/24 11:08
MT5 bridge not working on MT5 v. 5 build 4160
by EternallyCurious. 04/25/24 20:49
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
4 registered members (Akow, Quad, 7th_zorro, VoroneTZ), 800 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
wandaluciaia, Mega_Rod, EternallyCurious, howardR, 11honza11
19049 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
View on modell #387529
11/20/11 11:25
11/20/11 11:25
Joined: Sep 2009
Posts: 496
P
Progger Offline OP
Senior Member
Progger  Offline OP
Senior Member
P

Joined: Sep 2009
Posts: 496
Hi community
I need your help
I try to get a view on a model but it still dont work frown
I searched in the aums and found a script but this only works on sprites how can ic chnage it that it works on models also ?

Code:
Q: Is it possible to render a view on a target like a model, a texture or a bmap? I'd like to use that as a mirror, for example.

A: Sure, take a peek.

 

ENTITY* mirrorsprite;

 

VIEW* mirror_view;

 

action mirror_sprite() // attach this action to a sprite / model that will be used for the mirror

{

       mirrorsprite = my;        

       set (my, PASSABLE | DECAL);

}

 

function mirror_startup()

{

       while (!mirror_sprite) {wait (1);}

       mirror_view = view_create(10); // set the layer value for the new view to 10

       wait (2);

       set (mirror_view, SHOW);

       mirror_view.size_x = 128;

       mirror_view.size_y = 128; // the mirror sprite has 128x128 pixels

       mirror_view.bmap = bmap_for_entity(mirrorsprite, 0);

       vec_set(mirror_view.x, vector(1000, 500, 100)); // set the position of the mirror "eye"

       vec_set(mirror_view.pan, vector(0, -10, 0)); // set the angles of the mirror "eye"

}



When i apply this to a model nothing changes you can not see a view on it.
When i use a sprite it works perfectly
Can you explain me from step to step how to do that.
How many skins shell the model have?
Because i think iam doing something wrong


I really need your help!!
Thanks for reading this and also for your help laugh
WFG Progger laugh

Last edited by Progger; 11/20/11 11:26.

asking is the best Way to get help laugh laugh laugh
Re: View on modell [Re: Progger] #387564
11/20/11 18:49
11/20/11 18:49
Joined: Sep 2009
Posts: 496
P
Progger Offline OP
Senior Member
Progger  Offline OP
Senior Member
P

Joined: Sep 2009
Posts: 496
Sorry for doublepost but i want to know it to go on with development of the game laugh
WFG Progger laugh


asking is the best Way to get help laugh laugh laugh
Re: View on modell [Re: Progger] #387565
11/20/11 18:55
11/20/11 18:55
Joined: May 2009
Posts: 5,370
Caucasus
3run Offline
Senior Expert
3run  Offline
Senior Expert

Joined: May 2009
Posts: 5,370
Caucasus
PM me dude, I have something for you wink


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: View on modell [Re: 3run] #387583
11/21/11 01:45
11/21/11 01:45
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
Firstly, I would suggest using ent_getskin(mirrorent,1) rather than bmap_for_entity.
I have had far more success using it, its just far more reliable.

Secondly, if it is working on a sprite for you, why not use it into an
ent_decal? Paste the decal onto your entity, an it would work the same I believe.

Thirdly, if ent_decal dont work, or is un-do-able, I BELIEVE you will need two skins
on your model.
Skin1 is the models general texture, and skin2 a 128x128 texture mapped
entirely onto the 'reflective' portion of the model.
Oh, and use 'bmap=ent_getskin(mirrorent,2)' in the view.

See if that can get you started. It will take a bit of tweaking to get it
looking right I believe.
But what Ive given you should get at least some of the view mapped into the model.


"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial
Re: View on modell [Re: EvilSOB] #387710
11/22/11 15:22
11/22/11 15:22
Joined: Sep 2009
Posts: 496
P
Progger Offline OP
Senior Member
Progger  Offline OP
Senior Member
P

Joined: Sep 2009
Posts: 496
Thank you very much EvilSOB
Ill try all tipps u gave me laugh
ent_getskin also dont work
now ill try to use decals laugh
Hope that will work
WFG PRogger laugh


asking is the best Way to get help laugh laugh laugh
Re: View on modell [Re: Progger] #387713
11/22/11 15:39
11/22/11 15:39
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
Looking forward to your results...


"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial
Re: View on modell [Re: EvilSOB] #387870
11/24/11 21:43
11/24/11 21:43
Joined: Sep 2009
Posts: 496
P
Progger Offline OP
Senior Member
Progger  Offline OP
Senior Member
P

Joined: Sep 2009
Posts: 496
So sorry for not posting but i had to do much to do in school.
Well then first i want to thank you all laugh
I did a big mistake in my code so itcould not work^^
Well thanks to all who helped me and especially to 3run who made an example for me so i could compare both codes and finally found the error.
Here is the picture:


WFG Progger laugh


asking is the best Way to get help laugh laugh laugh

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