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 ... 8 9 [10] 11 12 ... 23
136
Project announcement / Re: Virtua Skimmer
« on: May 18, 2018, 09:47:24 pm »
https://youtu.be/M00oA1ZEKU0

This may not be conclusive but it was easy to do.

You know what, I'll just try and throw in something that really should break it if it works like we think it does. Give me a minute.

/e: Yep, as you expected, things get culled when they would be otherwised blocked in the models' rest position.

https://i.imgur.com/2JassMX.png?1

I'd guess some way of compressing the normals is important

There is probably a really good reason why the animations in Quake are like they are.
Hopefully we can at least prevent writing redundant textures.

Textures are only stored once in memory using my tool. Plis they are 4 bits per pixel, so  you really don't need to be worried as I'm sure you have a ton of VRAM left.
Even with Quake maps and 1000 textures I still have some VRAM left.
For the normals, you could also just use dual_plane for now, but that's not an option for me.
I will try to read more on the subject.

EDIT : Just looked at your video, it still looks quite smooth! If you don't use that many polygons, you can probably just use dual plane quads and keep the current implementation.

137
Project announcement / Re: Virtua Skimmer
« on: May 18, 2018, 09:43:19 pm »
The main issue with SCU DSP is that you need to DMA everything, wait for the dsp to complete the operation and then stop it, DMA the data back.
It really requires perfect syncronization else you just waste time waiting or DMAing little data.
Plus it's in assembly only...

138
Project announcement / Re: Sonic Z-Treme
« on: May 18, 2018, 09:38:55 pm »
I do plan on having static lights (the quads closer to screen use CLUT while the quads with CC use CRAM banks), but I'm quickly running out of time.
But if I think I can implement it in 1 or 2 hours I will sure try it!

139
Project announcement / Re: Virtua Skimmer
« on: May 18, 2018, 08:01:22 pm »
Would you mind showing me (if you can just do a short private youtube video or something as I'm not on my computer now)?
If the planes are single plane, I think they will get culled for more intense rotations, and that's a big problem.

140
Project announcement / Re: Virtua Skimmer
« on: May 18, 2018, 07:53:47 pm »
Now that I think about it, it might not even work because of the normals.
SGL does backface culling depending on the normals, not the vertices AKAIK.

Can you try it to confirm it does indeed work?
The work around would be to also compress the normals, but that would double the amount of memory!
The other way to do would be to animate using meshes as bones, it would require less memory but it's still not that easy to implement since I will have to interpolate the movements.

141
Project announcement / Re: Virtua Skimmer
« on: May 18, 2018, 06:48:06 pm »
Thanks, I'll look it up.
I won't have time this week, but maybe I can get some work done next week.

I think I will just ask the user to enter : how many animations, how many frames per animation.
So, if you say : 4 (nb of animations), it will ask you how many frames for animation 1 (let's say 7), 7 for animation 2, etc.
And it would store the default vertices (your default obj file) and for each animation frame 4 bytes per vertices to store the offset.
It should be cheaper than storing all the vertices multiple times, but it would still be a little bit hard on the CPU.
Anyway, we'll see once we get there!

If you manage to make it work with your current implementation, make sure to show us with a small clip!

142
Project announcement / Re: Virtua Skimmer
« on: May 18, 2018, 05:57:41 pm »
I know next to nothing about animations in Blender, but if you can send me your model with some basic animations (like 2-3 different movements) I could see what I can do.
But doing vertex animation isn't cheap memory-wise, so it might be better to somehow compress the data.
I really don't know how I would handle it.
Maybe by going with 4 bytes per vertex instead of 12, but I'll have to think about it.

143
Project announcement / Re: Virtua Skimmer
« on: May 18, 2018, 05:44:09 pm »
I just noticed Blender supports exporting animations.

I will play a bit more with that in the next few weeks and see what I can do with it.

144
Project announcement / Re: Virtua Skimmer
« on: May 18, 2018, 05:03:09 pm »
Works fine here. Maybe your model was too big so what you saw was actualy inside it, so it did backface culling and you didn't see anything?
I just scaled it down 10% in Blender and then scaled it up 4 in the tool.

The only other thing it could be is that you use RLE compression, so it didn't actualy read the textures.
I'm also using Blender, so it shouldn't be an issue.
I just use the default values, see attached image.

About the subfolders, you can add the following functions to your code and call them (set the directory, then after set it back to root).
I suggest you first call ztCDsetDir, load everything you need to load, then call ztCDsetRoot to return one folder back.
 

Code: [Select]

void    ztCDsetDir(char * subDir)
{
    Sint32  fid;
    if (subDir != NULL)
    {
        fid = GFS_NameToId((Sint8 *)subDir);
        GFS_LoadDir(fid, &gfsDirTbl);
        GFS_SetDir(&gfsDirTbl);
    }

}

void    ztCDsetRoot()
{
    Sint32  fid;
    fid = GFS_NameToId((Sint8 *)"..");
    GFS_LoadDir(fid, &gfsDirTbl);
    GFS_SetDir(&gfsDirTbl);
}


145
Project announcement / Re: Sonic Z-Treme
« on: May 18, 2018, 03:37:51 pm »
Still a very long way to go : I'm not done with the rendering part and I haven't started to put gameplay back in (you can just move the camera around now), but I think it looks rather good so far.
You can see the draw distance is quite good!
I might have to reduce it a little bit, but it shouldn't impact too much the visual as the draw distance is a bit too far now (it should still be fine at 30 fps).
Plus with the transparency effect, I think most people won't mind and will instead appreciate the effects ;)

146
Project announcement / Re: Virtua Skimmer
« on: May 18, 2018, 11:57:16 am »
You forgot to do "toFIXED". You can also do something like (150 <<16). The Jo Engine function does it. But I recommand you only use fixed values for more precision (I'm not sure if the newer Jo engine versions -which uses fixed values - has sin/cos tables for them - if it does, you can use it also).

147
Project announcement / Re: Virtua Skimmer
« on: May 18, 2018, 12:08:25 am »
Yes, you don't need to worry too much about the slave CPU, you can use it for maybe one function as the main CPU retrieves controls and stuff like that, but otherwise it's mostly for 3D rendering.
But they didn't make use of the SCU DSP at all!
Most devs agreed that it was great for lightning calculations

148
Project announcement / Re: Virtua Skimmer
« on: May 17, 2018, 09:35:28 pm »
You can easily put one light source per model, but not more.
SGL can only register one source.
The way around this would be to not use SGL, or maybe it's possible to use offsets, but I don't know.
I might compute lights offline for static lights, which should allow much better colors.
Maybe you could then use the SCU DSP to calculate the additions/substraction on top of static lights, but I think it would be slow.

I already tried with colors, it's super easy.
For this demo, I'm using "semi white", but you can put any color you want.

It's already using the 2 CPUs. As soon as you call slPutPolygon, it will look to see if the slave is busy, and if not it will transfer the command so that the slave handles everything.


149
Project announcement / Re: Virtua Skimmer
« on: May 17, 2018, 05:44:17 pm »
For the textures, you can just put a 8x1 single color texture. The tool doesn't read the material data sadly as I never bothered trying to read the mtl files, but it will still convert it as a single color polygon, so it really only takes 4 bytes + 32 bytes for the color data (always 16 unsigned shorts). It was the easiest way to get the tool out in a reasonable amount of time.

The Jo Engine convert does in fact face normals, it's the per vertex normals that it doesn't calculate. I will try to add functions to precalculate lightning for static lights, mainly for the maps. It should help make everything look much better while also being faster than dynamic light. I still need to do some reading on gouraud shading.

For the loading routine, load your Jo Engine specific data first, reinit the CD with my own function, then use the ZT functions.
Binary files are the way to go, but there are restrictions with folders and filenames (max 8 caracters plus 4 for the extension).

Since I wrote so many tools for my game and used many functions differently (like audio), it didn't make much sense to init everything just to reinit almost everything right after, so I'm not using Jo Engine anymore for Sonic Z-Treme, but I will still try to contribute to improve it.

150
Project announcement / Re: Virtua Skimmer
« on: May 16, 2018, 06:28:47 pm »
It might work with the Jo Engine callbacks, I'm just not sure because I think it does things with the gouraud shading. Best way to know is to try it.

As for why it doesn't work with your project, I don't know, make sure all the addresses are right.
Also make sure that your are using subfolders and clean up your CD folder as you are limited to the number of files per folder (just remove all those TGA textures, you don't need them anymore).
Remove all the unused header files too to save memory.

If all fails, just do it the other way around : rebuild your game around the demo I gave you.

Pages: 1 ... 8 9 [10] 11 12 ... 23
SMF spam blocked by CleanTalk