[Mod] Gears and axles [gear3d] [0.2] [WIP]

Chem871
Member
 
Posts: 907
Joined: Sat Aug 19, 2017 21:49
Location: SCP-2935
GitHub: Chemguy99
In-game: Nyx Serris
 

User avatar
stu
Member
 
Posts: 922
Joined: Sat Feb 02, 2013 02:51
Location: United Kingdom
GitHub: stujones11

Re: [Mod] Gears and axles [gear3d] [0.2] [WIP]

by stu » Sat Mar 02, 2019 22:19

sorcerykid wrote:Wait, what about steampunk? I mean heck, the mod is even called "gears and axles" :P
There are already so many automation mods catering to the cyberpunk aesthetic. Steampunk would be an excellent alternative for games that are set within a pre-industrial civilization (such as the Victorian or late Medieval ages) but could benefit from machinery. Just an idea!

Indeed, my love of steampunk was my main inspiration for this. That is exactly what I meant by also exploring the early industrial revolution.

v-rob wrote:This mod is turning out wonderfully, but, although it bypasses server-side lag with entities, it induces client-side lag due to the sheer number of polygons there are, even though they are invisible. Placing down just a few belts and gears causes noticeable framerate drop, and placing a lot causes framerates >=10 for me.


You are quite right to point out that these models are relatively large in terms of polys, however, they are nothing really that far out of the ordinary for other non-voxely games. I don’t really see any impact on framerate with my pc, even with my demo setup, your gpu should be sensible enough to not render the transparent faces. I do see a slight drop on my phone but certainly no more so than a dense forest or jungle.

You could try enabling wireframe mode, it should look something like this:

Image

ShadMOrdre wrote:One thing I've noticed is that the chain and the 90degree gears animations are a little out of synch. If you make a square chain, with 4 sprockets at the corners, you should see what I mean.

As for the backend mechanics, I think a simple pass through logic would work. What I mean here is, instead of trying to implement the depth of elepower or tubelib, simply provide an on/off kind of logic. I component A is connected to component B, and B is on, then A is on. A right click on a break switch to either allow the sail to turn in the wind or to stop it, and everything connected in between then is either on or off.


Yeah, I realize the chains are rather awkward to line up correctly with the basic screwdriver but I also found that a reversed chain is also needed in some cases. I have just pushed a fix though because of the naming convention it will break existing builds, my own included :(

It could also be due to the fact that all repeating animations can get out of sync in MT at what appears to be mapblock and/or chunk boundaries. I seem to recall some issue for this but can’t seem to locate it, I can maybe have a shot at fixing it unless there is some reason why this may be non-trivial.

Your idea for the backend sounds like exactly the sort of thing I’m after, although I would also like to include the possibility of reversal for some items, you’ve definitely given me some ideas there, thanks!

ShadMOrdre wrote:PS. When do we get to see the plane available?


That is even more WIP than this but I promise I will publish what I’ve got once MT 5.0.0 is finally released, just to celebrate =)
 

ShadMOrdre
Member
 
Posts: 284
Joined: Mon Dec 29, 2014 08:07
Location: USA
GitHub: ShadMOrdre
In-game: shadmordre

Re: [Mod] Gears and axles [gear3d] [0.2] [WIP]

by ShadMOrdre » Sat Mar 02, 2019 23:50

stu,

So I wrote this, based on your release from yesterday.

+ Spoiler


All this currently does, is allow a LMB punch to trigger forward motion, a RMB use to trigger reverse animation, and to stop either motion. Ideally, a sneak RMB to change direction state, and RMB to initiate action. I'm a little distracted today, but I'd like to help. On/off, but this should be with a "brake" node (the switch) somewhere, for realism.

I'm not yet sure how best to implement the power part, transferring power between nodes. Fluid_lib gives me ideas to get started, but this might be for someone else with better skills.
MY MODS: lib_ecology lib_materials lib_clouds lib_node_shapes ---- Inspired By: Open Source Virtual World Simulator Opensimulator.
 

User avatar
v-rob
Member
 
Posts: 631
Joined: Thu Mar 24, 2016 03:19
Location: Right behind you.
GitHub: v-rob

Re: [Mod] Gears and axles [gear3d] [0.2] [WIP]

by v-rob » Sun Mar 03, 2019 00:50

stu wrote:You are quite right to point out that these models are relatively large in terms of polys, however, they are nothing really that far out of the ordinary for other non-voxely games. I don’t really see any impact on framerate with my pc, even with my demo setup, your gpu should be sensible enough to not render the transparent faces. I do see a slight drop on my phone but certainly no more so than a dense forest or jungle.


Well, I just realized that my laptop gives me an average of 40 fps during normal play :-o. I hadn't actually noticed that before, and it's not particularly old. Anyway, for me, if I place a 4x4 grid of millstone rollers, I will achieve a wonderful 20 fps. It drops to 10 if I stand in the middle of them. Maybe my GPU is stupid after all :-(

Image
Attachments
screenshot_20190302_163813.png
(917.95 KiB) Not downloaded yet
 

User avatar
GreenDimond
Member
 
Posts: 1247
Joined: Wed Oct 28, 2015 01:26
Location: *teleports behind you*
GitHub: GreenXenith
IRC: GreenDimond
In-game: GreenDimond

Re: [Mod] Gears and axles [gear3d] [0.2] [WIP]

by GreenDimond » Sun Mar 03, 2019 03:03

v-rob wrote:
stu wrote:You are quite right to point out that these models are relatively large in terms of polys, however, they are nothing really that far out of the ordinary for other non-voxely games. I don’t really see any impact on framerate with my pc, even with my demo setup, your gpu should be sensible enough to not render the transparent faces. I do see a slight drop on my phone but certainly no more so than a dense forest or jungle.


Well, I just realized that my laptop gives me an average of 40 fps during normal play :-o. I hadn't actually noticed that before, and it's not particularly old. Anyway, for me, if I place a 4x4 grid of millstone rollers, I will achieve a wonderful 20 fps. It drops to 10 if I stand in the middle of them. Maybe my GPU is stupid after all :-(

Image

Mine must be too. With a 7x7 array of mill stones I get 15FPS while standing in the middle, whilst I get ~300FPS elsewhere. I have a GeForce GT 710.
Y▹uTube | Mods | Patreon | Minetest Discord | GreenDimond#3232
 

User avatar
DS-minetest
Member
 
Posts: 1089
Joined: Thu Jun 19, 2014 19:49
Location: I'm scared that if this is too exact, I will be unable to use my keyboard.
GitHub: DS-Minetest
In-game: DS

Re: [Mod] Gears and axles [gear3d] [0.2] [WIP]

by DS-minetest » Sun Mar 03, 2019 15:23

GreenDimond wrote:whilst I get ~300FPS elsewhere

What is your fps_max setting set to?!

stu wrote:your gpu should be sensible enough to not render the transparent faces

As far as I know, invisible faces are rendered, too:
here numberZero wrote:transparent polygons seem to affect FPS just like opaque ones.


Probably it would help if the animation was less smooth.
Currently there are 24 steps per full turn and 1/12 second per step. This means for a gear with the radius of a half node (and ergo the diameter of a whole node) that the most outer part of the gear jumps pi/24 = 0.13 nodelengths twelve times in a second. Imo 3 times in a second would perhaps even be enough, it doesn't have to be so smooth.
Do not call me -minetest.
Call me DS or DS-minetest.
I am German, so you don't have to pm me English if you are also German.
The background is a lie.
 

User avatar
stu
Member
 
Posts: 922
Joined: Sat Feb 02, 2013 02:51
Location: United Kingdom
GitHub: stujones11

Re: [Mod] Gears and axles [gear3d] [0.2] [WIP]

by stu » Sun Mar 03, 2019 20:42

ShadMOrdre wrote:stu,
So I wrote this, based on your release from yesterday.

All this currently does, is allow a LMB punch to trigger forward motion, a RMB use to trigger reverse animation, and to stop either motion. Ideally, a sneak RMB to change direction state, and RMB to initiate action. I'm a little distracted today, but I'd like to help. On/off, but this should be with a "brake" node (the switch) somewhere, for realism.

I'm not yet sure how best to implement the power part, transferring power between nodes. Fluid_lib gives me ideas to get started, but this might be for someone else with better skills.


Thanks, that looks like a good starting point, I will try to include some basic functionality like this as soon as get I some of my older mods updated for the MT 5.0.0 release.

GreenDimond wrote:
v-rob wrote:
stu wrote:You are quite right to point out that these models are relatively large in terms of polys, however, they are nothing really that far out of the ordinary for other non-voxely games. I don’t really see any impact on framerate with my pc, even with my demo setup, your gpu should be sensible enough to not render the transparent faces. I do see a slight drop on my phone but certainly no more so than a dense forest or jungle.


Well, I just realized that my laptop gives me an average of 40 fps during normal play :-o. I hadn't actually noticed that before, and it's not particularly old. Anyway, for me, if I place a 4x4 grid of millstone rollers, I will achieve a wonderful 20 fps. It drops to 10 if I stand in the middle of them. Maybe my GPU is stupid after all :-(


Mine must be too. With a 7x7 array of mill stones I get 15FPS while standing in the middle, whilst I get ~300FPS elsewhere. I have a GeForce GT 710.


I fully accept that setups like that are going to affect framerates on lower end devices, however, I do not think this is a very fair test. There are plenty of other mods/objects that can bust your fps if you go OTT with them :P Eventually, you won’t be able to place these in such close proximity, nor will you be able to clip through them as you can now.

DS-minetest wrote:
here numberZero wrote:transparent polygons seem to affect FPS just like opaque ones.


I would not doubt numberZero (or yourself) I was mostly just going off what I see in wireframe mode. My fps is locked to vsync so it’s hard to say exactly, my pc is really nothing that special nowadays, It was a half decent gaming pc once but is now over 7 years old!

DS-minetest wrote:Probably it would help if the animation was less smooth.


This is certainly an option if framerate does prove to be a genuine problem. I think I could at least half the poly-count of most objects without losing too much realism. The file sizes can be reduced significantly by using a binary format like b3d, I will do this once I clean up and release the master .blend files for them.
 

Previous

Return to WIP Mods



Who is online

Users browsing this forum: No registered users and 4 guests