Difference between revisions of "Libs3D Library"
(wip) |
(wip) |
||
| Line 2: | Line 2: | ||
== I am ready == | == I am ready == | ||
| − | As we have seen, | + | As we have seen, to make more advanced 3D, Gideros has a bunch of helper files packed in the '''Library''' folder. |
I will try to impress you with 3D Gideros ✨. | I will try to impress you with 3D Gideros ✨. | ||
| Line 9: | Line 9: | ||
* start with shapes | * start with shapes | ||
* add some .obj models | * add some .obj models | ||
| − | * | + | * add some .fbx animations |
| − | |||
| − | + | Please create a new Gideros project and copy the two following '''Library''' folders in the '''''assets''''' folder: | |
*'''3dbase''' | *'''3dbase''' | ||
*'''luashader''' | *'''luashader''' | ||
| − | + | Create a '''models''' folder, and in this folder an '''objs''' folder. Your file structure should look something like this: | |
| − | |||
| − | |||
| − | |||
| − | Your file structure should look something like this: | ||
*'''YourProjectName''' | *'''YourProjectName''' | ||
**Plugins | **Plugins | ||
| Line 28: | Line 23: | ||
***models | ***models | ||
****objs | ****objs | ||
| − | |||
***''main''.lua | ***''main''.lua | ||
| + | |||
| + | You can run your project, you should have a blank screen. | ||
== .obj Rulez == | == .obj Rulez == | ||
| − | When you work with 3D, you need to follow some "engine" rulez. In Gideros, for the .obj file format, those are: | + | When you work with 3D, you need to follow some "engine" rulez. In Gideros, for the '''.obj''' file format, those are: |
| − | *'''currently | + | *'''currently Gideros supports ''Base Color'', ''Texture map'' and ''Normal Map''''' |
*'''the textures shouldn't be embedded in the models. In Blender, use ''unpack resources''''': | *'''the textures shouldn't be embedded in the models. In Blender, use ''unpack resources''''': | ||
[[File:Blender_unpack_resources.png|414px]] | [[File:Blender_unpack_resources.png|414px]] | ||
| Line 46: | Line 42: | ||
'''I personally use this Blender add-on: https://extensions.blender.org/add-ons/act-game-asset-creation-toolset/''' | '''I personally use this Blender add-on: https://extensions.blender.org/add-ons/act-game-asset-creation-toolset/''' | ||
| − | Please note, you can still have the ''Metallic'', ''Roughness'' and other textures in your Blender BSDF shaders, Gideros will just | + | Please note, you can still have the ''Metallic'', ''Roughness'' and other textures in your Blender BSDF shaders, Gideros will just ignore them. |
== The assets: '''.obj''' == | == The assets: '''.obj''' == | ||
I have chosen this asset pack: https://roadtovostok.itch.io/road-to-vostok-assets-vol1. | I have chosen this asset pack: https://roadtovostok.itch.io/road-to-vostok-assets-vol1. | ||
| − | + | In 3D, the assets you download from the internet, often need some adjustement 🤷♂️. I made those adjustements and I will use the pack I uploaded here: '''https://mokatunprod.itch.io/3dpixel-obj-packs''' (or you can use your own models). | |
| − | + | Please copy the '''roadtovostok''' asset pack (or your own models) in the ''objs'' folder: | |
| + | ***models | ||
| + | ****objs | ||
| + | *****roadtovostok | ||
== The Ground == | == The Ground == | ||
As we are more learning than making a game, we won't really care if the 3D assets don't match 🤷♂️! | As we are more learning than making a game, we won't really care if the 3D assets don't match 🤷♂️! | ||
| − | |||
| − | |||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
</syntaxhighlight> | </syntaxhighlight> | ||
| − | |||
| − | |||
== I am out 2 == | == I am out 2 == | ||
Revision as of 19:41, 28 January 2026
I am ready
As we have seen, to make more advanced 3D, Gideros has a bunch of helper files packed in the Library folder.
I will try to impress you with 3D Gideros ✨.
Here is the plan:
- start with shapes
- add some .obj models
- add some .fbx animations
Please create a new Gideros project and copy the two following Library folders in the assets folder:
- 3dbase
- luashader
Create a models folder, and in this folder an objs folder. Your file structure should look something like this:
- YourProjectName
- Plugins
- Files
- 3dbase
- luashader
- models
- objs
- main.lua
You can run your project, you should have a blank screen.
.obj Rulez
When you work with 3D, you need to follow some "engine" rulez. In Gideros, for the .obj file format, those are:
- currently Gideros supports Base Color, Texture map and Normal Map
- the textures shouldn't be embedded in the models. In Blender, use unpack resources:
- your Blender BSDF shaders should look something like:
- Gideros will import the position of the models, so make sure your models are at location 0, 0, 0
- I believe Gideros also imports the origin of the models, so place the origins accordingly
I personally use this Blender add-on: https://extensions.blender.org/add-ons/act-game-asset-creation-toolset/
Please note, you can still have the Metallic, Roughness and other textures in your Blender BSDF shaders, Gideros will just ignore them.
The assets: .obj
I have chosen this asset pack: https://roadtovostok.itch.io/road-to-vostok-assets-vol1.
In 3D, the assets you download from the internet, often need some adjustement 🤷♂️. I made those adjustements and I will use the pack I uploaded here: https://mokatunprod.itch.io/3dpixel-obj-packs (or you can use your own models).
Please copy the roadtovostok asset pack (or your own models) in the objs folder:
- models
- objs
- roadtovostok
- objs
- models
The Ground
As we are more learning than making a game, we won't really care if the 3D assets don't match 🤷♂️!
I am out 2
To do.
You are strongly encouraged to mess with the code.
Bye for now!

