Load File from with globalPaths

Hi folks,
Currently i am trying to load files from global paths so anybody can add models etc. at runtime. (without IDE or any software except of the game itself)
I know i can do this by using
(assetManager.registerLocator(“myLink.com”, UrlLocator.class); )
for a global Filepath on the server,
but i need a solution where the user can for example put the file in “C:\Users\myUsername”.
Thanks for any help

@emtonsit hello man.

Me and @shirion did a model viewer. It has what you want:
https://code.google.com/p/rise-of-mutants/source/browse/#hg%2Fdev%2Ftrunk%2FTechDemo%2Fsrc%2Fbigboots%2Feditor

[video]http://www.youtube.com/watch?feature=player_embedded&v=7zjIcAkW75o[/video]

2 Likes

Thanks!
Huge Help. Wouldn’t know what to do without…
Looks a bit complecated to just look at understand and use … :stuck_out_tongue_winking_eye:

i can’t get the model loader to load blenderfiles with textures… would be awesome if you could help me on that

https://wiki.jmonkeyengine.org/legacy/doku.php/jme3:external:blender
Also especially read the docs linked in the first paragraph.

I can load blendermodels with textures with correct UV-unwrapping but my problem is that i can’t get shirions and mifths modelloader to load blendermodels with textures and uvunwrapping so i need to know if it does support textures, uv etc propely.
thanks for any support

Their model loader doesn’t care for the implications I wrote down in those documents.

Hello man again. The project was like a garage band playing. :slight_smile: Don’t look at our API.

Firstly you need to checkout entire mercurial project: https://code.google.com/p/rise-of-mutants/source/checkout
Then you need to run BBModelViewer.java
Then you need to load an Ogre/j3o model (“Load Model” button).
Then you need to select geometry from the list and load diffuse texture (“Load Diffuse Texture” button). THIS WILL LOAD A TEXTURE FROM YOUR HARD DRIVE. THAT"S ALL WHAT YOU NEED FOR THIS TOPIC. SEE OUR CODE IN boots.editor package.

You also can load binary and check it our too: https://code.google.com/p/rise-of-mutants/downloads/detail?name=BBModelViewer.zip&can=2&q=#makechanges

See also my video: http://www.youtube.com/watch?feature=player_embedded&v=7zjIcAkW75o

We did it with awt, but it’s possible to make without awt. I mean to load a file from hard drive (model/texture).

BBModelViewer.java: see “strLst” and loadDiffuseTexture() method.
BBSceneGrid.java: see loadTexture(…) method. See string “path” in the constructor. :slight_smile:

cool thanks !!! great help

@mifth Thanks !! Managed to write the loadModel and the DiffuseTextureloader and it all looks great with lighting on!! So now i can load the information i need from anywhere!! :slight_smile:
Even works with uv unwrapping only stupid that i have to detach the texture to the blenderfile before saving because jme3 gives a “Relative path is outside assetmanager root!” Error.
But i dont even need the orge xml exporter!
Thanks !!!

1 Like

@emtonsit hey no problem man! :slight_smile: