monsieur hgy29 I can see in both your videos that you have shadows for all your objects in the world at once. Why doesn't it work for me? Is it due to the size of the world? My world is 512*512 pixels.
Everytime I pass a certain limit the shadow disappears.
I would like to position the light somewhere up in the sky (a sun) and see all the shadows of my objects What am I missing?
Actually I don’t, my shadows are only visible on a certain area. In the first version the area was big, but the shadows not very smooth. In the latest versions, I move the shadow area with the player, so that shadows are visible for objects nearby the player
Todays progress: - First world (I'd like to propose at least three worlds) elements are done. Still perfectible in many ways but already something. - Made a short world entry scene, basically a camera flight and a mission explanation dialogue (shortened in the video). - Tractor beam and item lifting/releasing works (not shown on the video) - I am progressing really slowly currently, having hard time building the scenery. The game story is taking form though, and the hardest part is yet to come.
I have a question please Is it possible to render the animation in a render target? I don't know what the source should be the camera? the scene? or the mesh? I tried playing with scaling and everything but could not get a proper render, it looks like the mesh is rotated somehow. Could you help me please? I have a big IDEA in mind but I am stuck SOLVED: if you want to capture your model you can do:
local camera = D3.View.new(width, height, 45, 0.1, 32)local rt = RenderTarget.new(256, 256)local bmprt = Bitmap.new(rt)
self:addChild(bmprt)
rt:draw(camera.view)
"Texture coordinates range from 0 to 1 in the x and y axis. Texture coordinates start at (0,0) for the lower left corner of a texture image to (1,1) for the upper right corner of a texture image."
Is this true for gideros too? I thought 0,0 was the top left corner!? "Texture coordinates start at (0,0) for the lower left corner of a texture image to (1,1) for the upper right corner of a texture image."
This is true from OpenGL docs point of view, but false from Gideros point of view, and this without Gideros even swapping or messing with the coordinates.
In OpenGL, everything is 'bottom up', in Gideros everything is 'top down'. From the texture point of view, this doesn't make a difference since OpenGL API also suppose you supply texture data starting from the bottom line. Gideros always supply texture data from the top line. So y axis is reversed in OpenGL, but input image is flipped too, so in the end this double inversion cancels the coordinate system difference.
PS: I had to search for maybe 20 minutes to figure out why textures weren't flipped
thank you, yes that is strange that opengl draws from bottom up and then flips the image I will do more tests in gideros before wasting any more of your time hgy29, sorry
Comments
Everytime I pass a certain limit the shadow disappears.
I would like to position the light somewhere up in the sky (a sun) and see all the shadows of my objects What am I missing?
I have updated my GH https://github.com/mokalux/gideros-3D-FP
Likes: MoKaLux
- First world (I'd like to propose at least three worlds) elements are done. Still perfectible in many ways but already something.
- Made a short world entry scene, basically a camera flight and a mission explanation dialogue (shortened in the video).
- Tractor beam and item lifting/releasing works (not shown on the video)
- I am progressing really slowly currently, having hard time building the scenery. The game story is taking form though, and the hardest part is yet to come.
Likes: MoKaLux, SinisterSoft
Is it possible to render the animation in a render target? I don't know what the source should be the camera? the scene? or the mesh?
I tried playing with scaling and everything but could not get a proper render, it looks like the mesh is rotated somehow.
Could you help me please? I have a big IDEA in mind but I am stuckSOLVED: if you want to capture your model you can do:
Likes: MoKaLux
I can get the width and the height of a 3d mesh
I don't want to "pollute" this topic so I add my thank you here for the below answer by hgy29.
Likes: MoKaLux
one more question pleaseIs it possible to set an ortographic projection? I don't know what to pass as arguments
EDIT: this works
Is this true for gideros too? I thought 0,0 was the top left corner!?
"Texture coordinates start at (0,0) for the lower left corner of a texture image to (1,1) for the upper right corner of a texture image."
Thank you
In OpenGL, everything is 'bottom up', in Gideros everything is 'top down'. From the texture point of view, this doesn't make a difference since OpenGL API also suppose you supply texture data starting from the bottom line. Gideros always supply texture data from the top line. So y axis is reversed in OpenGL, but input image is flipped too, so in the end this double inversion cancels the coordinate system difference.
PS: I had to search for maybe 20 minutes to figure out why textures weren't flipped
Likes: MoKaLux