Browser-based (Javascript) REO / OBJ Converter

Anything to do with Drakan level editing and modifications, post it here! Also this is the place to tell us about your new levels and get player feedback.
Post Reply
unterbuchse
Whelp
Posts: 17
Joined: Thu Feb 27, 2014 2:46 am

Browser-based (Javascript) REO / OBJ Converter

Post by unterbuchse »

As some people pointed out, the use of the python converter which needs the python runtime, was not practical enough. So right now there is no more excuse :D.
I wrote a converter using pure html/css/js with no libraries or extras needed. It works offline in the browser. There is a file for REOtoOBJ and one for OBJtoREO. Just open it, browse for the .obj / .mtl or .reo file and click convert. The converted file will be downloaded directly afterwards.

If you have any problems, just write a reply or message in discord.
Attachments
REO-OBJ-HTML-Converter.zip
(6.09 KiB) Downloaded 716 times

User avatar
Mechanist
Dragon
Posts: 303
Joined: Wed Mar 07, 2018 7:27 pm
Location: Poland

Re: Browser-based (Javascript) REO / OBJ Converter

Post by Mechanist »

Ok, now I have no idea what I'm doing, so I don't know if this is the expected behavior or not - but trying to convert a non-textured .REO file yields the following error:
Found a .reo file named: Morningstar (mage150).reo
Successfully read 37812 characters in 2889 lines
Start processing the file...
Read 0 material entry(ies)
Read 224 vertex entry(ies)
Read 440 face entry(ies)
Processing the file completed.
Building the .mtl file...
.mtl file created
Start .mtl file download.
.mtl file download started.
Building the .obj file...
Conversion failed! Error happened close to this line: undefined
TypeError: faceblocks[parseInt(...)] is undefined

If this is the expected behavior, then it would be a good idea to put an error message that actually describes what the problem is.
In this case, I happened to know the root cause for a fact already, but other users (especially newcomers to this whole .REO crap) might well be unaware of that.

unterbuchse
Whelp
Posts: 17
Joined: Thu Feb 27, 2014 2:46 am

Re: Browser-based (Javascript) REO / OBJ Converter

Post by unterbuchse »

Yep, the converter expects a fully textured model. Will try to integrate a workaround. If you encounter more problems, please post it so I can fix.

Post Reply