Quick Links: Download Gideros Studio | Gideros Documentation | Gideros Development Center | Gideros community chat | DONATE
More experiments with 3D — Gideros Forum

More experiments with 3D

Still discovering 3D game creation and experimenting with various tools. Today a demo of Gideros showing a 3D race track built with Kenney Asset Forge (https://kenney.itch.io/assetforge-deluxe) and some assets from Keith (https://fertile-soil-productions.itch.io/).

Rather happy with the result so far.

If you like those tools, please help their authors with a donation.


+1 -1 (+2 / -0 )Share on Facebook
«1

Comments

  • MoKaLuxMoKaLux Member
    edited April 2020
    Great work.
    After experimenting with 3d I discovered I needed height field shape: https://wiki.giderosmobile.com/index.php/R3d.HeightFieldShape.new
    Are you using it in your demo?
    From the demo it seems each models are separated (trees, hills, ...) because they cast shadows. How did you build the level?
    I used tiled to build my 3d world but the tool is not very well suited for 3d. Building the level in blender would be the best way but that would mean using height field shape which I haven't experimented with yet.
    my growING GIDEROS github repositories: https://github.com/mokalux?tab=repositories
  • olegoleg Member
    hgy29 said:

    Still discovering 3D game creation and experimenting with various tools. Today a demo of Gideros showing a 3D race track built with Kenney Asset Forge (https://kenney.itch.io/assetforge-deluxe) and some assets from Keith (https://fertile-soil-productions.itch.io/).

    Rather happy with the result so far.

    If you like those tools, please help their authors with a donation.


    Why are square polygons visible on the video, why are the rounding not smooth? Gideros incorrectly calculates normals?
    my games:
    https://play.google.com/store/apps/developer?id=razorback456
    мій блог по гідерос https://simartinfo.blogspot.com
    Слава Україні!
  • @oleg I think that's the models hgy29 used (low poly models). You can see the rounding of the road is quite smooth.
    my growING GIDEROS github repositories: https://github.com/mokalux?tab=repositories
  • olegoleg Member
    MoKaLux said:

    @oleg I think that's the models hgy29 used (low poly models). You can see the rounding of the road is quite smooth.

    There are enough polygons. The problem is that the vertices of the adjacent polygons are separated, so the faces of the polygons are visible.

    Likes: MoKaLux

    my games:
    https://play.google.com/store/apps/developer?id=razorback456
    мій блог по гідерос https://simartinfo.blogspot.com
    Слава Україні!
    +1 -1 (+1 / -0 )Share on Facebook
  • hgy29hgy29 Maintainer
    oleg said:


    Why are square polygons visible on the video, why are the rounding not smooth? Gideros incorrectly calculates normals?

    I don’t know. Gideros processes the normals correctly so I assume they are just absent from the models I used, or the tool (asset forge) don’t handle them.

    Likes: oleg

    +1 -1 (+1 / -0 )Share on Facebook
  • hgy29hgy29 Maintainer
    MoKaLux said:

    Great work.
    After experimenting with 3d I discovered I needed height field shape: https://wiki.giderosmobile.com/index.php/R3d.HeightFieldShape.new
    Are you using it in your demo?
    From the demo it seems each models are separated (trees, hills, ...) because they cast shadows. How did you build the level?
    I used tiled to build my 3d world but the tool is not very well suited for 3d. Building the level in blender would be the best way but that would mean using height field shape which I haven't experimented with yet.

    I didn’t try to add physics yet, and if I do I’ll probably use heightfieldshape for the terrain.
    The terrain is a single model built with asset forge. Today I’ll try to add a vehicle on the track and see how I’ll handle collisions and controls.

    Likes: MoKaLux

    +1 -1 (+1 / -0 )Share on Facebook
  • Looks nice. But how do you guys design 3D maps without viewport? Monkey-code x-y-z of every mesh?
    > Newcomers roadmap: from where to start learning Gideros
    "What one programmer can do in one month, two programmers can do in two months." - Fred Brooks
    “The more you do coding stuff, the better you get at it.” - Aristotle (322 BC)
  • hgy29hgy29 Maintainer
    Apollo14 said:

    Looks nice. But how do you guys design 3D maps without viewport? Monkey-code x-y-z of every mesh?

    I’d like to know of a good tool to d that myself (beside using unity). So far asset forge is the closest tool I found for that purpose. And it is not it’s purpose in fact, so it lacks ways of naming objects. But it can compose a scene from building blocks and export it as a big object... and is easier to use than blender. Maybe the exported object could be reopened in blender and adjusted from there though.
  • We can already make a scene using r3d and the obj class.

    The ground, walls, houses, bins are different 3d objects.
    The problem is arranging the 3D scene, I tried using tiled, that works but I have to work from a top down view and know the exact dimensions of my objects for best results!
    What I am missing the most today with r3d are heightfieldshape and animations.
    The obj class you wrote works just great <3
    r3d_scene.png
    482 x 852 - 449K
    my growING GIDEROS github repositories: https://github.com/mokalux?tab=repositories
  • MoKaLuxMoKaLux Member
    edited April 2020
    here is the above scene I build using tiled:

    sample code is here: http://forum.giderosmobile.com/discussion/comment/62142/#Comment_62142
    r3d_scene2.png
    511 x 523 - 17K
    my growING GIDEROS github repositories: https://github.com/mokalux?tab=repositories
  • hgy29 said:

    Apollo14 said:

    Looks nice. But how do you guys design 3D maps without viewport? Monkey-code x-y-z of every mesh?

    I’d like to know of a good tool to d that myself (beside using unity)
    There's one "dark horse": W4 Game Creation Kit. But it's not ready yet, they planned to release alpha version this spring, but probably it'll be delayed because of current world hysteria.
    Their team consists of ~20 employees who previously worked in large gamedev companies. Currently, nothing is known about the W4. Will it be open-source, who sponsors product development, and how will they keep paying salaries to 20 employees.
    > Newcomers roadmap: from where to start learning Gideros
    "What one programmer can do in one month, two programmers can do in two months." - Fred Brooks
    “The more you do coding stuff, the better you get at it.” - Aristotle (322 BC)
  • olegoleg Member
    hgy29 said:

    oleg said:


    Why are square polygons visible on the video, why are the rounding not smooth? Gideros incorrectly calculates normals?

    I don’t know. Gideros processes the normals correctly so I assume they are just absent from the models I used, or the tool (asset forge) don’t handle them.
    hgy29 said:

    oleg said:


    Why are square polygons visible on the video, why are the rounding not smooth? Gideros incorrectly calculates normals?

    I don’t know. Gideros processes the normals correctly so I assume they are just absent from the models I used, or the tool (asset forge) don’t handle them.
    If on your models the vertexes are not connected - it not only makes the angles sharp, it also puts more load on the gpu ..
    my games:
    https://play.google.com/store/apps/developer?id=razorback456
    мій блог по гідерос https://simartinfo.blogspot.com
    Слава Україні!
  • hgy29hgy29 Maintainer
    Back on my 3D experiments, having rewritten my old code from scratch after my recent data loss and using Gideros 2020.11 with ReactPhysics3D 0.8.0 (not ready for release yet).

    I am still struggling with 3D physics inaccuracies (objects sometimes going through the terrain and getting stuck) so I changed my mind for a lander game, for which accuracy is far less important. It uses recent gideros math additions (vectoir length, normalisation), which turn out to be very handy.

    Result:
    +1 -1 (+3 / -0 )Share on Facebook
  • looks nice.
    the camera following all movements makes me dizzy, there could be some limit after which the camera follows the object.
  • hgy29hgy29 Maintainer
    yes it is far more being perfect, but I am satisfied already because it definitely usable for a real game. Next step is creating a more suitable terrain for the game, with landing pads at least.

    Likes: MoKaLux

    +1 -1 (+1 / -0 )Share on Facebook
  • oh I am so happy to see some 3d projects in gideros :) <3
    I have read from reactphysics that the source has been refactored, is the wiki still valid or do we need to redo it from scratch?
    my growING GIDEROS github repositories: https://github.com/mokalux?tab=repositories
  • imho you should look at making it like Pilot Wings. That was a someone in a parachute landing, flying through rings, etc...

    It was a great game and really popular.



    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
  • hgy29 said:

    Back on my 3D experiments...

    I see on the shadows aliasing-is it possible to blur the edge of the shadow ??
    my games:
    https://play.google.com/store/apps/developer?id=razorback456
    мій блог по гідерос https://simartinfo.blogspot.com
    Слава Україні!
  • hgy29hgy29 Maintainer
    oleg said:


    I see on the shadows aliasing-is it possible to blur the edge of the shadow ??

    It should be possible, but I don't understand yet why it looks that way in with the current shader code

  • hgy29hgy29 Maintainer
    MoKaLux said:


    I have read from reactphysics that the source has been refactored, is the wiki still valid or do we need to redo it from scratch?

    API exposed to lua is mostly the same, with additional functions

    Likes: MoKaLux

    +1 -1 (+1 / -0 )Share on Facebook
  • hgy29 said:

    oleg said:


    I see on the shadows aliasing-is it possible to blur the edge of the shadow ??

    It should be possible, but I don't understand yet why it looks that way in with the current shader code

    In unity3d the shadow is baked into the texture statically. And only on important objects leave a dynamic shadow.
    my games:
    https://play.google.com/store/apps/developer?id=razorback456
    мій блог по гідерос https://simartinfo.blogspot.com
    Слава Україні!
  • hgy29hgy29 Maintainer
    A bit of progress:
    Lua Shaders are really fantastic!
    +1 -1 (+3 / -0 )Share on Facebook
  • talistalis Guru
    edited November 2020
    It is going perfect, 3d capability of Gideros is really increasing and making me happy.

    #humor
    By the way @hgy29, you just helped flat-earthers about proving the earth is flat in your video game :#
    #/humor

    Likes: MoKaLux

    +1 -1 (+1 / -0 )Share on Facebook
  • hgy29hgy29 Maintainer
    talis said:


    #humor
    By the way @hgy29, you just helped flat-earthers about proving the earth is flat in your video game :#
    #/humor

    Yeah, I first wanted to make it spherical, but it was way too difficult to handle physics! I shall add a big turtle and and four elephants under my world maybe :)

    Likes: keszegh, MoKaLux

    +1 -1 (+2 / -0 )Share on Facebook
  • hgy29hgy29 Maintainer
    Today's progress:
    +1 -1 (+2 / -0 )Share on Facebook
  • hgy29hgy29 Maintainer
    keszegh said:

    what's next? the luggage?

    Naaaa, too many legs to animate :)

    Likes: keszegh, MoKaLux

    +1 -1 (+2 / -0 )Share on Facebook
  • MoKaLuxMoKaLux Member
    edited December 2020
    I don't want to create another topic so posting here if you don't mind hgy29?

    First of all: I am very happy you have updated r3d to v0.8, hgy29, you are awesome , thank you, thank you, thank you :)

    I am geeking with gideros, r3d and 3d animation, ... I was hoping that debugDraw was implemented in gideros and ... it is B) https://github.com/gideros/gideros/blob/master/plugins/reactphysics3d/source/Common/reactbinder.cpp#L1267
    -- r3d world
    self.world = r3d.World.new(0, -9.8, 0) -- gravity
    -- debug draw
    local debugDraw = r3d.DebugDraw.new(self.world)
     -- not working but that's ok :-)
    --debugDraw:setFlags(r3d.DebugDraw.COLLISION_SHAPE + CONTACT_POINT + CONTACT_NORMAL)
    --	debugDraw:setIsDebugItemDisplayed(r3d.DebugDraw.COLLISION_SHAPE, true)
    --	debugDraw:setIsDebugItemDisplayed(r3d.DebugDraw.CONTACT_POINT, false)
    --	debugDraw:setIsDebugItemDisplayed(r3d.DebugDraw.CONTACT_NORMAL, false)


    Will post a sample project here soon God's willing.
    Also will hopefully do a YT video on how easy it is to import your model from mixamo to gideros :)

    Gideros rocks!
    r3ddebug.png
    802 x 532 - 533K

    Likes: hgy29

    my growING GIDEROS github repositories: https://github.com/mokalux?tab=repositories
    +1 -1 (+1 / -0 )Share on Facebook
  • MoKaLuxMoKaLux Member
    edited December 2020
    an example on GH: https://github.com/mokalux/gideros-3D-FP
    I don't really get how to setup lighting correctly to have the shadow shown on all the map :'(
    I will try to add more stuff to the scene it's pretty nude right now, plus add more anims for the player :) It is the first demo. Couldn't post here because models are quite heavy.

    Please tell me how the controls feel + the camera follow. I am doing the right calculations :) ?

    Likes: hgy29

    my growING GIDEROS github repositories: https://github.com/mokalux?tab=repositories
    +1 -1 (+1 / -0 )Share on Facebook
  • hgy29hgy29 Maintainer
    @MoKaLux, great demo!

    About lighting:
    - Lighting.setLight(x,y,z,a) sets the position of the light source (spotlight) and the amount of ambient light
    - Lighting.setLightTarget(x,y,z,d,f) sets the target of the light source. x,y,z is the position where the light is pointing at, d determines the projection distance when computing shadows: d gives the far plane, and the near plane is computed as d/16 internally. This means that only objects between d and d/16 in the light cone will cast shadows. Select d wisely as it has an impact on shadow precision. Finally f is the FoV angle (actually the half angle), it determines the opening of your spotlight cone, and has a consequence on the shadow precision too. The lib use a 1024x1024 shadow map.

    I suggest that you remove the setLight call from levelX.lua, and change the lighjting code in Player1.lua to:
    	-- lighting
    	local px,py,pz=self.body:getTransform():transformPoint(0,0,0)
    	Lighting.setLight(px-2,py+12,pz+8, 0.4) --LIGHT POSITION (X,Y,Z) and AMBIENT (0.5)
    	Lighting.setLightTarget(px, py, pz, 20, 45) --LIGHT POINTING AT (X,Y,Z), RANGE (50) and FoV(45)
    This will make the light (and the shadow plane) follow the player.

    Likes: MoKaLux

    +1 -1 (+1 / -0 )Share on Facebook
Sign In or Register to comment.