josema0890 wrote: ↑Thu Mar 11, 2021 8:39 pm
![Woah :woah:](images/smilies/[colon]woah.gif)
You are a beast
yeah, sometimes...
The thing i was thinking about the source code of MakeH2O for the WO2048 models, is that, when you check the FVFSize on hex2obj you got an address, and if you go to that address if is correct, usually the value is 00 and in some weird cases 01, if it's wrong usually you got 0X or XX maybe a 00.
It can give you the idea but the code was for different wipeout models 5 years ago.
The trick i thought that maybe is useful is, using a loop that checks all of the fvf and if the address you got is 00 and the next one is 00 or 01,
you're going to become a coder!
![Smile :)](images/smilies/[colon]).gif)
But then the order has to be vBlock/FIblock, what we have is FIblock/vBlock, that's how it worked for me, at least. But my first try was similar but led to troubles because as you may have notice, the 0000 before the start of vertex block is not always there.
I don't know if this way of dealing with the FVFSize it's correct
I'm too exhausted to check that, and
or you have in mind a better one,
yeah, it's just subtracting addresses to get the v blocksize then divide it by vertex count -> result= FVFsize. (So you don't need to try out.)
but that's what i could reach after extracting 746 submeshes by hand
I was in the fear you could do that.
BTW, send me a paypal address or something, and i will send u the money you need for a pack of beers, you've earned it
![Drunken :drunken:](images/smilies/drunk.gif)
thanks for the beer! (No other paying required.)
Thanks a lot, and have a nice week and weekend
![Very Happy :D](images/smilies/[colon]D.gif)
yeah, thx, same for you!
I'll send you the code asap, maybe Saturday (too much to do tomorrow).
H2O files, only sub meshes with a vertex count > 250:
sol_track.rcsmodel_410.zip
(don't expect the numbering to be the same as in the previous zip!)
Keep in mind that the resulting obj files contain the number of the H2O file (they are created from)
in their first line where 100.obj is NOT created by 100.h2o (sorry for the confusion
![reverse smiley (:](images/smilies/([colon].gif)
).
And don't forget to use
hex2obj's SaveAs Mmesh feature.
python script for blender, multiple obj import (change of path to obj required, example D:\\', 'Work\\my_obj_folder'):
Code: Select all
import os
import bpy
# http://blender.stackexchange.com/questions/5064/batch-import-wavefront-obj
# put the location to the folder where the objs are located here in this fashion
# this line will only work on windows ie C:\objects
#path_to_obj_dir = os.path.join('C:\\', 'objects')
path_to_obj_dir = os.path.join('D:\\', 'Work\\your_obj_folder')
# get list of all files in directory
file_list = sorted(os.listdir(path_to_obj_dir))
# get a list of files ending in 'obj'
obj_list = [item for item in file_list if item[-3:] == 'obj']
# loop through the strings in obj_list and add the files to the scene
for item in obj_list:
path_to_file = os.path.join(path_to_obj_dir, item)
bpy.ops.import_scene.obj(filepath = path_to_file)
You do not have the required permissions to view the files attached to this post.