| Author |
Message |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 26/08/2008 05:02:26
|
vlad
Joined: 05/08/2008 06:20:15
Messages: 13
Offline
|
I see that you guys have done sprites. I'm trying to do that, now, but I'm having a little difficulty.
Do you guys mind posting some example code for the '3d sprites', or for just plain sprites (billboards), as found shown here:
http://blog.alternativaplatform.com/en/2007/10/05/sprites-3d-sprites/
A little code, such as how to make the sprite face the camera should get me on my way.
If you are unabled, or unwilling, to post a little code, could you give me some direction about how accomplish this?
Thanks
Vlad
|
|
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 26/08/2008 23:25:31
|
makc
![[Avatar]](/images/avatar/bbcbb1e844266f4abdfc29b3d8a64628607fa47e.png)
Joined: 02/06/2008 12:19:17
Messages: 1704
Offline
|
this is obvoiusly unsupported in current version.
@team, coming API overview or any suggestions on how to minimize to-5.1 migration overhead would be great.
|
|
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 26/08/2008 23:39:24
|
vlad
Joined: 05/08/2008 06:20:15
Messages: 13
Offline
|
Hi makc,
I know this current version doesn't support 'billboards', per se. I'm interested in a way to 'fake' them (make them work however possible) until they are officially supported.
I just don't know what's the best way to get them to work. I don't know if tying them to the actual camera rotation is the best way. I don't know the formula to get that to work, and since the team has already done that, I figure I would ask for sample actionscript code.
~ vlad
|
|
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 27/08/2008 00:05:58
|
makc
![[Avatar]](/images/avatar/bbcbb1e844266f4abdfc29b3d8a64628607fa47e.png)
Joined: 02/06/2008 12:19:17
Messages: 1704
Offline
|
I was thinking about extending SurfaceMaterial and making a surface with single vertex, but the engine might not allow this kind of hack. This needs to be tried though...
This message was edited 1 time. Last update was at 27/08/2008 00:06:25
|
|
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 27/08/2008 20:24:43
|
Joe
Joined: 02/06/2008 03:36:22
Messages: 45
Offline
|
You could try and port Sandy's Sprite3D class, or even this Papervision3D demo's. Both have the right math.
|
|
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 27/08/2008 20:47:53
|
mike
Joined: 01/06/2008 00:00:06
Messages: 786
Offline
|
Vlad, here is a sample code which rotates a default plane (the normal of a new created plane is directed along Z axis, "up" vector for the plane is directed along Y axis) so that the plane's normal is always directed to the camera.
|
|
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 28/08/2008 12:15:17
|
makc
![[Avatar]](/images/avatar/bbcbb1e844266f4abdfc29b3d8a64628607fa47e.png)
Joined: 02/06/2008 12:19:17
Messages: 1704
Offline
|
makc wrote:This needs to be tried though...
Thanks to Anton's help, this worked for me. See below for a link.
This message was edited 2 times. Last update was at 06/09/2008 17:54:27
|
|
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 05/09/2008 13:01:20
|
mariuszkreft
Joined: 04/08/2008 13:12:18
Messages: 10
Offline
|
Isn't it slow to rotate geometry, especially when you have lot of Sprites?
|
|
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 05/09/2008 13:06:47
|
makc
![[Avatar]](/images/avatar/bbcbb1e844266f4abdfc29b3d8a64628607fa47e.png)
Joined: 02/06/2008 12:19:17
Messages: 1704
Offline
|
that's why I rotate camera instead. it will be only fast when real sprites come out in v6.
|
|
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 05/09/2008 18:30:53
|
mariuszkreft
Joined: 04/08/2008 13:12:18
Messages: 10
Offline
|
@makc, your sprites are blinking
This message was edited 1 time. Last update was at 05/09/2008 18:31:10
|
|
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 05/09/2008 18:47:03
|
makc
![[Avatar]](/images/avatar/bbcbb1e844266f4abdfc29b3d8a64628607fa47e.png)
Joined: 02/06/2008 12:19:17
Messages: 1704
Offline
|
yep. that's POC code, not really production... but I will try to see what can be done about blinking over the weekend.
|
|
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 06/09/2008 14:49:39
|
wolf
![[Avatar]](/images/avatar/b3f0c7f6bb763af1be91d9e74eabfeb199dc1f1f.jpg)
Joined: 31/05/2008 23:19:38
Messages: 1521
Offline
|
I found interesting prototype of game with sprites (based on rotating planes):
http://littlemofo.soap.com.au/gamedev/zombie3D/
|
|
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 06/09/2008 15:30:57
|
makc
![[Avatar]](/images/avatar/bbcbb1e844266f4abdfc29b3d8a64628607fa47e.png)
Joined: 02/06/2008 12:19:17
Messages: 1704
Offline
|
makc wrote:I will try to see what can be done about blinking over the weekend.
blinking problem is now resolved.
|
|
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 07/09/2008 00:26:01
|
mariuszkreft
Joined: 04/08/2008 13:12:18
Messages: 10
Offline
|
@makc
well done
|
|
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 23/09/2008 10:23:26
|
gjgcomp
Joined: 15/09/2008 05:51:51
Messages: 2
Offline
|
Hi,
I'm trying to port the Sprite3D class of Sandy to use with my Alternativa scene but this is the error I'm running into:
1067: Implicit coercion of a value of type sandy.core.scenegraph:Sprite3D to an unrelated type alternativa.engine3d.core:Object3D.
The line that it's erroring out on is
which "s" is the Sprite3D variable.
What I did was setup the import of that class via
I see that there's a conflict with Alternativa's core which is understandable, although I'm not sure how to go about porting that class over so it doesn't conflict with the Alternativa engine. Any thoughts?
Thanks
|
|
|
 |
|
|