mohsen zare

mohsen zare

Hello dear game developer OR, people who love games, OR people who just wonder in my channel for fun
My name is Mohsen Zare
I love game, math and programming
And I just decided to create videos about those things that I love
English language is not my mother language so I am sorry if sometimes I make errors
I work with Godot as the game Engine, And I hope this open source game engine will grow day by day

Пікірлер

  • @_cul8r_
    @_cul8r_2 сағат бұрын

    Which version of world machine are you using? Are these options all available in the free version or do you need to get the indie version/pro version? EDIT: I rewatched it and did hear you say free version, however I’m confused because the licenses for WM say that the pro version is needed for exporting tiles terrains. Any advice on this would be great! Thanks

  • @mohsenzare2511
    @mohsenzare2511Сағат бұрын

    I believe for free version there is a limitation for maximum terrain resolution! If I am not wrong it is around 1024! but you can check on their website to make sure!

  • @gashtepolice5798
    @gashtepolice579813 сағат бұрын

    very good. functional explanation.

  • @JeffThePoustman
    @JeffThePoustman2 күн бұрын

    Really turning into a very strong tool. Impressed by each new step. Good job!

  • @JeffThePoustman
    @JeffThePoustman2 күн бұрын

    Making great progress.

  • @JeffThePoustman
    @JeffThePoustman2 күн бұрын

    Fantastic as usual. Thanks, Mohsen!

  • @JeffThePoustman
    @JeffThePoustman3 күн бұрын

    Really enjoying seeing the plugin develop! (It's long after the fact now, but the process is educational.)

  • @JeffThePoustman
    @JeffThePoustman4 күн бұрын

    Really enjoying this. Thank you for sharing not only M-Terrain itself, but your description of how you developed it, how to use it, etc.

  • @mohsenzare2511
    @mohsenzare25114 күн бұрын

    Glad it was helpful!

  • @JeffThePoustman
    @JeffThePoustman4 күн бұрын

    Fantastic video, on many levels. 2:11 "So now I solve one problem and then I create another." Human existence in a succinct statement! And one of the most enjoyable and maddening things about coding.

  • @mohsenzare2511
    @mohsenzare25114 күн бұрын

    Thanks Jeff

  • @paulmaguire872
    @paulmaguire8725 күн бұрын

    It's working for me.. THANK YOU. I am having trouble getting my exported color map to show on the terrain, but I'm assuming I've done something wrong and will keep at it. Cheers again sir.

  • @cjdaylight3407
    @cjdaylight34077 күн бұрын

    Can I use this map on my game ?

  • @mohsenzare2511
    @mohsenzare25117 күн бұрын

    No problem with that, if this is good for you!

  • @rumariomusic
    @rumariomusic9 күн бұрын

    Technically Godot 4 is outdated. No HLOD, no ECS

  • @Chevifier
    @Chevifier13 күн бұрын

    What would be cool is if Godot added some highlevel class that makes using the Render/PhysicsServer easier for normal users. But then again how much data id the RID system using on its own?🤔

  • @Chevifier
    @Chevifier13 күн бұрын

    Currently in the game im working on, im combining multiple different meshes into 1 mesh using a modified mesh merger plugin. It's okay for a few 1000 meshes but it's cluttered and I'm feeling like I want to change it again

  • @mohsenzare2511
    @mohsenzare251112 күн бұрын

    @@Chevifier Unfortunately also with rendering server we don't have a good news! As a testing just create 1 million instance in rendering server! it will take quite a lot RAM! OctMesh will create rendering server instance when the object is in visible range! Now my next step is to create something like this which also remove the node! then we are good to go!

  • @Chevifier
    @Chevifier12 күн бұрын

    @mohsenzare2511 plane C++ it is then. Vec3 struct and int id.😅 but Im not sure its possible to create our own renderer yet without recompiling the engine.

  • @abhiraaid
    @abhiraaid15 күн бұрын

    Are you still on Pop!_Os?

  • @mohsenzare2511
    @mohsenzare251113 күн бұрын

    Not anymore, Now I use Manjaro

  • @amirosman8797
    @amirosman879716 күн бұрын

    This is absolutely amazing! What a fantastic solution for handling large scenes. I do have a couple of questions and would greatly appreciate your clarification. Firstly, can this solution be applied to all types of models and assets in the game, such as foliage, trees, buildings, NPCs, and enemies? Secondly, can it function similarly to asset-streaming, where assets are loaded on-demand based on the player's position? For instance, when the game starts, not all assets are loaded at once; instead, only those within a specific radius around the player are loaded. Asset-streaming is crucial for managing large scenes efficiently, as it reduces initial loading times and optimizes VRAM usage. Thank you in advance for your time and insights!

  • @mohsenzare2511
    @mohsenzare251116 күн бұрын

    Hi There! the answer to your question is yes! so let me clarify how all these things you are saying will work! By now I only implemented a OctMesh node which is similar to meshinstance3D which works on top of Octree! But you can create any other system you want on top of Octree! As an example you want to create something that load a bunch of stuff as camera get close to that! First you register yourself as a subsystem of octree! you send all of your loader position into octree! and then octree will send you a notification when the camera get close to one of your loader! For example you can say if my loader lod is less than 3 then load all stuff and if it is greater than 4 unload them! Now this take away the need of constantly checking if camera get close to one of your points! Also Octree will do this stuff really fast! ... By the way about octmesh you can use that for anything you want like enemy-mesh and so ... For vegetation maybe octmesh is not good enough! Maybe we can create another system on top of octree which create multi-mesh! But take in account if you are using MTerrain consider using Grass system for anything is possible! Grass in MTerrain has really small data! you an cover an entire terrain with few MB of memory! the only downside of Grass is that you can not set the exact position and rotation of each Mesh!

  • @amirosman8797
    @amirosman879716 күн бұрын

    @@mohsenzare2511 so, for my first question, yes I can use any mesh or asset that want except for the foliage it’s better to use MTerrain’s grass system, this is totally clear, however if I used the grass system I won’t be able to set the rotation and exact position, but can’t I paint the grass and foliage manually? In large open spaces or forests I could add foliage and grass procedurally but in places where I need to place foliage in specific position can’t I paint foliage manually?

  • @mohsenzare2511
    @mohsenzare251116 күн бұрын

    @@amirosman8797 Yes You can paint them. There is a grass paint tool! just select the grass and activate paint mode! and paint grass on Terrain where you want!

  • @amirosman8797
    @amirosman879715 күн бұрын

    @@mohsenzare2511 Fantastic, thank you very much for your support and I would really love to see what else you have in store for us

  • @lehisluguer9300
    @lehisluguer930019 күн бұрын

    memory allocation... With great power comes great responsibility.

  • @ashwanishahrawat4607
    @ashwanishahrawat460720 күн бұрын

    Very Informative, Thanks for the in-depth explanation, Origin and historical dependency. I really love the knowledge density of your videos.

  • @mohsenzare2511
    @mohsenzare251119 күн бұрын

    Glad you like it

  • @timmygilbert4102
    @timmygilbert410220 күн бұрын

    Octree are always slower than grid, you can traverse visible grid very efficiently because you only query interval 'scanline' by 'radterizing' the frustrul in the 2d projection of the map. Ie direct query no rejection. If you need 3d query it's as simple as adding a vertical interval clamp after the 2d pass per columns.

  • @mohsenzare2511
    @mohsenzare251120 күн бұрын

    Maybe I not understand exactly what you said, but correct me if I am wrong, you mean instead of octree using a grid and see each points belong to which cell? If I am correct, octree itself is also some kind of grid but it is just non uniform! it means less octant for places with no points and more octants for where there are more points! this better specially if we have more points in some part of the space and many empty places at other!

  • @timmygilbert4102
    @timmygilbert410220 күн бұрын

    @@mohsenzare2511 it's all the same, BUT octree is great for really sparse distribution, IE vast empty space with very few random elements. But that's not your case, you have a really dense distribution, grid would be faster, and if you need it hierarchical grid would be the next option. Octree is also implicit to grid, except you aren't limited by boundaries. Think of it like query ranges you can hash by power of two the position+offset to get a virtual floating octree relative to the offset. There is a guy making name Geno's on gbadev, who used octree for 3d rendering on GBA, we told him the same, he took him a long time to shift, but it was faster. Godot itself used an octree until someone refactored it into a hierarchical grid and gained significant speed up. Grid have a nice lay out, coherent in memory. Octree have level of indirection and jump around the memory.

  • @mr_sauce_cooks
    @mr_sauce_cooks21 күн бұрын

    will this be integrated into your terrain plugin (btw i love it, from all the terrain plugins there yours gives the most fps)

  • @mohsenzare2511
    @mohsenzare251120 күн бұрын

    Yeah it will be on top of MTerrain

  • @giampaoloschembri452
    @giampaoloschembri45221 күн бұрын

    Any suggestion for how increase perfomance when you have a lot of collision shape(enemy) that move to the player? I rised performace using sphere instead of capsule for collider but it is very limited

  • @mohsenzare2511
    @mohsenzare251120 күн бұрын

    What you said depend on Godot physics itself! But yeah using more simple shape will help to gain performance!

  • @jopemeofficial
    @jopemeofficial21 күн бұрын

    Amazing tutorial! Definitely worth my subscription. Keep it up! ;)

  • @mohsenzare2511
    @mohsenzare251121 күн бұрын

    Thanks for your support, I will

  • @diligencehumility6971
    @diligencehumility697121 күн бұрын

    There is no where one million meshes in the scene, there is about 1.000 Godot would break into multiple pieces if you have 1.000.000 meshes showing at the same time. It's not even close. Click bait title

  • @mohsenzare2511
    @mohsenzare251121 күн бұрын

    As explained in video only meshes in radius of 200 meter are visible in both method!

  • @spleenvitals
    @spleenvitals21 күн бұрын

    Clickbait? What does the title say in your language? Also, a scene with 1000 meshes is large, I think.

  • @BonnieMallet
    @BonnieMallet21 күн бұрын

    Love your work. Please keep sharing, teaching and explaining! Thanks you.

  • @mohsenzare2511
    @mohsenzare251121 күн бұрын

    Thanks!! :)

  • @lehisluguer9300
    @lehisluguer930022 күн бұрын

    man.. you're a legend.. excellent tutorials.

  • @mohsenzare2511
    @mohsenzare251121 күн бұрын

    Glad you like them!

  • @lehisluguer9300
    @lehisluguer930022 күн бұрын

    thanks a lot for these tutorials, you're the best :D

  • @collin4555
    @collin455522 күн бұрын

    This is wild, thanks for sharing

  • @mohsenzare2511
    @mohsenzare251121 күн бұрын

    Thanks for watching!

  • @dbatdev
    @dbatdev22 күн бұрын

    My idea has been to use a Multimesh and have some way (waves hands) to find the instance-indexes in an area around the player. Then you set the scale on those instances to zero and replace them with MeshInstances + Colliders. That way you walk-through a field of multis but the things around you are more 'real'. I also want to place smaller Multimeshes so that they can LOD by themselves as a group and not look too bad; also so they don't take to much time drawing off-screen. I do wish Godot had more functions built-in, like the quad-tree and so on. Their BVH system is very slow in the editor, so tools suffer. Another idea I have is to draw, say, a forest with MeshInstances (in the editor) and then have a tool that finds all common meshes across that forest and gathers those into (chunked) Multimeshes. So all the leaves becomes one multimesh, the trunks, etc. Last idea, sorry: I wish Godot would implement a way to 'enter into' a Multimesh and let me edit (move, scale, rotate, delete, add) instances just like one can with normal meshes. A partial solution for this is a node I made in the Library. Vid here: kzread.info/dash/bejne/nHmqt6-jctq3gbA.html Anyway, thanks for the work you are doing!

  • @mohsenzare2511
    @mohsenzare251121 күн бұрын

    The things you explained to me are good! but don't think that multi-mesh is going to solve anything for your! MeshInstance and Multimesh both they have their use cases!

  • @igorgiuseppe1862
    @igorgiuseppe186222 күн бұрын

    hardware specs?

  • @alexkt3400
    @alexkt340022 күн бұрын

    Bro this is awesome thanks for doing this!

  • @mohsenzare2511
    @mohsenzare251121 күн бұрын

    Thank you!

  • @NeZversSounds
    @NeZversSounds22 күн бұрын

    Each your video is mind-blowing!

  • @mohsenzare2511
    @mohsenzare251121 күн бұрын

    Thanks you always! :)

  • @maximloboda2125
    @maximloboda212522 күн бұрын

    Awesome video. Thanks for sharing!

  • @mohsenzare2511
    @mohsenzare251121 күн бұрын

    Thanks for watching!

  • @FinaISpartan
    @FinaISpartan22 күн бұрын

    A spatially partitioned multimesh still has better performance. Divide your scene into a grid, where each cell is a list which contains the positions of each mesh in that cell. Every frame, concatenate the current grid cell, and the 8 cells around you into a list, and send the list into the multimesh. Esentially, this is faster by precomputing the object distance check

  • @mohsenzare2511
    @mohsenzare251122 күн бұрын

    In this case as we have a bunch of monkey head with same mesh yeah it will work better! but in real game we can not create for every single mesh a multi-mesh! sometimes you need one mesh somewhere in your big map and another mesh beside that! you won't create for every single of them a multimesh! And in that case this MOctMesh has better performance! By the way my main goal here to create other things on top of this octree! not just MoctMesh!

  • @FinaISpartan
    @FinaISpartan22 күн бұрын

    Yes, that's a good point!

  • @sanyi9667
    @sanyi966722 күн бұрын

    awesome work! I have a question - why use this and not a multimesh? or some variations of multimesh. multimesh as I know acts as a single node/object

  • @mohsenzare2511
    @mohsenzare251122 күн бұрын

    Multimesh has some limitation! If you create bunch of meshes with multimesh, Even if you look at one mesh all multimesh should be rendered! But if you create that with MeshInstance if that mesh instance go behind the camera or get further away it will not be rendered! basically MeshInstance render only when camera look at it! Also with meshinstance we can control much better the LOD level! Both MeshInstance and Multimesh has different use cases!

  • @sanyi9667
    @sanyi966722 күн бұрын

    @@mohsenzare2511 can't you control where the multimesh population is based on the camera movement at runtime?

  • @mohsenzare2511
    @mohsenzare251122 күн бұрын

    Practically no! then you should destroy the entire Multimesh and resend all meshes transform data to GPU again and again! Multimesh usually used when you have one mesh which should be rendered a lot of time! like grass mesh! but for things like enemy mesh, car mesh, statue, doors, walls and ... which they have a lot of vertices in one mesh you better use MeshInstance3D with different LOD level!

  • @sanyi9667
    @sanyi966722 күн бұрын

    @@mohsenzare2511 great explanations! thanks a lot. will a game ever need 1 million enemies, cars, etc?

  • @mohsenzare2511
    @mohsenzare251122 күн бұрын

    That's depend on your game! If you don't make an open world game no! But if you make an open world game! if you want to populate that you will need a good system which handle a lot of meshes!

  • @ianclayton
    @ianclayton26 күн бұрын

    I have this working now and it is very impressive so far. I needed to remember to call create_grid() in the scene ready and with the current version, after a run, I need to click create for the terrain in the inspector to recreate the terrain in the editor as it does not show after a run. This is an alpha release so behaviour like this is to be expected. This has tremendous potential. I'm currently implementing DevMar's approach and am generating textures using satmaps in gaea. If I can implement a nine square loader and handle movement between scene tiles (so multiple MTerrain based tiles) as well as moving from satmap textures to splatmaps and small texture tiles, then this will allow me to have earth scale terrain (my very specific aim for my game) with high resolution textures close to the player at minimum resource cost. I'm very keen to see how this progresses and will probably implement this on a branch in my main game code base. Excellent work sir and the tutorial videos and wiki have been extremely helpful. As you say, some effort is required to understand the concepts of your specific implementation, but I'm getting there. Complex systems require effort to be clearly understood, but I think with this, the effort is well worth the reward.

  • @ianclayton
    @ianclayton29 күн бұрын

    Brilliant, just got this working by selecting Forward+ rendering mode. It crashed for me on Compatibility mode which I had had set for previous projects. This has great potential.

  • @kypelitzerrian
    @kypelitzerrianАй бұрын

    This is an extremely exquisite structure, thank you for bringing it

  • @nenad16x16
    @nenad16x16Ай бұрын

    Great series, thanks for making it. It's full of useful information that's otherwise hard to find. One thing is troubling me though and as a SCons noob cannot seem to solve it. When building, the default place for compiled object files is right next to their source files. This makes a bit of a mess and interferes with version control. Is there a way to tell SCons to put object file into a separate directory?

  • @boduzapho
    @boduzaphoАй бұрын

    Subbed

  • @bobojenkins5805
    @bobojenkins5805Ай бұрын

    bro just make it so I can bring up mountains and lower valleys with the mouse cursor like in sim city otherwise if I have to go through a 45 min video I might as well just do it myself instead of getting an addon. Dont mean to sound harsh but thats honest user feedback.

  • @ATTAR_1453
    @ATTAR_1453Ай бұрын

    i dont like that it so involved with scons and what not, i wish the process to write gdextension was much simpler

  • @mohsenzare2511
    @mohsenzare2511Ай бұрын

    In c++ usually you need to put some time to learn its compile system! But it worse it!

  • @vranigavrani
    @vranigavraniАй бұрын

    Is it possible to do bake lightmap on terrain that is generated by this plugin?

  • @mohsenzare2511
    @mohsenzare2511Ай бұрын

    I never tested! but even if is it possible it is not a good idea! baking light-map is not for big things like terrain! for this kind of things usually the best solution is global illumination!

  • @SaiponathGames
    @SaiponathGamesАй бұрын

    Heyy, i was wondering whether this is heightmap or voxel based terrain?

  • @mohsenzare2511
    @mohsenzare2511Ай бұрын

    This is heightmap base

  • @xirtus
    @xirtusАй бұрын

    really love your work, very informative and very inspiring

  • @mohsenzare2511
    @mohsenzare2511Ай бұрын

    Thanks glad you like it

  • @MarkWallbridge
    @MarkWallbridgeАй бұрын

    Fantastic! Many thanks 👍👍

  • @johneltins9822
    @johneltins9822Ай бұрын

    duuuude this helped me so much, i am doing a build of ffmpeg for godot, wish me luck :v

  • @2danandrews
    @2danandrewsАй бұрын

    I'm trying to learn from watching KZread vids. What should I watch to be able to learn how to understand what is on the screen? I guess I mean I need to learn to code... Should I get a book off Amazon? Thank you

  • @mohsenzare2511
    @mohsenzare2511Ай бұрын

    If you are at beginner level, you mainly need to learn the game engine logic, and gdscript! there are a bunch of tutorial online, also Godot has a very good documentation, So I don't think you will need to buy a book! by the way in my channel I usually make more advance tutorial, so I suggest to watch other video from other channels!

  • @mattclark2848
    @mattclark2848Ай бұрын

    This video series is really detailed and inspiring! The chapters are really well orgnanized too! Thank you so much for creating them!

  • @xirtus
    @xirtusАй бұрын

    very cool, now make this procedural endless world

  • @fuckngcnt
    @fuckngcntАй бұрын

    thank you so much, your gdextension videos have been really useful to me. i have a question though, is it possible to add categories like you can in gdscript using "@export_category"?

  • @mohsenzare2511
    @mohsenzare2511Ай бұрын

    Yes you can have it, in Property-info function there is a property usage which is PROPERTY_USAGE_CATEGORY and you can create a category with that! just create a dummy property and set its usage to above! by the way for adding group and subgroup we have two macro: ADD_GROUP, ADD_SUBGROUP, I can not find any macro for category so you can make them this way!

  • @fuckngcnt
    @fuckngcntАй бұрын

    @@mohsenzare2511 it worked! thank you dude, time to get my hands dirty with gdextension

  • @oiltanker7332
    @oiltanker7332Ай бұрын

    I arrived to this myself, using a little less efficient method, but I can see you have same problem, as in in exact places where there is transition between x-y-z planes there is an artifact line.

  • @oiltanker7332
    @oiltanker7332Ай бұрын

    I actually like more how my method looks: float yDot = abs(lNorm.y); float zDot = abs(lNorm.z); vec2 uvCords = lVert.yz; float sDot = abs(lNorm.x); if (yDot - sDot > 0.001) { uvCords = lVert.xz; sDot = yDot; } if (zDot - sDot > 0.001) { uvCords = lVert.xy; sDot = zDot; }

  • @kendallgraves4950
    @kendallgraves4950Ай бұрын

    "promosm" 🌸