I’d like to cc: you on this topic. I just found some posts from you from 2018 where you were also trying to get some of your 3D models more conveniently into a project’s assets. It looks like you settled on sharing assets from Dropbox but the ending step you said was to share Dropbox asset with a folder called “Assets” in the Codea file menu of the iPad file system. However, I don’t see such a folder labeled Simple’s “Assets” in my Codea file men using the iPad File system. (I only have folders labeled “DocumentAssets” and “DropBoxAssets”. DocumentAssets doesn’t currently have anything in it, and I don’t seem to be able to choose that folder from within the project editor. I can pick assets from Dropbox, but the Dropbox asset picker seems even more limited than the “Documents” asset picker which currently stores my multiple Codea assets (e.g. the Documents asset picker lets me choose Models from my Codea Documents folder but the Dropbox picker doesn’t let me choose Models that I place there; what I really need as mentioned in my recent additional post is a way to easily transfer .mtl files to my project’s assets).
I’m going to try Dave’s solution, but it would be easier to be able to just “pick” .mtl files in my Codea documents folder to just transfer the .mtl assets to my project.
Another workaround I guess I could try would be just use primarily .fbx 3D models which don’t require a separate .mtl file. The problem I worry about is that if not a text file like .mtl and somehow .fbx texture file name does not match what is in .fbx that I won’t be able to get textures on model (whereas with .obj/.mtl text files I can just rename the file/libraries in those files to correspond with changes in the .mtl or texture files as needed).
Appreciate any additional experience you might have in getting .mtl files into your project assets.
@SugarRay If you’re willing to pay for another app, Textastic is a fantastic editor and is what I’ve been using to write directly to assets within my Codea projects. It just sees the .Codea bundles as plain folders so you can look inside and copy things into them.
Dave1707, your code/solution for importing .mtl files into a project’s assets from my Codea documents folder worked! The only thing that I changed is then when I saved the file I made sure to remove the _mtl on the name (i.e. imported filename_mtl from Codea documents folder becomes exported filename.mtl to the file folder). I suspected that would be important since the .obj file would be looking for a mtllib file in the format of filename.mtl rather than filename_mtl. Interestingly, the imported filename.mtl shows up in the project’s asset library as an “other” file.
As mentioned earlier, one could probably avoid needing to do this manual reading and writing of .mtl files if one coverts one’s models all to the .fbx 3D file format which Codea also imports but doesn’t require a separate .mtl file. However, since the .obj file is so prevalent, I think it would be helpful in future versions of Codea if Codea could simply recognize .mtl files in one’s Codea document folder to then be able to transfer to one’s project’s asset folder (cc: @Simeon).
Bri_G, please let me know if you end up remembering another solution that worked well for you at transferring in .mtl files to your projects’ asset folders.
And Steppers, I value your recommendation, so purchased Textastic. I have some additional apps that I would also like to see and manipulate their file folders better so would like to see if Textastic could help me view and manipulate them better than iOS’s file system. I read Textastic’s instructions but initially am having some trouble understanding how to use Textastic to view Codea and other app folders. At your convenience, would you mind replying with a brief list of steps to do so (off topic from this post so okay to also direct message me in Code).
Have a great rest of your weekend and upcoming week, Everyone!
@SugarRay Great demo. I loaded it into my Dropbox and when I was exporting it to Codea, it was going really slow so I stopped it. Maybe I’ll try loading it some other time. Kinda big. I noticed in the demo you were still using the old movement controls where you have to stop one direction before moveing in another. I created an example back whenever where you can vary the speed and you can change direction without stopping what else is happening. In other words, you can move and change direction smoothly to make it seem like your actually walking around and turning.
As for the mtl files, since I haven’t messed with them for a long time, I wasn’t sure of the file format. I didn’t remember if .mtl or _mtl was the correct way. I also noticed the mtl files would show up in other.
Thanks, @dave1707. I had a feeling that with large 3D models that might be a slow import. Will stay open to suggestions from others in the future as to other ways to export large 3D model project to the Codea community.
I don’t think the YouTube videos capture the actual user player experience so well. Let me know what you think about the movement if you are able to get it downloaded and running in the future. Will try out your newer movement controls in these demos as well and compare the experience.
One thing I forgot to mention (which I’ll add to the other post) is that sphereCast method of collision detect still needs a lot of fine tuning. You may need to therefore do a bit of maneuvering more than you’d expect to move through doors or around some objects.
Thanks, @Steppers. I just figured it out—the app boots up with an intro file, and I initially couldn’t find the ‘Add External Folder’ option from there. I realized I just needed to navigate in the app out of that file and then saw the option to Add External Folders which worked well
PS, @Steppers, Textastic is the best iPad so far at opening up to view and edit large .obj files! I just used it to open and view in place a large 98MB .obj in-place and although it printed a warning that such a large file might make the app unstable, it opened and displayed the .obj file perfectly