Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - XL2

Pages: 1 ... 6 7 [8] 9 10 ... 23
106
Share your code / Re: Model converter (.ZTP) -0.1 - WIP
« on: June 19, 2018, 08:11:18 pm »
I'm still really surprised at how good interpolation looks like.
It feels very smooth and decompressing the data isn't as slow as I thought it would be.
I could probably speed it up at a later time by using assembly.
So I don't think I will be spending time on trying to figure out the DAE file format and I will stick to OBJ for now as vertex animation is quite simple yet it allows very complex motions.

107
Share your code / Re: Model converter (.ZTP) -0.1 - WIP
« on: June 19, 2018, 03:11:51 pm »
Yes, I could probably clean up the interface to make it easier to understand.
The interpolation on the converter and in the animation player are different thing, I should just call it "skip frames" or something like that to make it easier to understand (I just changed my interpolation technique as I wrote the demo).

108
Share your code / Re: Model converter (.ZTP) -0.1 - WIP
« on: June 19, 2018, 02:55:57 pm »
The interpolation factor is mainly for testing.
You can set it to 0 and manually set your interpolation for each animation.
This is what I do in Sonic Z-Treme.
Just do your animation on blender, once you are satisfied just keep the relevant keyframes and use an interpolation factor of 0.
The problem with entering each filename is that it makes the process way too long.

For the bug, you need to have a base model (say Ponut.obj) AND your keyframes (ponut_00001.obj, etc).
The base model must include the materials, but not the others.

I will revisit this tool at a later time to improve it, but you can also play with the source code to add custom features.

109
Ok, so you reload the model each frame?
Yeah, for animation you can just use the newer version.
It can be improved and in fact I already made improvements for Sonic Z-Treme.
I might revisit the tool and demo in the near future.

110
How big is your model?
Also, I'm not 100% sure what it does.
Is it streaming animation data?
If so, why does it disappear?
I think it would be more interesting to test it with backgrounds (or palettes), you could have animated backgrounds.
Is it running at 60 fps?
So you can fetch 512 bytes per frame at 60 fps, I guess streaming visibility data would work fine.
But, first things first : getting midi music to work!

111
Project announcement / Re: Sonic Z-Treme
« on: June 16, 2018, 05:47:57 pm »
Here is a new update on my new engine (WIP!) on real hardware.
I didn't implement back the physics/controls, so don't pay attention to that.
What's new : compressed per-vertex animation with interpolation (a bit like Crash Bandicoot and Quake 2), VDP2 transparency fade in, per-vertex realtime lightning (on Sonic only), audio using tones, splitscreen (not seen here), octree instead of an uniform grid for culling/collision, paletted/CLUT sprites, LOD model autogenerated for distant quads and probably many other things I forgot to mention.
Splitscreen works at a stable 30 fps from what I tested.

It's not optimized yet, so there is room for lot of improvement.

https://www.youtube.com/watch?v=J51wKAvJL7g

112
Share your code / Re: Model converter (.ZTP) -0.1 - WIP
« on: June 15, 2018, 04:26:14 am »
Here is how it looks like in action :

https://youtu.be/9q5zSLxVBAI

113
You don't need to change the Jo main implementation, just use a callback and just fetch a small amount of data for each loop.

114
Share your code / Re: Model converter (.ZTP) -0.05 - WIP
« on: June 11, 2018, 04:39:31 am »
Ok, scratch that last one, I just did minimal clean up of the code.

Just remember : you need to have 1 base model, the other models will use that name +  "_000001" to whatever amount of frames you want.
The base model needs to write the material data, but not the animation.
Just make sure you keep the vertices order (I think it does it by default in Blender).

I'm also sharing the source code for the converter, it should be cleaner than last time...but I did make a mess while adding animation support!

Enjoy!

115
Share your code / Re: Model converter (.ZTP) -0.05 - WIP
« on: June 11, 2018, 04:11:25 am »
I haven't tested at the 3 letters textures, but I will look it up at a later time.

Very good news, I got the compressed animation working, including compressed normals!

A Sonic model with 40 frames of animation takes a total of 63 KB (including the textures).
I also got compressed normals working (1 quad now takes only 1 byte for normals instead of 12 bytes!).
The compression can lead to some minor issues where the quad gets clipped when it's in some extreme angles.
The vertices take 6 bytes instead of 12 bytes each.
I could compress the vertices further (4 bytes), but it might become a bit slower to decompress.
So, all in all, 40 frames of animation using vertices should amount to about 180 KB of data while now it's down to about 63 KB (minus the base model of 11-15 KB).
Note that you can interpolate these animations, so you could easily make it 1/4 or less this size!
At a level 2 interpolation (1 out of 4 frames) you would reduce the same model to 27 KB (with only 8 KB worth of animation data), making vertex animation cheap in terms of memory.

I will try to clean up my code and release the demo + updated tool tomorrow, but I'm not promising anything as I should have a very busy day so I might not feel like it in the evening!


 


116
Share your code / Re: Model converter (.ZTP) -0.05 - WIP
« on: June 08, 2018, 01:24:47 am »
The floor clipping is because of the z sort not set to max.
Just patch it yourself with a loop function after loading your map.
For the 3 letters names, I don't know what you mean.

117
Share your code / Re: Model converter (.ZTP) -0.05 - WIP
« on: June 07, 2018, 05:26:10 am »
Also, what's the texture like? Does it have a width that is a multiple of 8?

118
Share your code / Re: Model converter (.ZTP) -0.05 - WIP
« on: June 07, 2018, 04:18:42 am »
 The vertices limit depend on the order you send your slputpolygon commands.
If SGL detects you have 2450 vertices and the next object has 60 vertices, it won't draw it at all.
Try only drawing your ball to see if it works.
For the dual plane quads, if you have a texture name starting with DUAL_ it will convert it as dual plane.
I'm not sure if I implemented this already in the demo.

119
Share your code / Re: Model converter (.ZTP) -0.05 - WIP
« on: June 06, 2018, 09:54:21 pm »
Yes, in the video he has 2500 vertices which is the maximum the default workarea supports.
You need to do visibility culling, using an octree/grid/bsp tree at minimum.

120
Share your code / Re: Model converter (.ZTP) -0.05 - WIP
« on: June 06, 2018, 07:35:37 pm »
It depends.
Like I mentionned the tool isn't designed for maps.
It could be that your normals are reversed.
You can use dual plane, but it won't do backface culling so you will cause useless overdraw.
Just make your normals are Ok.
In Blender just activate the backface culling option.
For the clipping : set the zsort to SORT_MAX for the level, SORT_CEN or Min for your entities.

Pages: 1 ... 6 7 [8] 9 10 ... 23
SMF spam blocked by CleanTalk