News:

Welcome to World of Banished!

Main Menu

Work In Progress: DS Storage

Started by Discrepancy, June 13, 2016, 12:37:14 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Discrepancy

I am working on a new Storage mod, I plan to have many different types of storage options all in one mod.

But  I have problems...
I have only just started really getting to know blender and the process of texturing.
This is my first storage model, a Vegetable Field Cellar:

It looks fine in blender, but in game I select to build it and I can see all of model is black, then when I place, workers deliver resources to build it 20-30 squares away.
As soon as the last bit of wood/stone is delivered, banished freezes and I get this:
Assert: !aabb.IsEmpty() Invalid object rectangle, has no size!


As I said I am new to this, this is the furthest I've gone in making a 3d model for the game. I'm not sure I am adding the points correctly either - in Blender do I just Add - Empty - Plain Axes ? and rename it to build_001, build_002, use_001 etc?

RedKetchup

#1
and after, did you grp up (connect) all your empty axe all together under the command of another axe renamed "points" ?
(and that axe dummy named "points" is placed at 0,0,0 ?)

in 3dsmax we use add "dummy" and rename them. i never used blender so i cannot say if "dummy" and "plain axe" are equivalent.
> > > Support Mods Creation developments with Donations by Paypal  < < <
Click here to Donate by PayPal .

tanypredator

@kid1293 have explained me his way to work with points: you put them where you want, then you delete them and save mesh as mesh without points; then you undo that, delete mesh and save points as points. These two models (mesh and points) must be imported with scale 0.01 and exported for game. And to use this points.fbx as a separate file. This way it works.

kid1293

#3
@tanypredator

Sometimes I use different file, sometimes I put points
in main file.

It's all right to put points in the main fbx.
I told you to do export-import and separate file
because you had different scales on your model.
Now you know your way around, so scales are no
problem for you.

@Discrepancy

I see your points are connected to main 'points', fine.

Are all normals correct? It turns up dark in game if they are inverted.

About the crash I don't know.
@RedKetchup - Do you need a floor in the cellar?

I have included a picture -
All points are at z=0, they fall down by themselves

The grey planes to the left is just a copy of what is
in the fishing dock. You can see them sticking out, selected.
They are just empty planes, no texture

If you do need a floor, you have to put something like:

FloorDescription floor
{
PickingMesh _mesh = "Models\rhxfishFloor.rsc";
}

in your template file.
and make a rhxfishFloor.rsc in models
with:

PickingMesh resource
{
String _meshName = "Models\rhxfish.fbx";
String _subObject = "floor";
}


Ask if you want, I am not sure about the floor.

Edit: oops the photo

Discrepancy

thanks to all for your help.

Yes @RedKetchup  I have them all grouped under an axe  of 'points'. it was not placed at 0,0,0 though, now changed, thanks :)

@kid1293 I follow what you have said, I will give it a try and see what I happens.

and yes, silly me, I'm sure it would require a floor.

@tanypredator Thanks, I will try that if this other way fails.

Working with blender is all very new, but I have so many ideas for mods that I must progress and learn.

RedKetchup

#5
there is 2 kind of floor to can set up in your mesh.

1 floor mesh which you can name: floor
and will be used as the "walking" floor for the citizens.

1 floor mesh which you can name : floor1
and this one with the QuarryFloor function will determine the terraforming done to make an hole into the ground (like the quarry, NMT canals, NMT ClayPit, my own root cellar....)
and this floor will have pieces placed under the ground level and will determine which of the tiles below 0 ground level will be terraformed.
Keep in mind, the game is doing slopes and not cut edges of 90 degres.

i can give you my root cellar template and fbx.
> > > Support Mods Creation developments with Donations by Paypal  < < <
Click here to Donate by PayPal .

Discrepancy

Okay, to update on this, I've solved most of the problems.

I am now able to build it in game and it works as intended... sort of (more of that later).

The fault was a combination of things.
My lack of the 'quarry floor' and 'floor' pieces of code in the template.rsc:
QuarryDescription quarry
{
PickingMesh _floorMesh = "Models\Cellars\VegFieldCellarFloor.rsc";
float _maxDepth = -2.0;
float _initialDepth = -2.0;
}

FloorDescription floor
{
PickingMesh _mesh = "Models\Cellars\VegFieldCellarFloor1.rsc";
}


Also the missing floor meshes in the .fbx model and the out of place 'points' holder not at 0,0,0.

The reason for the textures showing up dark was that I hadn't inverted the AO images.

Plus also none of that made it work until I did the thing that tanypredator describes:
Quote from: tanypredator on June 13, 2016, 02:06:18 AM
@kid1293 have explained me his way to work with points: you put them where you want, then you delete them and save mesh as mesh without points; then you undo that, delete mesh and save points as points. These two models (mesh and points) must be imported with scale 0.01 and exported for game. And to use this points.fbx as a separate file. This way it works.

The problem I have though is that my model is too big in game. Not massively, it is almost the size of the normal barn, but I only wanted it to be 3 tiles wide.

Which leads me to a few questions regarding resizing in blender that someone or anyone might know? I seem to have tried everything. Importing and exporting the model at different scales doesn't seem to change the size at all for me, also changing the object scale doesn't either.

I know I can edit the object in 'Edit' mode and change the size that way, so if that is the case I'm fine with that. What I would like to know is to what scale do you build your models in and how that corresponds in the game?
For example in Blender I can choose between the measurement units of 'none', 'metric' and 'imperial', what do you use? and what size is the game tile in relation?

(I know from the road tiles that a tile uses a 64x64pixel square of a 1024x1024 texture file, but I can't seem to see how I can size my models upon that knowledge)

RedKetchup

Kid on blender can surely help you, i dont think i can help further on this by telling what i do with 3ds.
the texture roads cant help you neither because it is just a 2d picture

but i am glad you solves some of your problems :)
i noticed my rootcellar.rsc and .fbx helped you.
> > > Support Mods Creation developments with Donations by Paypal  < < <
Click here to Donate by PayPal .

kid1293

#8
In Blender I choose metric - one square is one tile in game
You scale your model so it is OK in Blender
Goto Object Mode (with the mouse over main window press control-A)
Object -> Apply -> Scale
Then you have a 1:1 model that OK in game

While you're at it, Place your model so it looks like it's centered at 0,0
If you want it 3x3, the model should stretch 1,5 square to each side
and 2 squares back (away from you) 1 square forward (towards you)
because you will have a road in front so it is 3x4 in reality.
Object  -> Apply -> Location

Apply rotation too so you wont get any surprises.

SAVE Blender - export .fbx

Do that to all your parts of the model (build01 build02 mesh points)
Now import all the fbx's one by one in scale 0.010
and save as your gamefile.

That should work

Discrepancy

#9
Thanks so much for your help Kid1293, RedKetchup and tanypredator :)

I've done it, I had no idea I had to apply the rotation and scale - it's seems so silly on my behalf, but to be expected when i haven't read much of the manual and the last time I did 3d modelling was 15yrs ago with some old CAD program...

anyway, I got it into the game with a size I'm kind of happy with:
(the floor decal needs work...)






The issues I have now is that I only made a single plane roof for the thatch texture and it displays as transparent from within, so that I need to change.
But mostly the ground is not 'dropping' how I'd like it to (I don't think i've got the floors right). My fault for trying to build a more complicated model first.
So I have decided to change it to 'appear to be a cellar - it already takes up enough room above ground anyway.
So I'm going to make changes to the model, perhaps a second inset 'A' roof, like was more common, and maybe a few decorative barrels and bags to hide that the stairs don't actually go down.
Plus I don't like the roof texture as is, and I need to add the wood texture. Everything needs to change :)

started working on a large thatched 'low' style barn, though I think it looks too much like a tent like this right now (I still need to build the stone foundation around the bottom):


kid1293

About the transparent roof.

Select one side of the roof (only the covering, not the frame)

goto menu

Mesh -> Add Duplicate (or press Shift-D)
Move that new roof a tiny, tiny bit out
and left-click mouse.

Now select the inner roof again (the old roofside)
Mesh -> Normals -> Flip Normals

Now you have one outer and one inner roofside

Do the same on the other half.
If you place the new roof carefully you can't see it is
a double roof.

Discrepancy

#11
Thanks kid1293, I will do that.


...

and here is a very early beta release of DS Storage...
and no, it does not have either of the models I showed above, but it has this:


What you get is a small cellar, named 'Small Cellar 02' (I haven't made 01 yet), that will fit up snug to some buildings.
Also there are resource specific stockyards with a different base texture.
This is a beta release and as such things aren't finished.
download DS Storage - Beta v.01  ** should not conflict with anything, you will find the 'DS Storage' menu within the 'Storage/Market/TradingPost' menu, very left (as shown in the picture above).

RedKetchup

Quote from: kid1293 on June 15, 2016, 04:12:03 AM
About the transparent roof.

Select one side of the roof (only the covering, not the frame)

goto menu

Mesh -> Add Duplicate (or press Shift-D)
Move that new roof a tiny, tiny bit out
and left-click mouse.

Now select the inner roof again (the old roofside)
Mesh -> Normals -> Flip Normals

Now you have one outer and one inner roofside

Do the same on the other half.
If you place the new roof carefully you can't see it is
a double roof.

thats how i do the "cloth" roof for tents example. for real roof (wood /clay) i still prefer to make it from real box with 0.01-0.03 thick. sometimes, the shadow engine do bad wild things in this game.
> > > Support Mods Creation developments with Donations by Paypal  < < <
Click here to Donate by PayPal .

Discrepancy

now that I'm getting the hang of this I'm really enjoying making models.

another work in progress barn:

a Viking Turf Roof Stock Vault (the name needs work...)




Is only a quick texture make-up to see what it looked like, that is why it looks a little patchy and doesn't line up.
I thought the model was going to be too high, but it's actually too low.
It is my own interpretation of this:

Turis