[Road Paver] Road paving tunnel bore machine

tbillion
Member
 
Posts: 189
Joined: Wed Apr 03, 2013 16:07

Re: [Road Paver] Road paving tunnel bore machine

by tbillion » Thu Dec 24, 2015 18:26

fixed the shared inventory thing, lame that detached inventories dont persist across server restarts, however now each dump truck creates itself a unique id and then creates an inventory under the current_player

the ids are a random number between 100000 and 999999 so the chance for overlap and overwrite i would think is very small. even though math.random is only psuedorandom

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all

   local obj = minetest.add_entity(pointed_thing.under, "mck:dumptruck")
   if obj then
       local obj = obj:get_luaentity()
       local invid = math.random(100000,999999)
       local prop = {invid = invid}
       obj.invid = invid
            local inv = placer:get_inventory()
       inv:set_size(invid, 20*13)
   end




i still have to figure out code for the pager and how to destroy inventories when the dumptruck is destroyed and how to stop the entity from being destroyed if there is items in the inventory, but again entities dont have the same call backs as nodes so who knows how i will work this out.
 

tbillion
Member
 
Posts: 189
Joined: Wed Apr 03, 2013 16:07

Re: [Road Paver] Road paving tunnel bore machine

by tbillion » Sat Dec 26, 2015 06:35

Merry Christmas every one. Due to personal items related to my life i dont get to participate int he holidays so i been here today messing with this.i set out to make the prototype for the bridge machine however what i ended up with is a spacecraft. or a starship. im going to leave it in the MCK for now but maybe later i will move it. now that i have this model i also have the idea for what the bridge layer will be.

Image
Image
Image
Image
Image

i finally watched Nathans video on AO, and well it kinda makes things a pain in the ass, but over all i think the results are good/ok it definitely takes some getting used to and a hybrid of my new workflow and the old one. but all in all i will try to work with it more in the future.
 

tbillion
Member
 
Posts: 189
Joined: Wed Apr 03, 2013 16:07

Re: [Road Paver] Road paving tunnel bore machine

by tbillion » Sat Dec 26, 2015 11:57

here is the preliminary render for the bridge builder, i was going to make it like a quad copter but then i cam e across the Avengers Heli-Carrier and got some inspiration. here is the prelim render in the next few hours it should be done.

Image
suggestions welcome...

Edit 7:30am
That AO is handy if you want to just quick and dirty want to see it in the game. i was having a heart attack for a while becasue i had some inverted normals and when they end up in Minetest they make the faces invisible so you can see through the model. other then putting in some more little details this is about what it will look like in the game .

Image
Image
Image
Image
Image
Image
Image

Edit 9:09 am
well now its colored.
heres the final deal i suppose, at least i am done messing with it until the code works. need to figure out how to get more power out of my graphics card for blender or something so i can take the UV map up to 8000+ px which would gice way less grainy AO, other than that i like it, it is my open interpretation of two different helicarriers...

Image
Image
Image
Image
Image
Image
 

User avatar
Nathan.S
Member
 
Posts: 679
Joined: Wed Sep 24, 2014 17:47
GitHub: NathanSalapat
IRC: NathanS21
In-game: NathanS21

Re: [Road Paver] Road paving tunnel bore machine

by Nathan.S » Sun Dec 27, 2015 04:42

About the grainy AO, you could just do a light blur on the AO in your graphics editor, obviously that could create some problems at hard seams, or if two faces, that don't connect on the mesh, are close on the UV map,

OR, you could do something easier, which I was an idiot and didn't show in the video, actually just spent like ten minutes trying to figure this out, and finally found it.
If you go to the world tab in Blender there is an option for Ambient Occlusion, check that box to turn it on, this won't make any difference for your bakes, but if you scroll father down in that panel you'll see an area that is called Gather, which should be able to be modified now that the AO is turned on, and you can turn the samples up. Default it is five, I cranked it up to fifteen and I got a very smooth AO bake on a mesh I tried it on. Of course more samples means more time for Blender to compute it, but it really does make a big difference.
[img]AO-samples.png[/img]
Here you can see what I'm talking about a bit better.
Attachments
AO-samples.png
AO-samples.png (64.92 KiB) Viewed 1457 times
I record Minetest videos, Mod reviews, Modding tutorials, and Lets plays.
Check out my website.
 

tbillion
Member
 
Posts: 189
Joined: Wed Apr 03, 2013 16:07

Re: [Road Paver] Road paving tunnel bore machine

by tbillion » Sun Dec 27, 2015 05:07

Nathan.S wrote:About the grainy AO, you could just do a light blur on the AO in your graphics editor, obviously that could create some problems at hard seams, or if two faces, that don't connect on the mesh, are close on the UV map,

OR, you could do something easier, which I was an idiot and didn't show in the video, actually just spent like ten minutes trying to figure this out, and finally found it.
If you go to the world tab in Blender there is an option for Ambient Occlusion, check that box to turn it on, this won't make any difference for your bakes, but if you scroll father down in that panel you'll see an area that is called Gather, which should be able to be modified now that the AO is turned on, and you can turn the samples up. Default it is five, I cranked it up to fifteen and I got a very smooth AO bake on a mesh I tried it on. Of course more samples means more time for Blender to compute it, but it really does make a big difference.
[img]AO-samples.png[/img]
Here you can see what I'm talking about a bit better.


i found out another thing today actually by accident when i was making the formula 1 car for the game, (becasue what good are roads if you cant race?) if you apply a material to the panels that you want to be that color and then do an AO bake it makes the texture for you correctly, still kind of grainy, ill take a look at what you are talking about here in a minute. but i mean most of my things are simple colored things anyhow so this would work, blender really has a lot of buttons so figuring out how to work it to its full potential is an art to say the least. but here is the pic of the F 1 car comes in 12 colors :) because i learned the material thing today by accident.

Image
Image
Image
Image

today i am working on little things getting all the items together for the craft recipes and finalizing all the models. this mod has turned into more of a monster than i had originally planned for it to be but i aim for completeness. and when it was done you will have modes of transportation as well as a complete set of infrastructure building tools. so im happy about that, it has also taken longer than i planned to get a code release, every time i turn around there is something that i forgot that should be in the game. so setbacks and the learning process are slowing me down a bit.

there are only 2 more models i am going to do as cars for this an that is the '08 challenger and an FSAE car. after that i am going to get back to the core stuff, i think now i only havea few more models i am going to do and that is the Semi truck and trailer, swamp boat, hydroplane, regular dozer, a machine that does all the functions in one as a sort of god machine, an articulated dump truck, front end loader and a track hoe. i wish i could figure out how to animate them.

when this mod is done i am thinking it is going to be bigger than the mine-test game as a whole. the contributing items are over 200 items(including forges/recyclers, crafter, pieces and machines) 2 machines fly, 8 machines drive, and there is 6 constructors. plus when i get there I suppose i will have to make variations of the basic constructors that will be the constructors you can drive but with the progress i am making with entities this is a far off part of the progress, why cant an entity just be a node with special properties? it would be so much simpler.

EDIT 3:28am

all of the formula cars and their code is complete 1 car 12 colors 925 lines of code and that is the simplified version of the code, if i had stayed with paramats' original method of coding each car the code would have been a little over 6000 lines. on that note thanks to paramat for the code from cubic mesecars. here are some shots of all 12 cars, its kind of hard to line them up without a street to reference but this is just in my sandbox so yeah..

Image
Image
SELFIE!!!! ;)
Image

now i need to figure out how to give it fuel and how to decrement the fuel. other things i would like to do is odometers and a hud based speedo/odo/fuel guage. but that will be later :)
 

KarlHegbloom
New member
 
Posts: 2
Joined: Tue Dec 08, 2015 06:41
GitHub: KarlHegbloom
In-game: KarlHegbloom

Re: [Road Paver] Road paving tunnel bore machine

by KarlHegbloom » Wed Jul 27, 2016 20:46

What is the status of this mod? I've wanted to try it ever since you first posted. If you have no time to work on it, can you at least put it up on github? thanks.
 

Previous

Return to WIP Mods

Who is online

Users browsing this forum: No registered users and 7 guests

cron