Seite 8 von 8
Gehe zu Seite Vorherige  1 ... 4, 5, 6, 7, 8
Autor
Nachricht
Ein neues Thema erstellen  Auf das Thema antworten
 Offline

:: Ensign ::

 Profil  
Mit Zitat antworten  
Beitrag #13241 Verfasst: Sonntag 22. November 2020, 18:59
Benutzeravatar

Beiträge: 9
Registriert: Freitag 25. November 2011, 14:24
Wohnort: Lyon, France
Re: Schleichfahrt Dateiformat
Licht !

Sorry not to speak German but I've almost forgot everythig now :twist:

This weekend I wanted as a little side project to make a converter using SF-Reloaded source to convert SF files to more common files

You can find it there:
https://github.com/LMCrashy/SF-Converter

There is also a binary release here :

https://github.com/LMCrashy/SF-Converte ... es/tag/0.1

The repository readme says everything.


Here is a small pic of some ships in blender :)

The size is kinda normalized using the .MOD embedded scale, but I'm not really sure how to handle these values.


Dateianhänge:
ships.png
ships.png [ 1.23 MiB | 66419-mal betrachtet ]
 Offline

:: Lt. Commander ::

 Profil  
Mit Zitat antworten  
Beitrag #13242 Verfasst: Montag 23. November 2020, 20:33

Beiträge: 210
Registriert: Montag 7. Juni 2010, 17:54
Re: Schleichfahrt Dateiformat
Hey there. Nice work! If you are interested about the handling of the scaling factors some digging into the python code should yield somethine. Tbh it is so many years away, that I cannot recall any details. Only that one kind of model needed some extra rescaling which really bugged me.

__________________
http://sourceforge.net/projects/schleic ... /p3d-file/ <-Schleichfahrt remake. Für die p3d Datei wird http://www.panda3d.org/download.php?runtime benötigt.


 Offline

:: Ensign ::

 Profil  
Mit Zitat antworten  
Beitrag #13243 Verfasst: Montag 23. November 2020, 21:10
Benutzeravatar

Beiträge: 9
Registriert: Freitag 25. November 2011, 14:24
Wohnort: Lyon, France
Re: Schleichfahrt Dateiformat
Yeah, I've seen that there is a scale param in the DES files too, yet I'm not sure if one does need to apply the mesh scale somehow before applying the .DES scale, or only the latter, and reading python gives me headaches :D

However I'm not sure what I'm going to do with these assets, I'm already very busy on my professional project. I've starded writing a vulkan toy engine as a side project and wanted to use some of the models as tests. Would be nice to render stuff from the 3D fx era with Vulkan ahah


 Offline

:: Lt. Commander ::

 Profil  
Mit Zitat antworten  
Beitrag #13244 Verfasst: Montag 23. November 2020, 22:02

Beiträge: 210
Registriert: Montag 7. Juni 2010, 17:54
Re: Schleichfahrt Dateiformat
https://sourceforge.net/p/schleichfahrt ... ts.py#l688 (parseCluster)
and
https://sourceforge.net/p/schleichfahrt ... ter.py#l77 (importModel)

So it is a combination of "Scale" in the "Size" section from the "VFX/SOBJECTS/" .DES file for the dtype (game object) and the input regarding scale .DES file from the "gamedata/NEWMODULE/" folder. So I think my code complete ignores the mesh scale. The python code was my very first big project with python back then and the version is rather acient by now. So this is not really an example for good python by any means. However, python is very good for rapid prototyping.
E.G. the MVI to PNG part can be written in python as:

Code:
from PIL import Image
import SF_Loader

path_to_your_SF_files   = "D:/SF"
name                    = "FILM/D02"
counter                 = 0
mvi_file                = SF_Loader.MVILoader()
mvi_file.load(path_to_your_SF_files + "/GFX/MVI/" + name)

while not mvi_file.has_finished():
    mvi_file.decode_next_frame()
    img = Image.frombuffer("RGBA", (mvi_file.width, mvi_file.height), mvifile.imgdata)
    img.save(f"frame{counter:03d}.png","png")
    counter += 1


And actually this is only because I wrote the exporter poorly. If I would have done it properly it would be:

Code:
from PIL import Image
import SF_Loader

path_to_your_SF_files   = "D:/SF"
name                    = "FILM/D02"
counter                 = 0
mvi_file                = SF_Loader.MVILoader()
mvi_file.load(path_to_your_SF_files + "/GFX/MVI/" + name)

for frame_number, frame in enumerate(mvi_file):
    img = Image.frombuffer("RGBA", (frame.width, frame.height), frame.imgdata)
    img.save(f"frame{frame_number:03d}.png","png")


So one can write very meaningful code with minimal "noise" (i.e. code which does not add information). So I can only recommend to take a closer look and give python a try. It is really worth it. Especially if your time is the limiting resource.

__________________
http://sourceforge.net/projects/schleic ... /p3d-file/ <-Schleichfahrt remake. Für die p3d Datei wird http://www.panda3d.org/download.php?runtime benötigt.


 Offline

:: Ensign ::

 Profil  
Mit Zitat antworten  
Beitrag #13245 Verfasst: Montag 23. November 2020, 22:46
Benutzeravatar

Beiträge: 9
Registriert: Freitag 25. November 2011, 14:24
Wohnort: Lyon, France
Re: Schleichfahrt Dateiformat
Thank you for the insight. Your code is indeed very clear and easily understandable, it was a great help, I'm just not very used to Python, although I plan to learn more of it because I need to write some blender tools in the near future.


 Offline

:: Ensign ::

 Profil  
Mit Zitat antworten  
Beitrag #13286 Verfasst: Dienstag 3. Januar 2023, 02:26

Beiträge: 10
Registriert: Sonntag 6. September 2020, 17:56
Re: Schleichfahrt Dateiformat

quote:


Kickthebaby hat geschrieben:
This weekend I wanted as a little side project to make a converter using SF-Reloaded source to convert SF files to more common files


Hello!
This is awesome! Thanks so much for making this tool!
I have a question / Problem though, I set up the file paths like in your example.bat (of course with corrected paths), but it doesn't convert any files. It recreates the folder structure, but then it instantly closes and doesn't convert any file. Am I missing something? :o

Also, any chance room Animation videos are coming any time soon? Those are what I personally look forward to the most :D
Found multiple scripts, tried dabbling with Python but I am no programmer and I just have trouble everywhere with that haha :P

Anyways, Happy New Year and thank you for your effort!


 Offline

:: Admiral a.D. ::

 Profil  
Mit Zitat antworten  
Beitrag #13314 Verfasst: Mittwoch 13. September 2023, 22:30
Benutzeravatar

Beiträge: 19
Registriert: Dienstag 9. Februar 2010, 23:05
Wohnort: darmstadt
Re: Schleichfahrt Dateiformat
if you have questions about the original format, why not contact the original author ;-)

https://www.xing.com/profile/Ingo_Frick

__________________
Daniel 'sirleto' Renkel

für Aquanox, AN2R, Aquamark, AN:Angels Tears (PS2)
arbeitete Ich an VFX, particle FX, UI realisierung, Aquamark

Heute Software Freiberufler in der Schweiz
und wenn zeit ist kleiner indie developer http://www.ludocrazy.com


Alle Zeiten sind UTC + 1 Stunde . Aktuelle Zeit: Donnerstag 28. März 2024, 21:06.

Ein neues Thema erstellen  Auf das Thema antworten
Beiträge der letzten Zeit anzeigen:  Sortiere nach  
 Seite 8 von 8
Gehe zu Seite Vorherige  1 ... 4, 5, 6, 7, 8

Druckansicht



Du darfst keine neuen Themen in diesem Forum erstellen.
Du darfst keine Antworten zu Themen in diesem Forum erstellen.
Du darfst deine Beiträge in diesem Forum nicht ändern.
Du darfst deine Beiträge in diesem Forum nicht löschen.
Du darfst keine Dateianhänge in diesem Forum erstellen.

Suche nach:
Gehe zu:  
Powered by phpBB® Forum Software © phpBB Group
Deutsche Übersetzung durch phpBB.de Impressum