Author Topic: Creating a 3d model house in blender and making it available in game  (Read 16884 times)

0 Members and 1 Guest are viewing this topic.

Offline hadrian900

  • Laborer
  • **
  • Posts: 28
Re: Creating a 3d model house in blender and making it available in game
« Reply #15 on: March 16, 2018, 06:07:52 AM »
I have followed this guide to a T, with only difference i have used 3ds max, instead of blender.

While this guide looks like it misses something, i can tell for sure it does not explain what "point" is: it's a dummy\helpers object.

While i managed to find and fix issues in files and naming, I still recieve error messages about sources not covered in this thread.

Code: [Select]
Assert: Failed to load resource 'C:\Users\kraso\Desktop\BanishedKit_1.0.7.170910\MyMods\House_test\bin\UI\HouseStringTable_objects.crs'

Object\ExternalFactory.cpp(364)


Code: [Select]
Assert: Source resource 'C:\Users\kraso\Desktop\BanishedKit_1.0.7.170910\MyMods\House_test\MaterialInstance\01 - Default.rsc' does not exist, and compiled resource not found in pack!

Object\ExternalFactory.cpp(312)

I skipped these warnings, launched build.bat file multiple times, and at some point it was built without any warnings.

I had the game model looking wrong, but i fixed it by turning the pivot axis into right direction. The game crashes when I place the building.
https://i.imgur.com/FSQuadj.jpg
Creating a 3d model house in blender and making it available in game


Here is how it's done in 3ds max for those who needs to know
https://i.imgur.com/IFmPZzc.png
Creating a 3d model house in blender and making it available in game


I have been looking into .rsc files to find errors, but it is as it's written in the guide

I'm out of ideas what to do.

Offline RedKetchup

  • Champion
  • Banished Expert
  • *****
  • Posts: 9618
  • Country: ca
Re: Creating a 3d model house in blender and making it available in game
« Reply #16 on: March 16, 2018, 03:22:01 PM »
what you see at your screen is not necessairly what you ll get. 3dsmax has 2 kind of location datas : the ones you see in your screen, and the real world ones.
you can take things at your screen and move them around , turn them around as you wish without changing the real world datas.

if at your screen everything is perfect but in real world isnt as you thought, i suggest you to export as an .obj file and then delete it and get it back as "import" an .obj file
that way you will easily make screen datas become real world datas. make sure each elements is at the right place relative to the 0,0 point because the real data will become relative to 0,0 point.

normally then after, when you want to move something around, it is not pickup the mouse and move around, you need to edit mesh and select the elements you want to move around. when you are editing mesh and selects parts and move the parts around ... you are editing the real world data in that mode.(screen 1 at your right)

but for your problem you have today, just place your building as it looks good to your eyes, at your screen, and then export to .obj , delete, import the .obj saved that way what you see at your screen will becomes real data.

do it for your mesh, but also do it for your build02 and build01 seperately (make sure they are at 0,0 too).


-----------

about your textures. decorate your mesh with textures is not that what is very important, textures arent saved inside a .fbx only the names of the textures are saved inside the .fbx. this is the reason why a .fbx is so small. it has no textures inside the .fbx

so what is important for your banished model is you need to "label" and "name" properly your textures. only the names will be saved.

or you press "M" to call the "Material window" and doing it there..... or open the schematic view and change the names there (It is there i personally change my names of my textures) This is the 7th icon on the menu from the right and called "Schematic View" (and it is just side of the material window icon)

screen 1 and 2

in screen 2 you see the window, and the boxes in brown, are the 'name' of your textures, just rename thouse 1_ default by the real name of your texture. only that name will be saved to your .fbx


------------------------

now the pointlist

i always use the helpers => dummy (but the helpers => point are good too. up to you)
you need 1 and call it "points" and place it at 0,0
then you need some as "build_001, build_002.... " the number of those = the number of builders in game which will build your building. if you put 2 of those, then the player will need 2 builders to build that building.
you need some "use_001, use_002...." those ones will tell the game where a citizen need to stand to interact with your model
"create_001, create_002..." is for buildings that take material and create something new, thats the spawn points where your new resource created will appear in game.


all those points (helpers => dummy) need to be "linked" to your "points" dummy. for that again you need to go in the schematic view and use the 3rd first icon named "Connect"
you select "connect" and then select all your dummies but the main one called "points" and then drag them to connect  those to "connect" with your main dummy called "points"

screen 3 and 4.

as you see in screen 4 , they will connect your dummy called "points"

« Last Edit: March 16, 2018, 03:28:50 PM by RedKetchup »
> > > Support Mods Creation developments with Donations by Paypal  < < <
Click here to Donate by PayPal .

Offline RedKetchup

  • Champion
  • Banished Expert
  • *****
  • Posts: 9618
  • Country: ca
Re: Creating a 3d model house in blender and making it available in game
« Reply #17 on: March 16, 2018, 03:39:53 PM »
for about your 'C:\Users\kraso\Desktop\BanishedKit_1.0.7.170910\MyMods\House_test\bin\UI\HouseStringTable_objects.crs error this is because in your template your link for your stringtable contains a " :objects " at the end. just delete this ":objects" from your link

this is because your string table doesnt have a paragraph name objects. this is usefull only when you have a stringtable as big as CC or megamod or NMT.
by default we use paragraph named "resource" so if you put no ":something" at the end of a link , it means "resource" by default. it would be the same if you did put a ":resource" at the end of your string table link. So  just delete this ":objects" from your link



by the way when you are dealing and making mods, i suggest to never never use any strange caracters in folder structure and file names. you are running ahead big frustrated problems if you do so.
so i suggest to never use any "." or "-" or "_" in folders/name_files
> > > Support Mods Creation developments with Donations by Paypal  < < <
Click here to Donate by PayPal .

Offline RedKetchup

  • Champion
  • Banished Expert
  • *****
  • Posts: 9618
  • Country: ca
Re: Creating a 3d model house in blender and making it available in game
« Reply #18 on: March 16, 2018, 07:46:30 PM »
but maybe a quick fix can be screen 1:
when you export in .fbx, check Advanced Options => Axis conversion and try Z up  if not do what i said, export in .obj and reimport.


not sure if you did this yourself, or grabbed a free .obj from the net....
when you did imported it the first time... probably should have just clicked : " Flip ZY " checked box ON/OFF (screen2)
> > > Support Mods Creation developments with Donations by Paypal  < < <
Click here to Donate by PayPal .

Offline hadrian900

  • Laborer
  • **
  • Posts: 28
Re: Creating a 3d model house in blender and making it available in game
« Reply #19 on: March 17, 2018, 08:03:35 AM »
You have put a lot of effort to clear the issue with the model's alignment in the game. I have solved it myself and shared quick solution in the post.

I still can't find traces of "01 - Default.rsc" in files, lack of which causes builder to return error message.

I can get mod built by skipping these error messages, but in the game placing the mod's building will cause crash.
Code: [Select]
A fatal access violation has occurred in Runtime-x64-profile.dll and the game cannot continue!

A crash dump has been saved to C:\Users\kraso\Desktop\BanishedKit_1.0.7.170910\bin\x64\crash.dmp


Again, the code of error i receive while running the builder:
Code: [Select]
Assert: Source resource 'C:\Users\kraso\Desktop\BanishedKit_1.0.7.170910\MyMods\House_test\MaterialInstance\01 - Default.rsc' does not exist, and compiled resource not found in pack!

Object\ExternalFactory.cpp(312)

Offline RedKetchup

  • Champion
  • Banished Expert
  • *****
  • Posts: 9618
  • Country: ca
Re: Creating a 3d model house in blender and making it available in game
« Reply #20 on: March 17, 2018, 01:23:26 PM »

I still can't find traces of "01 - Default.rsc" in files, lack of which causes builder to return error message.


your answer is there, you need to "etiquette" the names of your textures properly, you have read all my posts but didnt verified. you need to open your Schematic View window.
> > > Support Mods Creation developments with Donations by Paypal  < < <
Click here to Donate by PayPal .

Offline RedKetchup

  • Champion
  • Banished Expert
  • *****
  • Posts: 9618
  • Country: ca
Re: Creating a 3d model house in blender and making it available in game
« Reply #21 on: March 17, 2018, 01:44:08 PM »
this screenshot again will show you the Schematic view of a model which i assigned texture but i didnt made my job properly : i added textures to things, but i didnt "named" my textures and i've let the 3dsmax to give those XX - default name.

you need to open your schematic view and go rename your textures :)


In this screenshots you will see the names of the textures wrongly named : 16 - Default , 17 - Default ,18 - Default , 20 - Default



like i said, the toolkit and the banished does not read your texture, it only read the NAME of the textures and check inside your folder MaterialInstance for those names.
the MaterialInstance folder contains your textures and the .rsc to make it work those textures


so your toolkit read those : 16 - Default , 17 - Default ,18 - Default , 20 - Default and search inside the MaterialInstance folder for the .rsc to make work those names
it will search for : 16 - Default.rsc , 17 - Default.rsc ,18 - Default.rsc , 20 - Default.rsc because the .fbx told your toolkit those are the name of your texture you decided !!
« Last Edit: March 17, 2018, 01:54:09 PM by RedKetchup »
> > > Support Mods Creation developments with Donations by Paypal  < < <
Click here to Donate by PayPal .

Offline hadrian900

  • Laborer
  • **
  • Posts: 28
Re: Creating a 3d model house in blender and making it available in game
« Reply #22 on: March 17, 2018, 03:29:19 PM »
Now i see, it compiles, reading material names from the FBX file, and if material name and maps attached to the material do not match file names in the mod, it will attempt to compile wrong file and return error message.


https://i.imgur.com/oos5K4Y.jpg
Creating a 3d model house in blender and making it available in game

Offline RedKetchup

  • Champion
  • Banished Expert
  • *****
  • Posts: 9618
  • Country: ca
Re: Creating a 3d model house in blender and making it available in game
« Reply #23 on: March 17, 2018, 03:35:12 PM »
now you need to make a proper AO file !!
> > > Support Mods Creation developments with Donations by Paypal  < < <
Click here to Donate by PayPal .

Offline hadrian900

  • Laborer
  • **
  • Posts: 28
Re: Creating a 3d model house in blender and making it available in game
« Reply #24 on: March 20, 2018, 02:29:28 PM »
After creating new mesh with new textures, and checking everything to be in order, the builder now crashes without error message at the same point of progress.

Offline Discrepancy

  • Modders
  • Architect
  • *****
  • Posts: 913
  • Country: au
Re: Creating a 3d model house in blender and making it available in game
« Reply #25 on: March 20, 2018, 03:18:32 PM »
@hadrian900 ,

I notice you have your modkit folder named:

'BanishedKit_1.0.7.170910' (Desktop\BanishedKit_1.0.7.170910\MyMods)

the compiler does not like this, I suggest changing it to just 'BanishedKit'.

You have done very well, and I am amazed it was compiling at all for you.

Offline Discrepancy

  • Modders
  • Architect
  • *****
  • Posts: 913
  • Country: au
Re: Creating a 3d model house in blender and making it available in game
« Reply #26 on: March 20, 2018, 03:20:35 PM »
If the compiler is hanging and crashing when trying to compile the texture, ensure the texture image is of right size and also that all names are correct in .fbx and MaterialInstance folder.

Offline RedKetchup

  • Champion
  • Banished Expert
  • *****
  • Posts: 9618
  • Country: ca
Re: Creating a 3d model house in blender and making it available in game
« Reply #27 on: March 20, 2018, 03:41:30 PM »
If the compiler is hanging and crashing when trying to compile the texture, ensure the texture image is of right size and also that all names are correct in .fbx and MaterialInstance folder.

yup! your texture need to be in 32pixelsX32pixels ,  64x64, 128x128, 256x256, 512x512, 1024x1024 or any of these numbers (like 128x512 for example)
we cannot say multiples cause it wont like 192 or 384 numbers....
> > > Support Mods Creation developments with Donations by Paypal  < < <
Click here to Donate by PayPal .

Offline hadrian900

  • Laborer
  • **
  • Posts: 28
Re: Creating a 3d model house in blender and making it available in game
« Reply #28 on: March 20, 2018, 06:15:50 PM »
It was caused by wrong texture size.

Now game crashes when i try to place the building, despite build was complete without any issues.


Offline RedKetchup

  • Champion
  • Banished Expert
  • *****
  • Posts: 9618
  • Country: ca
Re: Creating a 3d model house in blender and making it available in game
« Reply #29 on: March 20, 2018, 07:34:01 PM »
then certainly your code
> > > Support Mods Creation developments with Donations by Paypal  < < <
Click here to Donate by PayPal .