Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

Asset Forge

Create your own 3D models and 2D sprites! · By Kenney

Exporting right/left handed coordinate system (.model files)

A topic by ilanvandijk created May 27, 2020 Views: 289 Replies: 5
Viewing posts 1 to 2
(2 edits)

This may be uncommon to ask here, but i'm hoping you still can help me.

I would like to use Asset Forge as level builder for my game. I found the structure of the .model files incredibly useful, we have converted them to JSON files and trying to render it in ThreeJS by having the same Collections available online.

However we're experiencing problems as ThreeJS uses the right-hand coordinate system and your application / Unity uses the left handed system. When opening .model files it's clear that when the arrow looks North everything build North will increase Z value and East will increase X value. Personally this is my preference to have in ThreeJS but unfortunately that's not possible as i have been told. 

I understand you either can't simply change the coördinate system of your application but i was hoping you maybe had another idea of how to achieve this. The two problems I'm having are 1) everything renders mirrored East is West, and 2) objects larger than size 1x1 and/or positioned outside the grid box (other position than .0) will render positioned wrong because the exported .obj files still face the same way when used to build in Asset Forge. This maybe could be solved by editing all .obj files in Blender but that's totally not the way we want to go down.

Is there another way we can achieve to convert .model files from the left to the right handed coordinate system, and get the positions and scaling still right? Maybe this was nothing like you've intended Asset Forge to become but in addition to that i think exporting to JSON (and different coordinate systems) will be very useful for other people's projects as well in the future.

Maybe you can take a look at this Stack overflow post regarding this problem: https://stackoverflow.com/questions/61989554/threejs-flip-reversed-x-axis-left-h...

Hope you have an idea to help me!


Off-topic; 

You've done a great job creating Asset Forge so far and I'm looking forward to future releases. It has been a great contribution to my interest in 3D generally, I'm also learning Blender to create more detailed and better blocks for my project.

Many thanks, may Asset Forge become huge!

Such a cool idea to use the .model file! It's indeed perfectly readable.

I noticed the Stack Overflow question you linked also has a pretty solid answer, did that work for you? I think just multiplying any of the values by -1 should do the trick - does it not?

(1 edit)

Maybe that would work indeed for the example shown on Stack overflow, for any objects that are symmetrically the same on both sides it could work but for example a block of 2x1 where the left side looks different than the right side this may cause problems - also it still would be mirrored, if we're building in Asset Forge keeping in mind that the direction of the arrow is North - and built to the East, it's weird that it renders in my game as West.

I can post more complex / in depth examples tomorrow if you're interested in seeing the problems occuring with different kind of models.

Well I'm not sure if this is within the scope of the program and I'm not sure if I can help you. I don't have any knowledge on Three.JS and the .model files are normally used for just saving and loading Asset Forge models. They aren't meant to be an output type, however if you can make it work I'm all for it.

Do keep in mind that the .model file format might change in a future version of Asset Forge, so not sure if it's the best to work with that.

(2 edits)

Will possible future .model files still be text formatted or encrypted somehow? We could make converters for different versions that's no problem.

I understand, as mentioned in my post i was not sure if this was related enough to Asset Forge / in the interest of the community. I will try figure it out myself somehow, i have just donated to you keep up the good work!

Thanks for the donation, much appreciated :) I have thought of compressing the .model files earlier but felt like that would be unnecessary if the data was a couple (hundred) lines, so I kept them readable.