Author Topic: Exporting 3D Car Models with Tires/Wheels  (Read 1318 times)

Daniel3D

  • Tunnel Twister
  • ***
  • Posts: 1383
  • so many ideas....
    • View Profile
    • Stunts resources.
Re: Exporting 3D Car Models with Tires/Wheels
« Reply #15 on: December 14, 2021, 12:40:11 AM »
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 or 4D Sports Driving.

llm

  • Otto's Student
  • **
  • Posts: 376
    • View Profile
Re: Exporting 3D Car Models with Tires/Wheels
« Reply #16 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


Daniel3D

  • Tunnel Twister
  • ***
  • Posts: 1383
  • so many ideas....
    • View Profile
    • Stunts resources.
Re: Exporting 3D Car Models with Tires/Wheels
« Reply #17 on: December 14, 2021, 07:14:39 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 or 4D Sports Driving.

Cas

  • Highway Horror
  • ****
  • Posts: 1430
  • Think different. That's OK... as long as you think
    • View Profile
    • Dimioca Labs
Re: Exporting 3D Car Models with Tires/Wheels
« Reply #18 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.
Earth is my country. Science is my religion.

llm

  • Otto's Student
  • **
  • Posts: 376
    • View Profile
Re: Exporting 3D Car Models with Tires/Wheels
« Reply #19 on: December 14, 2021, 01:45:01 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

  • Otto's Student
  • **
  • Posts: 376
    • View Profile
Re: Exporting 3D Car Models with Tires/Wheels
« Reply #20 on: 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 :)

Daniel3D

  • Tunnel Twister
  • ***
  • Posts: 1383
  • so many ideas....
    • View Profile
    • Stunts resources.
Re: Exporting 3D Car Models with Tires/Wheels
« Reply #21 on: 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.
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 or 4D Sports Driving.

llm

  • Otto's Student
  • **
  • Posts: 376
    • View Profile
Re: Exporting 3D Car Models with Tires/Wheels
« Reply #22 on: December 14, 2021, 04:40:30 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

  • Tunnel Twister
  • ***
  • Posts: 1383
  • so many ideas....
    • View Profile
    • Stunts resources.
Re: Exporting 3D Car Models with Tires/Wheels
« Reply #23 on: 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.
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 or 4D Sports Driving.

Cas

  • Highway Horror
  • ****
  • Posts: 1430
  • Think different. That's OK... as long as you think
    • View Profile
    • Dimioca Labs
Re: Exporting 3D Car Models with Tires/Wheels
« Reply #24 on: 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.
Earth is my country. Science is my religion.

Daniel3D

  • Tunnel Twister
  • ***
  • Posts: 1383
  • so many ideas....
    • View Profile
    • Stunts resources.
Re: Exporting 3D Car Models with Tires/Wheels
« Reply #25 on: 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.
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 or 4D Sports Driving.

Cas

  • Highway Horror
  • ****
  • Posts: 1430
  • Think different. That's OK... as long as you think
    • View Profile
    • Dimioca Labs
Re: Exporting 3D Car Models with Tires/Wheels
« Reply #26 on: 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.
Earth is my country. Science is my religion.