Users browsing this thread: 13 Guest(s)
Zelda64 Models
#43
(06-19-2013, 06:35 AM)SoulofDeity Wrote:
(06-18-2013, 09:31 PM)RodLima Wrote:
Quote:btw RodLima, I forgot to mention that you can make the animations import a lot faster if you buffer segment 7. that's how the model itself imports so fast.

Um, but the normal models that don't use the segment_07 took same time to import, I think it take some time because blender uses only one core to do the python Transforms

that shouldn't be a problem at all. if the script can convert / export 20+ textures and locate / import 21 + display lists, texture / position / and skin all of them instantaneously, there's no reason why a few matrix instructions should cause it to lag out so badly. All modern games execute hundreds of matrix instructions a second.

The only thing that should cause such a bad lag is if you're using file operations. Aside from segment_07, are you using the already buffered data for segment_05/06, or are you using a file handle?

EDIT:
As far as arrays in python go, its simple.

Code:
myarray = []   # initialize an empty array
myarray = [0, 2, 3]  #initialize an array
myarray[0] = 1   # assign an element
myarray[1:]   # this is a slice of just [2, 3]
myarray[:1]   # this is a slice of just [1, 2]
myarray[:-1]  # this is a slice of just [1, 2]
myarray.append(4)   # add 1 item to an array
myarray.extend([4])  # add items from another array to this array
offset = 0
val = unpack_from(">L", myarray, offset)[0]   # read a big endian unsigned long value (long = 32 bit) from the array

# unpack_from returns a tuple. the first argument is the format specifier where:
#    > = big endian,    < = little endian
#    capital letter = unsigned, lowercase letter = signed
#    B = byte,   H = halfword (16-bit, 2 bytes)  L = long (32-bit, 4 bytes)
# if you did unpack_from(">LLL", myarray, offset), it would return a tuple with 3 items because 3 L's

# how to buffer a file
file = open(filename, 'rb')
myarray = file.read()
file.close()

Ok nice, I'm using the segment data that you had made
Looking at your code I believe it is the first thing done

Code:
if self.loadOtherSegments:
         for i in range(16):
            f3dzex.setSegment(i, fpath + "/segment_%02X.zdata" % i)

And I'd learned how to extend and add to a list, and what the unpack_from means, after all I'd made it work, I just wish that it was more like C or UnrealScript that has a Rotator structure already made.

Code:
// An orthogonal rotation in 3d space.
struct immutable Rotator
{
    var() int Pitch, Yaw, Roll;
};

Code:
self.offsetAnims = []
self.offsetAnims.extend([i])
self.offsetAnims[self.animTotal] = (0x06 << 24) | i
self.animTotal += 1
this part is done fast.

since you load a Link's walk anime that has 20 frames and it took about 3 sec to load, and the Link's biggest anime 365 frames and it took about 60 sec to load and at this point the code only acess the self.offsetAnims[] array already defined and some unpack_from calls. That is really fast, if you blockcomment the transforms code, and load Link anime 33 - 365 frames, it takes about 0.5 sec to load.

So, the part that take time IS the transform thing, rotate 20 joints for Link on 3 axes each on a for loop is not cheap to a single CPU core, I know there is constant joints and it could be skipped, but don't care about it.

if you look at my code, you wiil see how I did it and will realise that 80% of my code I just copied from zanime64 and zsaten, and a lot of thing could have been done another way.

But again, I know that you just want to help, but I'm done whit this, like I said before it was my first and last python code, don't want to mess with
python never again, I'm comfortable with C, C++, java, UnrealScript etc...

don't like to code something that if you had an invisible TAB or Space, it keep throwing error at our face!

And I did not made the anime part for anyone, it was just to me, I'm not comfortable on ask thing to anyone, so did not wanted to bother you, I'd made it only to dump Link's animes, and I already done this, 573 animes dumped, and put it to UDK as .PSA animes.

As you said
Quote:Not trying to dump the workload on anyone else, but if any python programmers wanna patch it up
and someone PM me askin for it, so I'd uploaded it.

Some day at the past, I was really considering on make some C code to Read Only the Link's rotation bones so I could manually set it on maya, how much time it would cost to me? More that some secs that is for sure.

And thanks to your project, the final result was infinitely better than I could ever dreamed.

I know it is slow, but I'm not in a hurry. Tongue


Thanks.
Thanked by:


Messages In This Thread
Zelda64 Models - by SoulofDeity - 03-14-2013, 01:07 AM
RE: Zelda64 Models - by Ton - 03-14-2013, 01:14 AM
RE: Zelda64 Models - by SoulofDeity - 03-14-2013, 01:19 AM
RE: Zelda64 Models - by Previous - 03-14-2013, 05:45 AM
RE: Zelda64 Models - by SoulofDeity - 03-14-2013, 08:45 AM
RE: Zelda64 Models - by Garamonde - 03-14-2013, 07:47 AM
RE: Zelda64 Models - by Garamonde - 03-14-2013, 09:02 AM
RE: Zelda64 Models - by SoulofDeity - 03-14-2013, 10:09 AM
RE: Zelda64 Models - by Garamonde - 03-14-2013, 11:18 AM
RE: Zelda64 Models - by SoulofDeity - 03-14-2013, 11:47 AM
RE: Zelda64 Models - by Ton - 03-14-2013, 12:24 PM
RE: Zelda64 Models - by Garamonde - 03-14-2013, 02:01 PM
RE: Zelda64 Models - by wat - 03-14-2013, 04:05 PM
RE: Zelda64 Models - by SoulofDeity - 03-15-2013, 12:19 AM
RE: Zelda64 Models - by Friedslick6 - 03-15-2013, 01:58 AM
RE: Zelda64 Models - by SoulofDeity - 03-15-2013, 05:59 AM
RE: Zelda64 Models - by SoulofDeity - 03-15-2013, 02:37 PM
RE: Zelda64 Models - by Friedslick6 - 03-15-2013, 07:16 AM
RE: Zelda64 Models - by SoulofDeity - 03-15-2013, 09:03 AM
RE: Zelda64 Models - by o0DemonBoy0o - 03-15-2013, 11:01 AM
RE: Zelda64 Models - by SoulofDeity - 03-15-2013, 12:15 PM
RE: Zelda64 Models - by Random Talking Bush - 03-15-2013, 02:07 PM
RE: Zelda64 Models - by josh98 - 03-15-2013, 02:42 PM
RE: Zelda64 Models - by Friedslick6 - 03-15-2013, 03:30 PM
RE: Zelda64 Models - by SoulofDeity - 03-15-2013, 03:58 PM
RE: Zelda64 Models - by Friedslick6 - 03-15-2013, 04:11 PM
RE: Zelda64 Models - by SoulofDeity - 03-15-2013, 05:46 PM
RE: Zelda64 Models - by TGE - 03-18-2013, 08:12 AM
RE: Zelda64 Models - by SoulofDeity - 03-21-2013, 10:54 PM
RE: Zelda64 Models - by SoulofDeity - 04-07-2013, 07:52 PM
RE: Zelda64 Models - by Txikimorin - 04-30-2013, 06:44 PM
RE: Zelda64 Models - by SoulofDeity - 06-03-2013, 03:19 AM
RE: Zelda64 Models - by RodLima - 06-06-2013, 12:12 PM
RE: Zelda64 Models - by Tiberious - 06-15-2013, 01:35 PM
RE: Zelda64 Models - by SoulofDeity - 06-18-2013, 08:48 PM
RE: Zelda64 Models - by RodLima - 06-18-2013, 09:31 PM
RE: Zelda64 Models - by SoulofDeity - 06-19-2013, 06:35 AM
RE: Zelda64 Models - by RodLima - 06-19-2013, 12:53 PM
RE: Zelda64 Models - by Previous - 04-30-2013, 06:59 PM
RE: Zelda64 Models - by SoulofDeity - 06-11-2013, 04:39 PM
RE: Zelda64 Models - by RodLima - 06-11-2013, 05:07 PM
RE: Zelda64 Models - by Leo22 - 06-13-2013, 09:04 AM
RE: Zelda64 Models - by RodLima - 06-13-2013, 09:34 AM
RE: Zelda64 Models - by SoulofDeity - 06-19-2013, 09:36 PM
RE: Zelda64 Models - by RodLima - 06-19-2013, 10:07 PM
RE: Zelda64 Models - by SoulofDeity - 08-25-2013, 02:27 AM

Forum Jump: