0 votes

I am trying to add objects with LOD to a scene created in Blender, to be exported to DAE with the better collada plugin.

The "Import 3D Scene" window lists "Create LODs (-lod:dist)" as an import option under "Create".

I've tried naming my LOD objects like so: Cylinder-lod:1, Cylinder-lod:2 and so forth, but after importing the .DAE file into Godot, the objects LOD properties (Range Begin and Range End) are both still just set to 0.

Am I doing something wrong here? Can anyone clarify how I'm supposed to properly use this?

Thanks in advance.

asked Jan 13, 2017 in Engine by CrazyDisplay (15 points)

I'm fairly sure it just doesn't work. I've tried using it multiple times, but nothing got it working.

Yeah, I'm beginning to think the same thing, I've tried a few different ways to name the objects but nothing gives.

2 Answers

0 votes

it searches for lodxxx
from the source:

String d=str.substr(str.find("lod")+3,str.length());
//some  ifs
float dist = d.to_double();
mi->set_draw_range_begin(dist);
mi->set_draw_range_end(100000);

Update
Cant get this to work. In the latest version they commented "setdrawrange_begin" out, so i gues it didnt work. But i couldnt find an issue related to this.

answered Jan 13, 2017 by ingo_nikot (280 points)
edited Jan 14, 2017 by ingo_nikot

Oh, that's a shame, thanks for taking the time to check it out anyway.
Is there any dev that could comment on this? I would really like to use this feature.

i changed my awnser just the moment you commented. pls read again :)

I see, so if I understand this correctly, I should be naming objects like this: some_mesh-lod10?

Edit: I tried the naming I mentioned above and both range begin and range end are still set to 0.

i will try it later, another code chunk:

if ((_teststr(name,"lod"))) {
        str=name; 

did try, did not work. I think its broken.

Alright, thanks again for looking into it, if the devs commented that specific part of the code then they probably already know it doesn't work, but i'll post a bug report on this anyway.

Update:
Link to Github issue

0 votes

At the moment you have to use "$lod" instead of "-lod" because of an error.

Make the reduced detail lod mesh the child of the original mesh. Then name it with $lod:<value>.

So the structure in i.e. Blender is like this.

any_parent_mesh_name
  any_child_name$lod:20

Import won't support more than two lod levels. So just one lod child.
For more levels you'd have to write your own import script.

answered Oct 4, 2017 by wombatstampede (538 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.