News:

Herr Otto Partz says you're all nothing but pipsqueaks!

Main Menu

Post reply

The message has the following error or errors that must be corrected before continuing:
Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.
Other options
Verification:
Please leave this box empty:
Type the letters shown in the picture
Listen to the letters / Request another image

Type the letters shown in the picture:
What is the title of the ZCT269 track, from ZakStunts season 2023?:
Shortcuts: ALT+S post or ALT+P preview

Topic summary

Posted by Cas
 - December 15, 2021, 08:31:19 PM
Well, for my engine, I would use something similar to what Stunts does, though not the same. Because doing it the "right" way (Blender's way) is actually slower. Yet, it makes sense that Blender does it that way because that is a more general approach that can render anything. For games, things are usually optimised.
Posted by Daniel3D
 - December 15, 2021, 08:01:47 AM
That would work.
You could also make the objects ready for your own engine and the export in two stages. First build the track (like you would for your engine) then export the total.
That way you can later include the code in your engine.
Posted by Cas
 - December 15, 2021, 12:27:17 AM
Ah!  I've just realised that there's one more problem: Z-fighting. Stunts allows for some things to be "drawn" on a surface by giving two polygons the same depth, but assigning one with a Z-bias attribute. The OBJ format and the Blender engine in general do not support this. You either have to create a true depth difference or use a texture, but true depth differences are pretty visible and converting between overlapping polygons and textures is far from trivial.

To make this work well, what I'd suggest is... instead of converting the original track elements on the fly, manually recreate each track element once, making it more Blender-friendly. Then, use this set to recreate the track. Optionally, there could be two sets: one that looks as similar to the original as possible and one that represents what the original was trying to achieve.
Posted by Daniel3D
 - December 14, 2021, 04:44:05 PM
That is true and I agree. I meant mostly that it is detectable. It is not trivial, probably involves some clever programming. But I'm sure it can be done.
Posted by llm
 - December 14, 2021, 04:40:30 PM
Quote from: Daniel3D on December 14, 2021, 04:33:47 PM
The grill is just a texture.

but it would be better to have the grill as real polygon object, images are always bad for system transfer or quality
Posted by Daniel3D
 - December 14, 2021, 04:33:47 PM
Generating wheels and spheres is not really difficult for an export. They are defined and there is a relationship between the 6 vertices and the size and orientation of the wheel.
The same goes for the sphere.
The grill is just a texture.
Posted by llm
 - December 14, 2021, 01:46:49 PM
Quote... if no wheels, no spheres and no grilles.

i think you will add that very fast if the pure exporting is running - its not looking that nice without - that will harm your strive in harmony :)
Posted by llm
 - December 14, 2021, 01:45:01 PM
Quote from: Cas on December 14, 2021, 01:38:33 PM
How curious. The program idea, I was imagining as a simple generator, with no graphics at all. You give it a track, it gives you a 3D file. I can do that more or less quickly if no wheels, no spheres and no grilles.

just do it! :)
Posted by Cas
 - December 14, 2021, 01:38:33 PM
How curious. The program idea, I was imagining as a simple generator, with no graphics at all. You give it a track, it gives you a 3D file. I can do that more or less quickly if no wheels, no spheres and no grilles.
Posted by Daniel3D
 - December 14, 2021, 07:14:39 AM
Quote from: llm on December 14, 2021, 07:01:10 AM
Quote
There is a program made in Unity that does just that.
But although it creates the track I couldn't get textures to work. It also doesn't work with the current version of Unity and you can't export the data.

This one?
https://github.com/cobbpg/stunts-unity
Yes, that one.
Posted by llm
 - December 14, 2021, 07:01:10 AM
Quote
There is a program made in Unity that does just that.
But although it creates the track I couldn't get textures to work. It also doesn't work with the current version of Unity and you can't export the data.

This one?
https://github.com/cobbpg/stunts-unity

Posted by Daniel3D
 - December 14, 2021, 12:40:11 AM
Quote from: Cas on December 10, 2021, 09:36:28 PM
Somebody asked some time ago about a tool to export a Stunts track with all of its elements to a format readable by Blender.
There is a program made in Unity that does just that.
But although it creates the track I couldn't get textures to work. It also doesn't work with the current version of Unity and you can't export the data.
So I'm not sure if it is useful. But definitely possible.
Posted by Cas
 - December 13, 2021, 09:19:18 PM
Sure!  I would like to have that too. Maybe I should start with what's available first. Also, I'm not sure if OBJ would be the best format for such a big thing like transforming the whole track with cars, etc. Perhaps it could perfectly be, but maybe some other of the formats that Blender can recognise will have more features. For example, another thing that OBJ files can't handle is grilles, which are extensively used in Stunts 3D shapes. The easiest adaptation would be to replace that with a transparency index, but it's not the same. I'm not very "proficient" at Blender, but I'm pretty sure there is a way to create grille textures and then apply them in a way that they remain transparent in some parts.
Posted by WillieSLT
 - December 13, 2021, 07:38:01 PM
Quote from: Cas on December 10, 2021, 09:36:28 PM
The reason why you weren't able to open the 3D shapes in CarWorks is because original cars come with its files packed (P3S for the 3D shape and PVS for the dashboard images) and only the RES file (that contains the behaviour information mostly) can be directly read. There's another tool called "stunpack" that comes with Stressed and can be used to unpack these files to 3SH and VSH, which CarWorks can read. Correctly configured, CarWorks will automatically call this tool when reading compressed files. The current version is missing a few things, but does indeed generate the wheels (although it doesn't display them in the 3D view).
Thanks for that explanation. I had read that CarWorks allowed for importing and setup of custom cars, so I figured it was full intended for that after I wasn't able to view the base cars models by default. I was unaware of "stunpack" for Stressed, but thanks for mentioning that!

Quote from: Cas on December 10, 2021, 09:36:29 PM
3D shapes in Stunts are stored in a way that can represent polygons up to 10 sides, but also wheels, points, line segments and spheres. When Stressed and CarWorks export to OBJ, there is nothing they can use to represent anything that's not a polygon, so these items are not exported. It would be possible to make a tool that can export to OBJ in a way that's more oriented towards using the model in Blender and other tools, but without the intention of later bringing the model back to Stunts. In that case, wheels and spheres could be rebuilt as sets of polygons and line segments could be represented as thin polygons. I've considered this at some point. It's some work and it's probably easy enough to just recreate these items in Blender, but maybe one day I'd do that.
Thanks for the explanation of that as well. Once I saw that Stressed broke the pieces down into polygon and non polygon based elements, and it wasn't exporting the wheels/tires, I figured it wasn't possible in either program. If I get around to this idea, I'll either just try and make some simple cylindrical wheels in Blender, or take some existing wheels from a similar AC car if need be for physics. It might not like perfectly smooth wheels/tires in that game.

Quote from: Cas on December 10, 2021, 09:36:30 PM
Somebody asked some time ago about a tool to export a Stunts track with all of its elements to a format readable by Blender. The difficulty would be exactly the same. Both things could be solved with the same procedure.
I think I saw that discussion actually before posting this thread. Totally understandable about the difficulty involved. Would still be interesting to see it though, so mark me down as someone would would like to see it happen someday. 👍
Posted by Daniel3D
 - December 13, 2021, 06:32:49 PM
Then we have the same idea/problem  8)