Thanks
.KRV extension in Wii Models?
.KRV extension in Wii Models?
I am trying to get the models from 'how to train your dragon' and 'alice in wonderland' out of the game, but most of the files are .krv and I have no clue what those do. Can anyone tell me how to get usable 3d models out of those files?
Thanks
Thanks
-
FurryFan
- mega-veteran

- Posts: 190
- Joined: Sat Jan 09, 2010 9:37 pm
- Has thanked: 8 times
- Been thanked: 63 times
Re: .KRV extension in Wii Models?
Both of those games were developed by Etranges Libellule, (EDIT) They also use .KP2 (K Playstation 2) files in Spyro: Dawn of the Dragon for the PS2. If they are anything related to those, then each level will have it own KRV (K (Nintendo) Revolution) file(s) which will contain all of the assets for that level. There should be a list of file address offsets near the beginning. Can you upload a file from How to train your dragon, so I can attempt to get models from it
Last edited by FurryFan on Sun Jun 13, 2010 6:49 pm, edited 1 time in total.
I accept ALL requests. Let me know your requests.
Re: .KRV extension in Wii Models?
Thanks for the fast reply ^^ If you manage to get stuff out of it, can you tell me how you did it so I can check the rest as well? 
Can't upload those directly into here it seems (they do not like .krv and it is just a tad to big as rar), but you can download it here to see if it works: http://www.mediafire.com/?cj0atzqzw2g
This file comes from 'LVL1' apparently and there are several more of these small files along with a 17 MB one...
Can't upload those directly into here it seems (they do not like .krv and it is just a tad to big as rar), but you can download it here to see if it works: http://www.mediafire.com/?cj0atzqzw2g
This file comes from 'LVL1' apparently and there are several more of these small files along with a 17 MB one...
-
FurryFan
- mega-veteran

- Posts: 190
- Joined: Sat Jan 09, 2010 9:37 pm
- Has thanked: 8 times
- Been thanked: 63 times
Re: .KRV extension in Wii Models?
The file you uploaded is compressed, but it is just a renamed zip file so you can change the extension to .zip and then extract it. This file only has some png textures, probably just the graphics from the title screen judging from the names of the files like tyd0.pngLizz wrote:Thanks for the fast reply ^^ If you manage to get stuff out of it, can you tell me how you did it so I can check the rest as well?
Can't upload those directly into here it seems (they do not like .krv and it is just a tad to big as rar), but you can download it here to see if it works: http://www.mediafire.com/?cj0atzqzw2g
This file comes from 'LVL1' apparently and there are several more of these small files along with a 17 MB one...
Could you upload the 17MB file as that is most likely to have models in it, or even better a 17MB or larger file from same LVL2 as in some games the first "level" is just a title screen or a cutscene that will not contain any models.
I accept ALL requests. Let me know your requests.
Re: .KRV extension in Wii Models?
The contents of this post was deleted because of possible forum rules violation.
-
revelation
- mega-veteran

- Posts: 183
- Joined: Mon May 12, 2008 5:15 pm
- Has thanked: 5 times
- Been thanked: 85 times
Re: .KRV extension in Wii Models?
None of the links above work for me. i'll see if i can find some, but if you have sample files, i'll take a look.
Re: .KRV extension in Wii Models?
The contents of this post was deleted because of possible forum rules violation.
-
Quetzalcoatil
- n00b
- Posts: 17
- Joined: Sat Oct 02, 2010 3:12 am
- Has thanked: 1 time
- Been thanked: 1 time
Re: .KRV extension in Wii Models?
Hey FurryFan,
I see you're using blender to load the tri-strips. I'm slightly proficient with python, but I'm not familiar with the loading of tri-strips. Could you post the script you used for that import?
Also, what did you mean by "98 2ByteInteger#Vertexes"? Did you mean there are 98 uint16 index values or the byte '0x98' followed by a uint16 'number of vertices' ?
Here's the very broken script I'm using to (try and) locate the vertex data. Basically I'm using HexEdit to find a candidate for some float3's, then skipping ahead in the file with a skip_bytes variable then reading in 10 triangles out of them. Needless to say, I'm not finding much.
-Q13
I see you're using blender to load the tri-strips. I'm slightly proficient with python, but I'm not familiar with the loading of tri-strips. Could you post the script you used for that import?
Also, what did you mean by "98 2ByteInteger#Vertexes"? Did you mean there are 98 uint16 index values or the byte '0x98' followed by a uint16 'number of vertices' ?
Here's the very broken script I'm using to (try and) locate the vertex data. Basically I'm using HexEdit to find a candidate for some float3's, then skipping ahead in the file with a skip_bytes variable then reading in 10 triangles out of them. Needless to say, I'm not finding much.
Code: Select all
######################################################
# TriStrip Importer ... eventually
# This script should be run from the text editor in
# Blender2.49b (I think it will work with Blender 2.3
# on to 2.49b, but I've only tested it in 2.49b).
# As it stands
#
######################################################
# Importing modules
######################################################
import struct as S
import Blender
from Blender import NMesh
from Blender.BGL import *
from Blender.Draw import *
import math
import io
# functions
def dec(this): return int(this.encode('hex'),16)
def fourbyte(this): return S.unpack(">f", this)[0]
# variables
skip_bytes = 808 #change this variable to skip to known byte
######################################################
# Main Body
######################################################
def import_Tris(path):
Blender.Window.WaitCursor(1)
name = path.split('\\')[-1].split('/')[-1]
# create a new mesh with filename
mesh = Blender.NMesh.New( name )
# parse the file
tris = open(path, 'rb')
tris.read(8) #read blank bytes
if (tris.read(4) == "Her_"):
print "File is valid" #(debug)
# get the name of the mesh from file
mesh_name = tris.read(6)
#skip to tristrip indices?
tris.read(skip_bytes)
# print number of vertices?
NumVerts = dec(tris.read(2))
print "Number of Verts =",NumVerts
# create 10 tri's
for i in range(0,10):
Triangle(tris)
else: print "File is not valid" #(debug)
tris.close()
def Triangle(tris):
### create a new triangle mesh
tri = NMesh.GetRaw()
### populate vertices in triangle mesh
for i in range(0,3):
x = fourbyte(tris.read(4))
y = fourbyte(tris.read(4))
z = fourbyte(tris.read(4))
v = NMesh.Vert(x,y,z)
tri.verts.append(v)
### connect the verts to form a triangle face
f = NMesh.Face()
for i in range(0,3):
f.v.append(tri.verts[i])
tri.faces.append(f)
triObj = NMesh.PutRaw(tri)
Blender.Redraw()
Blender.Window.FileSelector(import_Tris, 'Import')
-
FurryFan
- mega-veteran

- Posts: 190
- Joined: Sat Jan 09, 2010 9:37 pm
- Has thanked: 8 times
- Been thanked: 63 times
Re: .KRV extension in Wii Models?
Oh I do not know any scripts, the way that I import tristrips of the type used in this game is by using microsoft word, to past in the tristrips and then add in a "00 00" in between strips strips in this seem to start with the hex byte "98" so I do find and replace all in microsoft word, which will not work all the time because not all 98 are strip starters hence the dragon in the picture is not filled in correctly. After I do the replacements I append it 3 times, removing no bytes, the firstbyte, then the second byte and paste it in an ogre3d file with the vertexes and then import using someone else's ogre3dxml importer mesh into blender. Then I delete the vertex at the first location and then the thousands of null ones at 0,0,0.Quetzalcoatil wrote:Hey FurryFan,
I see you're using blender to load the tri-strips. I'm slightly proficient with python, but I'm not familiar with the loading of tri-strips. Could you post the script you used for that import?
Also, what did you mean by "98 2ByteInteger#Vertexes"? Did you mean there are 98 uint16 index values or the byte '0x98' followed by a uint16 'number of vertices' ?
Here's the very broken script I'm using to (try and) locate the vertex data. Basically I'm using HexEdit to find a candidate for some float3's, then skipping ahead in the file with a skip_bytes variable then reading in 10 triangles out of them. Needless to say, I'm not finding much.
-Q13Code: Select all
###################################################### # TriStrip Importer ... eventually # This script should be run from the text editor in # Blender2.49b (I think it will work with Blender 2.3 # on to 2.49b, but I've only tested it in 2.49b). # As it stands # ###################################################### # Importing modules ###################################################### import struct as S import Blender from Blender import NMesh from Blender.BGL import * from Blender.Draw import * import math import io # functions def dec(this): return int(this.encode('hex'),16) def fourbyte(this): return S.unpack(">f", this)[0] # variables skip_bytes = 808 #change this variable to skip to known byte ###################################################### # Main Body ###################################################### def import_Tris(path): Blender.Window.WaitCursor(1) name = path.split('\\')[-1].split('/')[-1] # create a new mesh with filename mesh = Blender.NMesh.New( name ) # parse the file tris = open(path, 'rb') tris.read(8) #read blank bytes if (tris.read(4) == "Her_"): print "File is valid" #(debug) # get the name of the mesh from file mesh_name = tris.read(6) #skip to tristrip indices? tris.read(skip_bytes) # print number of vertices? NumVerts = dec(tris.read(2)) print "Number of Verts =",NumVerts # create 10 tri's for i in range(0,10): Triangle(tris) else: print "File is not valid" #(debug) tris.close() def Triangle(tris): ### create a new triangle mesh tri = NMesh.GetRaw() ### populate vertices in triangle mesh for i in range(0,3): x = fourbyte(tris.read(4)) y = fourbyte(tris.read(4)) z = fourbyte(tris.read(4)) v = NMesh.Vert(x,y,z) tri.verts.append(v) ### connect the verts to form a triangle face f = NMesh.Face() for i in range(0,3): f.v.append(tri.verts[i]) tri.faces.append(f) triObj = NMesh.PutRaw(tri) Blender.Redraw() Blender.Window.FileSelector(import_Tris, 'Import')
I use excel formulas to change the edninan into the other edinan type.
I accept ALL requests. Let me know your requests.
-
Quetzalcoatil
- n00b
- Posts: 17
- Joined: Sat Oct 02, 2010 3:12 am
- Has thanked: 1 time
- Been thanked: 1 time
Re: .KRV extension in Wii Models?
o_0FurryFan wrote: Oh I do not know any scripts, the way that I import tristrips of the type used in this game is by using microsoft word, to past in the tristrips and then add in a "00 00" in between strips strips in this seem to start with the hex byte "98" so I do find and replace all in microsoft word, which will not work all the time because not all 98 are strip starters hence the dragon in the picture is not filled in correctly. After I do the replacements I append it 3 times, removing no bytes, the firstbyte, then the second byte and paste it in an ogre3d file with the vertexes and then import using someone else's ogre3dxml importer mesh into blender. Then I delete the vertex at the first location and then the thousands of null ones at 0,0,0.
I use excel formulas to change the edninan into the other edinan type.
Well, thanks FurryFan, I'll try to follow your work-flow, then adapt a blender importer for it... eventually. <)
-Q13
- chrrox
- Moderator
- Posts: 2601
- Joined: Sun May 18, 2008 3:01 pm
- Has thanked: 57 times
- Been thanked: 1358 times
Re: .KRV extension in Wii Models?
tri-strip is easy to load.
just read them as triangle list values like so.
just read them as triangle list values like so.
Code: Select all
StartDirection = 1
f1 = (ReadBEword f) + 1
f2 = (ReadBEword f) + 1
FaceDirection = StartDirection
while (ftell f) != (FaceStartPos + (FaceCount * 2))Do (
f3 = (ReadBEword f)
if (f3==0xFFFF) then (
f1 = (ReadBEword f) + 1
f2 = (ReadBEword f) + 1
FaceDirection = StartDirection
) else (
f3 += 1
FaceDirection *= -1
if (f1!=f2)AND(f2!=f3)AND(f3!=f1) then (
if FaceDirection > 0 then append Face_array [(f1),(f2),(f3)]
else append Face_array [(f1),(f3),(f2)]
)
f1 = f2
f2 = f3
)
) -
FurryFan
- mega-veteran

- Posts: 190
- Joined: Sat Jan 09, 2010 9:37 pm
- Has thanked: 8 times
- Been thanked: 63 times
Re: .KRV extension in Wii Models?
chrrox while we are on the topic of tristrips do you know of a script that can export meshes as implicit tristrips where the strip is in order (00, 01,02,03,04...N) where vertexes can repeat (ie vertex #4 could be vertex#55) so that the sequenital tristrip spans the whole mesh.chrrox wrote:tri-strip is easy to load.
just read them as triangle list values like so.
Code: Select all
StartDirection = 1 f1 = (ReadBEword f) + 1 f2 = (ReadBEword f) + 1 FaceDirection = StartDirection while (ftell f) != (FaceStartPos + (FaceCount * 2))Do ( f3 = (ReadBEword f) if (f3==0xFFFF) then ( f1 = (ReadBEword f) + 1 f2 = (ReadBEword f) + 1 FaceDirection = StartDirection ) else ( f3 += 1 FaceDirection *= -1 if (f1!=f2)AND(f2!=f3)AND(f3!=f1) then ( if FaceDirection > 0 then append Face_array [(f1),(f2),(f3)] else append Face_array [(f1),(f3),(f2)] ) f1 = f2 f2 = f3 ) )
This could be used to inject meshes into this game, as models in this game could be just one long strip in theory.
I accept ALL requests. Let me know your requests.
