Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/20/24 01:28
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (kzhao, AndrewAMD, bigsmack), 824 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Sprites render on the screen #260779
04/13/09 15:15
04/13/09 15:15
Joined: Aug 2004
Posts: 1,345
Kyiv, Ukraine
VeT Offline OP
Serious User
VeT  Offline OP
Serious User

Joined: Aug 2004
Posts: 1,345
Kyiv, Ukraine
I asked this question some time ago and it was looked ilke i solve trouble, but i decided to ask this again.
So, i think that it would be usefull to render sprites right on the screen.

For example, i want to move my sprite with camera, and particles may not to be effected.

Look here: i created entity in 3d and place it in front of camera. Entity creates particles. When camera is not rotate, everything looking ok

but as i rotate camera to the right direction(clockwise, by pan axis), i get


I think that render particles right on the screen would be able to solve this


1st prize: Lite-C and Newton 2.17 by Vasilenko Vitaliy

Newton2 videos: http://tinyurl.com/NewtonVideos
LiteC+Newton2 discussion: http://tinyurl.com/NewtonWrapperDiscussion
Latest LiteC+Newton2 version(v23, from 29.10.2009): http://depositfiles.com/files/ae1l0tpro
Re: Sprites render on the screen [Re: VeT] #260865
04/14/09 08:21
04/14/09 08:21
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
You mean particles in view coordinates, rather than world coordinates. This would be possible, but it's rarely needed, so I'm not sure if it's worth an new particle flag.

You can solve this problem already in world coordinates, in the particle function:

- get the distance vector from the camera to the particle
- rotate this vector by the same euler angle you added to the camera angle.
- get the distance vector from the rotated vector to the original vector
- add this new distance vector to the particle position.

This should keep your particles in front of the camera regardless of the rotation.

Re: Sprites render on the screen [Re: jcl] #260936
04/14/09 18:12
04/14/09 18:12
Joined: Aug 2004
Posts: 1,345
Kyiv, Ukraine
VeT Offline OP
Serious User
VeT  Offline OP
Serious User

Joined: Aug 2004
Posts: 1,345
Kyiv, Ukraine
I tried that method some time ago, but i didnt got this wark.. in addition, i thought that it would be usefull for users smile


1st prize: Lite-C and Newton 2.17 by Vasilenko Vitaliy

Newton2 videos: http://tinyurl.com/NewtonVideos
LiteC+Newton2 discussion: http://tinyurl.com/NewtonWrapperDiscussion
Latest LiteC+Newton2 version(v23, from 29.10.2009): http://depositfiles.com/files/ae1l0tpro
Re: Sprites render on the screen [Re: VeT] #261620
04/18/09 22:23
04/18/09 22:23
Joined: Aug 2004
Posts: 1,345
Kyiv, Ukraine
VeT Offline OP
Serious User
VeT  Offline OP
Serious User

Joined: Aug 2004
Posts: 1,345
Kyiv, Ukraine
Okay, i have next trouble... As emitter is far from camera, it can be postioned behind the models... so, sometimes i dont see particles at all

In addition, it's looking like non-optimized to translate particle coordinates from 3d(emitter) to screen, then calculate new position in 3d, and then translate into screen coordinatees again...

I'd be REALLY happy, if you (please-please-please) add posibility of rendering particles right on the screen, like entittes:
ENTITY* shotgun_onscreen =
{
type = "shotgun.mdl";
layer = 2; // display above view entities with layer 1
flags2 = SHOW; // lite-C only:
x = 100; // place 100 quants ahead of the view
y = -50; // 50 to the right
z = 0; // and center vertically
}


1st prize: Lite-C and Newton 2.17 by Vasilenko Vitaliy

Newton2 videos: http://tinyurl.com/NewtonVideos
LiteC+Newton2 discussion: http://tinyurl.com/NewtonWrapperDiscussion
Latest LiteC+Newton2 version(v23, from 29.10.2009): http://depositfiles.com/files/ae1l0tpro
Re: Sprites render on the screen [Re: VeT] #261829
04/20/09 13:49
04/20/09 13:49
Joined: Aug 2004
Posts: 1,345
Kyiv, Ukraine
VeT Offline OP
Serious User
VeT  Offline OP
Serious User

Joined: Aug 2004
Posts: 1,345
Kyiv, Ukraine
if anyone else would need it, look there
http://www.opserver.de/ubb7/ubbthreads.php?ubb=showflat&Number=261827#Post261827

PS: still, i dont think that its the fastest solution

Last edited by VeT; 04/21/09 19:07.

1st prize: Lite-C and Newton 2.17 by Vasilenko Vitaliy

Newton2 videos: http://tinyurl.com/NewtonVideos
LiteC+Newton2 discussion: http://tinyurl.com/NewtonWrapperDiscussion
Latest LiteC+Newton2 version(v23, from 29.10.2009): http://depositfiles.com/files/ae1l0tpro
Re: Sprites render on the screen [Re: VeT] #263579
04/30/09 15:16
04/30/09 15:16
Joined: Apr 2008
Posts: 2,488
ratchet Offline
Expert
ratchet  Offline
Expert

Joined: Apr 2008
Posts: 2,488
I have perhaps a solution for you ?

Why not creating a 3D plane with a transparent texture that would be placed in front of your camera and would not move.
And each frame :
-Clear the texture or reaload the transparent one.
-draw on the sprites(textures) you want on the plane

Re: Sprites render on the screen [Re: ratchet] #263603
04/30/09 19:11
04/30/09 19:11
Joined: Aug 2004
Posts: 1,345
Kyiv, Ukraine
VeT Offline OP
Serious User
VeT  Offline OP
Serious User

Joined: Aug 2004
Posts: 1,345
Kyiv, Ukraine
drawing on the texture... hm.. idea isnt bad, but i think that if i'd have a lot of particles, it may be too slow


1st prize: Lite-C and Newton 2.17 by Vasilenko Vitaliy

Newton2 videos: http://tinyurl.com/NewtonVideos
LiteC+Newton2 discussion: http://tinyurl.com/NewtonWrapperDiscussion
Latest LiteC+Newton2 version(v23, from 29.10.2009): http://depositfiles.com/files/ae1l0tpro

Moderated by  aztec, Spirit 

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