blender-driving-scenario-creator icon indicating copy to clipboard operation
blender-driving-scenario-creator copied to clipboard

Generate xodr file corresponding to fbx file

Open lili124 opened this issue 2 years ago • 4 comments

Hi, I have a fbx file that I generated using 3ds Max. Can I use the blender-driving-scenario-creator to generate this fbx file corresponding to xodr file, and then import them into Carla for use? image

lili124 avatar Apr 23 '22 14:04 lili124

I haven't tried but it should be possible like this:

  1. Export from 3ds Max
  2. Import in Blender
  3. Draw roads
  4. Export everything together with the export button

johschmitz avatar Apr 23 '22 14:04 johschmitz

image

Do you mean to draw the road as shown in Figure 1? When I import the fbx file, the following xodr file is generated, and the xodr file's content is shown in Figure 2. This xodr file does not seem to be normal.

image

lili124 avatar Apr 24 '22 10:04 lili124

@lili124 I am not sure if I understand exactly what you would like to do.

You can not automatically create a corresponding OpenDRIVE by importing any 3D models no matter if fbx, gltf or another format. The information about the road network is simply not contained in the file. Potentially, in the future there could be an extension to the USD format where we could attach such information to the file but currently such a single file solution does not exist. Also importing OpenDRIVE is currently not implemented in my add-on at all. It would be possible but a lot of extra work to do and is low on my priority list.

What you could do is import all the surrounding 3D models into blender and then (re)create the road using the add-on and then export everything together. Maybe that is not what you want? May I ask what is the reason for creating content in 3ds Max? Does it have a very good road generator or something like that?

Edit: One more question to make sure we are on the same page, when you do not import anyting and just use the Blender add-on to create some roads and export, does it work for you?

johschmitz avatar Apr 24 '22 11:04 johschmitz

Thank you very much for your reply. I've created the .fbx file in 3ds Max, but in fact blender does the job as well. What I really want to do is generate a map and use it in CARLA, the map file consists of a .fbx file as well as a .xodr file.

lili124 avatar Apr 25 '22 02:04 lili124

It is possible to create a map and export as .xodr + .fbx, simply choose the .fbx option in the export dialog. What is currently not possible is to import an existing OpenDRIVE file and then create an .fbx mesh for that one. I am closing this. Feel free to open a new issue if you have further specific questions.

johschmitz avatar Oct 14 '22 13:10 johschmitz