Playing a view/camera on a model

Posted By: ExtraCortex

Playing a view/camera on a model - 05/07/07 21:32

I'm using this code:

remote.bmap = bmap_for_entity (my, 0);

on a model, the remote is the view.

And i want to make the model to be the "screen" that shows the view in real time.

The result i get with this code is that the model disapears, and the camera is shown above my main view like this:



The camera appears in left side ofthe screen, and the half sphere model disapears.
Posted By: xXxGuitar511

Re: Playing a view/camera on a model - 05/07/07 21:38

What remote and what half-sphere?

I see a keyboard and a fish
Posted By: quasarchangel

Re: Playing a view/camera on a model - 05/07/07 21:41

What layer did you use for the remote? Its supposed to be -1. That works with me. EDIT | Thats probably not the only thing that could be wrong.
Posted By: ExtraCortex

Re: Playing a view/camera on a model - 05/07/07 21:44

Quote:

What remote and what half-sphere?

I see a keyboard and a fish





They're just models, standing there waiting for theyr time..


The remote is the view's name, the half sphere is the model where i want the remote to be seen.
Posted By: ExtraCortex

Re: Playing a view/camera on a model - 05/07/07 21:45

Quote:

What layer did you use for the remote? Its supposed to be -1. That works with me.




It was "0", now with "-1" acknex.exe gives an unhandled exception/error..
Posted By: quasarchangel

Re: Playing a view/camera on a model - 05/07/07 22:01

Weird, whats your code? I'm unfortunately not very experienced with mirrors and so on. Just playing around with it now. Mine works to a certain extent, I just don't see the expected image on my entity.

Just to add I set my view up like this:
view remote_camera
{
layer=-1;
}
Posted By: ExtraCortex

Re: Playing a view/camera on a model - 05/07/07 22:04

view remote
{
pos_x = 0;
pos_y = 0;
// tenha certeza que o size_x e o size_y
// estão ajustados com o tamanho exato do sprite a ser usado
// como tela de monitor:
size_x = 500; // tamanho da largura do sprite a ser usado como tela
size_y = 500; // tamanho da altura do sprite a ser usado como tela
layer = 5;
flags = visible;
}







action monitor // the monitor model
{
while(pila==0){
angulo_inicial_sprite.pan=my.pan;
angulo_inicial_sprite.tilt=my.tilt;
angulo_inicial_sprite.roll=my.roll;
portal.x=my.x;
portal.y=my.y;
portal.z=my.z;
pila=1;
tamanho_sprite=50;
}
my.oriented = on; // oriented sprite
remote.bmap = bmap_for_entity (my, 0);
}
Posted By: quasarchangel

Re: Playing a view/camera on a model - 05/07/07 22:18

Ok, I'll try help.

Try these changes:

view remote
{
layer =-1;
}


action monitor // the monitor model
{
my.oriented = on; // oriented sprite
while(1){
angulo_inicial_sprite.pan=my.pan;
angulo_inicial_sprite.tilt=my.tilt;
angulo_inicial_sprite.roll=my.roll;
portal.x=my.x;
portal.y=my.y;
portal.z=my.z;
tamanho_sprite=50;
remote.bmap = bmap_for_entity (my, 0);
wait(1);
}
}

The manual says that layer=-1 hides the view, so it should be there. Maybe you have a different version of 3DGS than I have?
Posted By: ExtraCortex

Re: Playing a view/camera on a model - 05/07/07 22:26

Now the camera doesnt appear anymore in the left side of the screen, but the sphere model is still missing.
Posted By: quasarchangel

Re: Playing a view/camera on a model - 05/07/07 22:34

Are you using the monitor action on the sphere model? If so, I think you can remove the my.oriented=on; from the action. Then try it with a different model.

Also try adding a "remote.visible = on;" to the monitor action, before the while loop.
Posted By: Captain_Kiyaku

Re: Playing a view/camera on a model - 05/08/07 09:23

view remote
{
layer =-1;
flags = visible;
}


action monitor // the monitor model
{
remote.bmap = bmap_for_entity (my, 0); //only one time is enough
// my.oriented = on; // oriented sprite why do you need it for a sphere?
while(1){
vec_set(angulo_inicial_sprite.pan, my.pan); just shorter
vec_set(portal.x, my.x); just shorter
tamanho_sprite=50;
wait(1);
}
}
Posted By: ExtraCortex

Re: Playing a view/camera on a model - 05/08/07 10:22

The flags = visible; was already there (see my code quotation in 1st page).
Thanks for shorting that lines, it will be usefull for me to short another ones in other scripts



Quote:

Are you using the monitor action on the sphere model? If so, I think you can remove the my.oriented=on; from the action. Then try it with a different model.

Also try adding a "remote.visible = on;" to the monitor action, before the while loop.




yes, i'll take out the my.oriented.
visible is already on.



Can anyone do that on a model and send me the project in a .rar or .zip?

Thanks.
Posted By: Captain_Kiyaku

Re: Playing a view/camera on a model - 05/08/07 10:36

Try this:

Portal Test


Also do you own the Pro version? Cause you can't render a view on a model without this version.
Posted By: ExtraCortex

Re: Playing a view/camera on a model - 05/08/07 10:38

Yes, i have the old 6.2 pro, i love 6.2
Posted By: Captain_Kiyaku

Re: Playing a view/camera on a model - 05/08/07 10:39

Quote:

Yes, i have the old 6.2 pro, i love 6.2




hmm sure

You propably should update, maybe it helps
Posted By: ExtraCortex

Re: Playing a view/camera on a model - 05/08/07 11:14

Kihaku, wed is telling that some resources are needed in your portal.rar, BAUM1.mdl or something like that.

When i run it, everything appears grey.
Posted By: Captain_Kiyaku

Re: Playing a view/camera on a model - 05/08/07 11:16

well, just copy the warlock and name it like this xD
might forgot to include some models.

But it's working fine here.

As i said, you better update your Pro and see if it works then.
Posted By: ExtraCortex

Re: Playing a view/camera on a model - 05/08/07 19:04

ok, now works fine!

Thanks!

I'll soon release my portal script, still need some fixes in the tangent thing.
© 2023 lite-C Forums