Has anyone experience with making a moving text wich will disappear into the depth (see the attachement). A normal moving text by using fonts (setPosition) is quiet easy but going into another dimension....
@Dikkensnoek as far as I know you can't embed html5 or css in lua. You could try to understand how the code works and try to replicate its "logic" in your lua project. I suppose it's something you can do with a textured Mesh.
However try googling for "perspective" and "raycasting", maybe there is something to put you in the right direction. Good luck!
@pie is right, you can achieve this using textured mesh and rendertarget. In fact, I found your goal an interesting challenge and took some time to try to achieve this myself. And I am pretty proud of the result (see attached project, and feel free to reuse part of it). However I had to hack/tweak a little to make it...
Whooooaah. That is really amazing!!!! I did this in the first place with Windows Moviemaker. In that case you have to play a videofile (see my previous post). What I also did was to extract all the frames from the movie file and try to load it and play it with a MovieClip object. The whole app became very slow.
I am studying the Mesh object at the moment. I've never used it before. It's not really clear how it works. Am I right that you create a triangle where the text will be cutted off? What is the best way to change the size and position of the text?
The basic idea is to render the whole scrolling text to a texture (with RenderTarget) and map this texture on a trapeze shaped Mesh. But while building a trapeze shaped mesh should only require two triangles, texture was not rendered consistently accross those two triangles. I am still trying to understand why... Two achieve good effect, I had to divide my large trapeze in a stack of small ones from near to far field, and compute texture coordinates accordingly. Appart from working well, this technique also adds to ability to define an alpha gradient, making the texture smoothly fade out into deep space.
To change size of the mesh, you can modify farlen (little/far edge of the trapeze), nearlen (long/front edge of the trapeze) and fardist ("height" of the trapeze).
Thanks again. This one is really superb. The example is interesting to place in the tutorial section on, for example the Gideros site. I will experiment with your examples. When I succeed will let you know.
I was wondering, are you working on a game too, or have you released (a) game(s)?
I am working on a funny shooter with parallax scrolling. Before the game starts it will show a Star Wars like text with some weird elements. Is there by the way a tutorial on the Mesh subject? I've seen the term Vertex before in creating collision stuff in the Physics Editor.
Indeed something has changed in Gideros, and its about Meshes. In my sample code I was doing something that I shouldn't: overriding a class constructor with different parameters. This broke when I added an arg to Mesh constructor.
Below is a fixed file. BTW, New 3D features make it more easy to make such effects.
Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!). https://deluxepixel.com
Comments
into my Lua project.
I suppose it's something you can do with a textured Mesh.
However try googling for "perspective" and "raycasting", maybe there is something to put you in the right direction. Good luck!
@pie is right, you can achieve this using textured mesh and rendertarget. In fact, I found your goal an interesting challenge and took some time to try to achieve this myself. And I am pretty proud of the result (see attached project, and feel free to reuse part of it).
However I had to hack/tweak a little to make it...
with Windows Moviemaker. In that case you have to play a
videofile (see my previous post). What I also did was to extract
all the frames from the movie file and try to load it and play
it with a MovieClip object. The whole app became very slow.
Thanks a lot,
Marc
Likes: hgy29
BTW, the Mesh part is really ugly. Its a pity the Mesh doesn't support GL_QUAD... and Z coordinate would have been welcome too :P
It's not really clear how it works. Am I right that you create a triangle
where the text will be cutted off? What is the best way to change the
size and position of the text?
Regards and thanks again,
Marc
Two achieve good effect, I had to divide my large trapeze in a stack of small ones from near to far field, and compute texture coordinates accordingly. Appart from working well, this technique also adds to ability to define an alpha gradient, making the texture smoothly fade out into deep space.
To change size of the mesh, you can modify farlen (little/far edge of the trapeze), nearlen (long/front edge of the trapeze) and fardist ("height" of the trapeze).
I've reworked a bit my code so that it is little more tunable, and I added a better perspective effect. Now it looks like LucasArt's one!
Likes: pie
is interesting to place in the tutorial section on, for
example the Gideros site. I will experiment with your
examples. When I succeed will let you know.
I was wondering, are you working on a game too, or
have you released (a) game(s)?
Have a nice weekend,
Marc
Have a nice week end too
@ar2rsawseen please add this code to tutorial section .
Likes: hgy29
game starts it will show a Star Wars like text with some weird
elements. Is there by the way a tutorial on the Mesh subject? I've
seen the term Vertex before in creating collision stuff in the
Physics Editor.
Could it be possible that something in Gideros has been
changed? For example Rendertarget. @hgy29, I can't get
your code running anymore.
Regards,
Marc
The Player is also not usable. I am switching back to the
2014.01 version.
Regards,
Marc
Indeed something has changed in Gideros, and its about Meshes.
In my sample code I was doing something that I shouldn't: overriding a class constructor with different parameters. This broke when I added an arg to Mesh constructor.
Below is a fixed file.
BTW, New 3D features make it more easy to make such effects.
Likes: pie
http://www.sinistersoft.com/RetroStar/gideros.html
https://deluxepixel.com