Page 1 of 1
Posted: 06 Mar 2016, 18:26
sebr
Where can I found the max poly limit for NCP an W files ?
And limit for each type of face (double-sided, mirroring ...)
For original revolt and last 1.2/rvgl ?
thx

Posted: 07 Mar 2016, 03:07
Kenny
Looking at the changelog the ncp poly limit apparently changed from 16384 to 65536 with Alpha 12.0802.

I'm not exactly sure though how the former number was calculated, personally I would assume that the original ncp limit was 32767 but maybe I'm missing some other limitation here that is less obvious.

Also I think the current ncp max is only 65535 unless it was implemented in a way where the 0th polygon counts as a valid polygon but I highly doubt that (otherwise I would consider it very weird).

As for the w poly limit, thats a little more complicated but since i already explained it once I figured I'd just link to that.
I guess the bottom line here is that the limit is higher than for the ncp file and you don't really have to worry too much about it unless you go over the top with it (like ten times the ncp limit or something like that).

Though I should probably also add that it very much depends on the tools you're using to export the ncp and w files whether you can max out these limits or not (could be that some of them might even unintentionally restrict you further).
But since the sources for most of these tools are not public I can't really say much more about that.

Last but not least I'm not sure what you mean with limit for each type of face, are you asking how many flags a face can have or how many faces you can place of each flag type?

Posted: 07 Mar 2016, 04:42
sebr
thx Kenny it's a good start
i was talking about "how many faces you can place of each flag type?"

Posted: 07 Mar 2016, 15:52
Huki
sebr @ 7 Mar 2016, 04:42 AM wrote:thx Kenny it's a good start
i was talking about "how many faces you can place of each flag type?"
There is no such limit for each type of face. There is nothing preventing you from setting a single flag for all the polys in a world or ncp.
But there are other considerations:
1) only 1400 transparent polys can be displayed at once.
2) only 4000 shiny polys can be displayed at once.
You should keep these limits in mind when designing a particular part of the track (so there are not too many transparent / shiny polys in a single frame).
Kenny wrote:Looking at the changelog the ncp poly limit apparently changed from 16384 to 65536 with Alpha 12.0802.

I'm not exactly sure though how the former number was calculated, personally I would assume that the original ncp limit was 32767 but maybe I'm missing some other limitation here that is less obvious.
The original re-volt used a 16-bit value to store the ncp index, but the highest 2 bits are used at runtime for some other purpose. That leaves 14 bits only: 2^14 = 16384 (index ranges from 0 to 16383).
Now we use a 32-bit value to store the index, the 31st and 32nd bits are used up as before, potentially leaving 30 bits for the index. However, the file format still uses a 16-bit short for the index, we can't change this without breaking compatibility. So the net gain is that we now use the full 16-bit range rather than only 14 bits as before.

Posted: 07 Mar 2016, 16:54
Kenny
Huki @ 7 Mar 2016, 11:22 AM wrote: The original re-volt used a 16-bit value to store the ncp index, but the highest 2 bits are used at runtime for some other purpose. That leaves 14 bits only: 2^14 = 16384 (index ranges from 0 to 16383).
Ah yes you're right, thanks for pointing it out.

Still, I think the maximum would be 65535 since the file format specifies a count and not an index?
I know that one polygon more or less won't make a difference but it helps to know an exact limit if you want to push the boundaries :P

Posted: 07 Mar 2016, 17:26
Huki
Kenny @ 7 Mar 2016, 04:54 PM wrote:
Huki @ 7 Mar 2016, 11:22 AM wrote: The original re-volt used a 16-bit value to store the ncp index, but the highest 2 bits are used at runtime for some other purpose. That leaves 14 bits only: 2^14 = 16384 (index ranges from 0 to 16383).
Ah yes you're right, thanks for pointing it out.

Still, I think the maximum would be 65535 since the file format specifies a count and not an index?
I know that one polygon more or less won't make a difference but it helps to know an exact limit if you want to push the boundaries :P
I just checked the file format and you're right, it does specify a count. So yes, the maximum would be 65535 and not 65536. :)

Posted: 09 Mar 2016, 23:42
sebr
So if i'm right

about NCP
rv 1.0 : 16384 poly (0 to 16383)
rvgl/alpha : 65536 poly (0 to 65535)

about W
no changes from 1.0 to last alpha : max poly "virtualy unlimited"
- only 1400 transparent polys at once (Mirroring ??)
- only 4000 shiny polys at once (Translucent ??)

And what about double-sided, EnvMap, AddBlending and animated texture ???
(i'm talking about flag face name in Blender)


I'm asking this because i'm converting a track from another game to revolt.
I wish it to be as good as in original game and rv1.0 to last alpha/rvgl compatible

...

Posted: 10 Mar 2016, 03:29
Huki
I've made some corrections:
sebr @ 9 Mar 2016, 11:42 PM wrote:about NCP
rv 1.0 : 16384 poly (0 to 16383)
rvgl/alpha : 65536 65535 poly (0 to 65535) [technically it should support 65536, but the file format only allows 65535)]

about W
no changes from 1.0 to last alpha : max poly "virtualy unlimited" (you must divide the world into cubes (eg, in Blender); each cube can hold 32767 polys)
- only 1400 transparent polys at once (Translucent)
- only 4000 shiny polys at once (Env mapping)
Flags like double-sided have no limit.
EnvMap: see above.
AddBlending: included in translucent polys.
TexAnim: v1.1 supports 16 animation slots. This was changed to unlimited in v1.2 (Alpha 12.0405).

Posted: 10 Mar 2016, 14:24
Kenny
Huki @ 9 Mar 2016, 10:59 PM wrote: you must divide the world into cubes using WorldCut; each cube can hold 65535 polys
Isn't the limit 32767 polys for each cube or was it increased to 65535 in 1.2?

Also thats why I said that it very much depends on the tool/method you're using to create the .w file whether you'll be able to max out these limits or not.
Worst case would be that the exporter puts everything in one cube which would mean that you are bound to the above mentioned cube poly limit.

I just tried to export a .w file using jigebren's blender plugin and it seems like the cubes do get automatically generated, though you'd need to ask him for specifics about the logic and therefore the reachable limits behind it (but I still think that you don't need to worry about that too much here).

So it shouldn't be required to use WorldCut after all, but I would recommend it anyway for the generation of BigCubes which are moreless meant to serve as a performance increase for the level (not sure why he never included the generation of them in the plugin).

Posted: 10 Mar 2016, 23:32
Huki
Kenny @ 10 Mar 2016, 02:24 PM wrote:Isn't the limit 32767 polys for each cube or was it increased to 65535 in 1.2?
Yes you're right, thanks again for the correction.

And yes, cubes can be either automatically generated with worldcut or manually set up in blender. I don't think Blender automatically generates cubes if there aren't any - it's probably up to the user to subdivide the meshes as needed. The plugin leaves that control with the user.
Btw, worldcut requires an already exported .w file, so we can't use it to surpass the 32767 limit anyway. Then the only option is to subdivide the mesh in Blender (and later use worldcut for optimization).

Posted: 11 Mar 2016, 00:56
Gotolei
Are quads counted as one face or two?

Posted: 11 Mar 2016, 01:12
sebr
Gotolei @ 10 Mar 2016, 08:26 PM wrote: Are quads counted as one face or two?
a quad face is only 1 face :P