Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The Collada "-lod:dist" import flag does not work. #7523

Closed
EzraT opened this issue Jan 14, 2017 · 9 comments
Closed

The Collada "-lod:dist" import flag does not work. #7523

EzraT opened this issue Jan 14, 2017 · 9 comments

Comments

@EzraT
Copy link

EzraT commented Jan 14, 2017

Operating system or device - Godot version:
Godot v2.1.1.stable.official
Ubuntu Gnome 16.04 - x86_64
NVIDIA GeForce GTX570 - Driver version: 367.57

Issue description (what happened, and what was expected):

The "-lod" import flag does not work.
When importing a .DAE file containing objects with -lod in their names, Godot is supposed to automatically set Range begin to whatever number is at "-lodxxx", and according to the importer code, it is also supposed to set Range end to 100000.
It currently does not do any of these things, for as far as I can see.
Link to Q&A post

Steps to reproduce:

  1. Create a scene in blender and include objects named like this: some_mesh-lod10 etc.
  2. Export the scene with the Better Collada Exporter, and import to Godot 2.1.1.
  3. Open the imported scene in the Godot editor and check the Range begin and Range end properties.
@bojidar-bg
Copy link
Contributor

It is actually -lod.dist, due to a bug with the current implementation (e.g. tree-lod.6) 😞

@EzraT
Copy link
Author

EzraT commented Jan 14, 2017

I changed my object names to what you described, (Cylinder-lod.10 etc in this case), but it's still not working.

https://www.dropbox.com/s/669xqmn7mwaea1v/lodtest.dae
Here is the .DAE file I use to test this with, not sure if it helps but here it is anyway.

@bojidar-bg
Copy link
Contributor

image
Here is my scene in blender with was working AFAIK.

@EzraT
Copy link
Author

EzraT commented Jan 14, 2017

selection_001

I restructured my blender scene the same way you did and re-imported again, but still no go.
Could you attach the .blend file you used?

@bojidar-bg
Copy link
Contributor

@EzraT Ok, that's weird, probably my blend didn't work either then.

@AshSamir
Copy link

i have the same issue, same version but under windows.

@wombatstampede
Copy link
Contributor

wombatstampede commented Oct 4, 2017

The problem/error is that _teststr(name,"lod") is used in editor_scene_import_plugin.cpp.
_teststr only checks for "-lod" at the end of the name and will return false if a parameter value is added.

But there's a workaround:
Use "$" instead of "-"
Because teststr_ accepts the string anywhere in the name if "$" is used.

Name the objects like this:


any_parent_mesh_name
  any_child_name$lod:20

This is verified with godot 2.1.4. There can be any or no char between lod and the value. So these are also valid:
name$lod20
name$lod.20

Import won't support multiple lod levels. So just one parent and a lod child. (Except you write your own import script)

@EzraT
Copy link
Author

EzraT commented Feb 24, 2018

@wombatstampede Thanks for the clarification; I think I'll just setup my LOD levels manually in my 2.1 projects if thats the case.

@akien-mga akien-mga changed the title The "-lod:dist" import flag does not work. The Collada "-lod:dist" import flag does not work. Aug 21, 2019
@Calinou
Copy link
Member

Calinou commented Jun 14, 2020

Closing, as the LOD system will be reimplemented from scratch in Godot 4.0: godotengine/godot-proposals#692

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants