Page 1 of 1
Posted: 21 Jun 2012, 05:13
hi-ban
My suggestion from a track-making point of view:
Currently, Re-Volt supports FIN (instance data) files up to 14KB. It would be great that the limit could be raised to 64KB (or at least 48KB).
Yes, i am in a situation in which i need more than 14KB. I am using many instances which the collision model is different than the instance model, so i can't use rvglue with those.
So an increase of the FIN file size limit would be great.
Posted: 21 Jun 2012, 15:59
KDL
that's not actually the problem (file size) because the size has nothing to do with limits.
Actually the problem is:
Code: Select all
#ifndef _N64
#define MAX_INSTANCES 200
#define MAX_INSTANCE_MODELS 64
#else
#define MAX_INSTANCES 100
#endif
Making maximum number of instances that can be loaded to 200 and Maximum Edit mode to 64.
Fixing should be easy ( modifying the limits ).
Posted: 21 Jun 2012, 16:10
hi-ban
Increasing the limits to,lets say 8x the current limit would be excellent, as it would increase the possibilities of track-making. (and would solve my current problem with a track i'm making)
Posted: 21 Jun 2012, 16:42
KDL
Actually not sure if it's still active or not RV 1.2 development but it's better for now to glue the pieces using rvglue.
Posted: 21 Jun 2012, 17:15
jigebren
hi-ban @ Jun 21 2012, 12:43 AM wrote: I am using many instances which the collision model is different than the instance model, so i can't use rvglue with those.
Can you give us a bit more details about what you're trying to do? Having to use more than 64 different instance models sounds a bit overkill, so I guess there's should be a better workaround.
For info, if each collision model coincide with the instance model it belongs to (that is to say, each visible plane of the instance can be collided with), I guess that's something that should be possible using eg. my Blender addon (as you can import all instances and export them as collision data).
Posted: 21 Jun 2012, 17:26
Dave-o-rama
He's referring to the size of the .fin file (how much a single .fin can hold). Though I'd have to admit raising the limit you're thinking of can't hurt either
Posted: 21 Jun 2012, 18:04
hi-ban
I am using only about 12 or 15 different instance models for now, but i don't think i will reach 64. As dave has said, my problem is that the .fin file data limit is too low.
Posted: 21 Jun 2012, 20:27
Huki
@hi-ban: The current setup allows 64 different instance models, and 200 instances totally. The .fin file only stores some basic information about each of the 200 instances (such as the prm file name and the position where it is placed). I think you're basically asking to increase the 200 limit. So we're wondering what exactly you are trying to do, and whether it is possible to workaround the issue. For example are you trying to place more than 200 instances, and if so, can't you just merge the extra instances into the world file?
Posted: 21 Jun 2012, 21:34
hi-ban
Yes, i am asking to increase the 200 limit to something higher. As an example, i've calculated that my track may end up having around 1000-1400 instances (without using rvglue, of course).
For my track i am using instances to make grass fields with actual grass (instead of just green-painted terrain)
I have done a small, medium and large grass instances, which i use in different situations. Each instance consists of the terrain, which have collision for cars to drive through it, and the "grass plants" which have no collision, all in the same instance. (see pic of the WIP track)
http://img.photobucket.com/albums/v629/ ... roject.jpg
The track requires more than 200 "grass" instances (i think that around 500-600, and another 500-800 for stones, trees, walls, etc...). But if i use rvglue to glue them to the .w file, the "grass plants" get collision. So i can't just glue the grass parts.
Ii think it may be possible to workaround by splitting each grass instance into "terrain" and "grass plants" and "glueing" them into the .w file (one with collision, and the other without it), but, apart from being a lot of extra work, i've read that .w files also have a polycount limit, so i really don't know if it will work.
When reaching the 200 limit, the game still runs at 60 fps, so i think that increasing the 200 instances limit would not be a problem (texture size limit has already been increased and works ok) and it would expand the possibilities of the game, allowing to create more detailed tracks.
Posted: 21 Jun 2012, 21:54
Pranav
hi-ban @ Jun 21 2012, 09:34 PM wrote: i've read that .w files also have a polycount limit, so i really don't know if it will work.
I guess there's no poly limit to .w file but there's a limit to ncp collision file (16000 polies, maybe).
Posted: 21 Jun 2012, 22:30
Dave-o-rama
Pranav @ Jun 21 2012, 12:24 PM wrote: I guess there's no poly limit to .w file but there's a limit to ncp collision file (16000 poly, maybe).
.w files have, I believe a 32768-poly limit. Not completely sure about that, though.
Posted: 21 Jun 2012, 22:43
hi-ban
Dave-o-rama @ Jun 21 2012, 06:00 PM wrote: Pranav @ Jun 21 2012, 12:24 PM wrote: I guess there's no poly limit to .w file but there's a limit to ncp collision file (16000 poly, maybe).
.w files have, I believe a 32768-poly limit. Not completely sure about that, though.
That's the point. When making more detailed tracks and glueing everything, at some point you will run out of collision polys in the ncp file, so you will again need to use instances. And, at some point, you will also run out of instances.
I'm sure that the engine can handle much more instances than the current limit, so why not having the option? (especially if it's so easy as changing a couple of numbers in the source code)
It would be a nice improvement for the next RV update.
Posted: 22 Jun 2012, 01:17
urnemanden
Dave wrote:.w files have, I believe a 32768-poly limit. Not completely sure about that, though.
uh, I don't think that's true. Bone Island, one of my older tracks, consists of over 100,000 polygons in the world file which also is why the FPS is so terrible. Another track of mine, JungleVolt, is approximately 60,000 polygons. I think Pranav got the NCP polygon limit about right tho.
hi-ban wrote:Yes, i am asking to increase the 200 limit to something higher. As an example, i've calculated that my track may end up having around 1000-1400 instances (without using rvglue, of course).
In this case I would actually say you are doing the right thing by asking for a higher limit than glueing them into the world file. That way, people who are using older machines can turn your instances off through Render options if the grass results in a bad FPS.
hi-ban wrote:The track requires more than 200 "grass" instances (i think that around 500-600, and another 500-800 for stones, trees, walls, etc...). But if i use rvglue to glue them to the .w file, the "grass plants" get collision. So i can't just glue the grass parts.
Assuming you are done modifying the *.NCP file, you can simply take a backup of the file, use RV Glue and glue the grass plants into the *.w file and then remove the new *.NCP file and use the old one. That way the grass plants shouldn't have any collision. In your situation though, I wouldn't recommend this though as the grass plants are all copies of each other and it therefore isn't efficient to store them as unique polygons in the world file.
Posted: 22 Jun 2012, 09:02
Dave-o-rama
urnemanden @ Jun 21 2012, 03:47 PM wrote: Dave wrote:.w files have, I believe a 32768-poly limit. Not completely sure about that, though.
uh, I don't think that's true. Bone Island, one of my older tracks, consists of over 100,000 polygons in the world file which also is why the FPS is so terrible. Another track of mine, JungleVolt, is approximately 60,000 polygons. I think Pranav got the NCP polygon limit about right tho.
I never said I was right about that, did I?
Pranav is right about the 16000 solid surfaces, though. Now excuse me while I pick my jaw up off of the floor at the thought of all those polies...
Posted: 22 Jun 2012, 12:50
KDL
NCP:
Not sure but, I think I found this in the code
Code: Select all
#define GRIDINDEX_MASK 16383 // First 12 bits give the poly index (means max of 8191 collision polys)
In that case, only 8191 collision polygons are allowed (that's equivalent to 16383 visual poly) which maybe true (16383 = half of short)
W:
It loads Long meshes (cubes) and short poly number + short vertex number for each mesh.
the limits in Re-Volt are actually:
16,64,128,256,1024,16384,32768,65536
and represent, max memory allocations for vertex (3D point with UV information and color), polygons (assembly of 3 or 4 points), maximum number of something (texture animation = 16 for example)
----
General offtopic information: About The short, long's length (the integer family)
1- It's from -2^(2^n-1))
(-22n-1)
and can reach 2^(2^n-1)) -1
(22n-1) - 1 (since zero takes part)
2^
2^n <-- this last one is called the length (needed if you're a binary coder/decoder)
for example :
Byte: -128..127
Short: -2^15..2^15-1 (-32768..32767)
Unsigned Short [start from 0, but it's short]: Short: 0..2^16 -1 (0..65636)
Long: 2^31
ULong: 2^32
Posted: 25 Jun 2012, 23:24
Huki
@hi-ban: I see what you're trying to achieve. We could indeed update the re-volt limits when they are really in the way (and can be safely increased). On the other hand, some of the limitations you are facing are just a consequence of using outdated tools. It's not a good idea to workaround those issues by altering the game itself. With that said, I'll try to address your limit issues now..
Instances:
For grass and terrain, you are using small pieces of different shapes, and each piece has a separate visual and collision mesh. When putting them together, you could merge all the pieces in one area of the track into one big piece (in Blender, you can merge the visual and collision mesh pieces and export them separately).
That will already reduce the number of grass pieces if you plan on adding them as instances. You can also avoid instances altogether (perhaps saving them for rocks and trees): in Blender, you would first export the W file with only the main world mesh and visual grass pieces in the scene (remove or hide the grass collision pieces). Then export the NCP file with only the main world mesh and grass collision pieces in the scene. Walls too are better exported as part of the World file.
I still agree 200 instances are quite low - especially compared to 64 allowed models. For the next release, I think we can increase the limit to 800.
World:
The World file limit is not something to worry about - unless the entire World is one single mesh, which it's not supposed to be. The game can support virtually unlimited number of "cubes", each cube can have virtually unlimited number of meshes, and each mesh can have about 32000 polys - although in reality if cubes and meshes are used this way, each mesh would only contain a few ten polys.
You don't have to worry about the poly count until you're done with the world. Just finish and export the World file in any way you want, and then use the
WorldCut tool to automatically insert polys into meshes and cubes in a way optimal for the re-volt engine.
Collision NCP:
World and Instance collision polys are altogether limited to 16383. So just converting the final World file to NCP is not enough for complex tracks (then the collision mesh is just a duplicate of the world mesh, so the limit can be easily reached). You will need to manually edit the collision mesh (with Blender) after creation and reduce polys. You can delete polys in unreachable areas and merge faces together wherever possible (when there is no significant change in the terrain). Merging tris into quads should also help.
Just compare the Supermarket 1 World and NCP files in Blender for example. The World contains about 10000 polies while the collision mesh was reduced to a 1000 polies...
Posted: 28 Jun 2012, 00:19
hi-ban
thanks for the tips. they will come handy , especially in the track i'm currently doing, in which there is a flat mesh of about 4000-5000 polys, which now will have a collision of only 2 polys.