News:

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

Main Menu

Exporting 3D Car Models with Tires/Wheels

Started by WillieSLT, December 10, 2021, 01:30:14 AM

Previous topic - Next topic

Daniel3D

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.
Edison once said,
"I have not failed 10,000 times,
I've successfully found 10,000 ways that will not work."
---------
Currently running over 20 separate instances of Stunts
---------
Check out the STUNTS resources on my Mega (globe icon)

llm

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


Daniel3D

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.
Edison once said,
"I have not failed 10,000 times,
I've successfully found 10,000 ways that will not work."
---------
Currently running over 20 separate instances of Stunts
---------
Check out the STUNTS resources on my Mega (globe icon)

Cas

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.
Earth is my country. Science is my religion.

llm

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! :)

llm

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 :)

Daniel3D

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.
Edison once said,
"I have not failed 10,000 times,
I've successfully found 10,000 ways that will not work."
---------
Currently running over 20 separate instances of Stunts
---------
Check out the STUNTS resources on my Mega (globe icon)

llm

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

Daniel3D

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.
Edison once said,
"I have not failed 10,000 times,
I've successfully found 10,000 ways that will not work."
---------
Currently running over 20 separate instances of Stunts
---------
Check out the STUNTS resources on my Mega (globe icon)

Cas

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.
Earth is my country. Science is my religion.

Daniel3D

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.
Edison once said,
"I have not failed 10,000 times,
I've successfully found 10,000 ways that will not work."
---------
Currently running over 20 separate instances of Stunts
---------
Check out the STUNTS resources on my Mega (globe icon)

Cas

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.
Earth is my country. Science is my religion.

Quick Reply

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.

Name:
Email:
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 ZCT260 track, from ZakStunts season 2023?:
Shortcuts: ALT+S post or ALT+P preview