Jump to content


Photo

SpeedTrees and LOD0


  • Please log in to reply
12 replies to this topic

#1 DPRoberts

DPRoberts

    Advanced Member

  • Members
  • PipPipPip
  • 1,610 posts

Posted 16 July 2017 - 05:56 PM

In finalizing steps of course and now dealing with little things that I have put off for too long. I am convinced that I have no way of getting LOD0 to show in game. I can adjust sliders until the cows come home and I cannot get LOD0 to appear in game. It shows correctly in the editor. Is this a Unity thing? a Speedtree import thing? CF buildout thing?

 

Random palm that has detail in the trunk at LOD0 shown in editor

gj90HCt.jpg

 

Same palm in game - refuses to present LOD0 - this image matches the LOD1 mesh

16Tll7L.jpg

 

My process in the SpeedTree modeler is to save as with assets into a Folder. Then, drag and drop that folder into Unity. Fix normals. Adjust LODs and regenerate materials. Add to the mass tree planting swatch. In game, I have Ultra default settings and have turned the Tree Quality slider up as high as possible (3, I believe).



#2 johnmeyer

johnmeyer

    Advanced Member

  • Members
  • PipPipPip
  • 590 posts

Posted 16 July 2017 - 10:19 PM

There is a LOD bias setting and max LOD level setting in Unity

 

If you go to Edit - Project Settings - Quality

 

Obviously youll need to set Max LOD to 0.

 

LOD Bias seems to cause a bit of discussion as as per the manual it says the the higher the setting the greater detail, but in my and other experience it doesnt quite work that way. I would say if thats set to 1 then LOD change levels will be exactly as set, but prob room for experimenting there.

 

EDIT

 

Just had a quick play and it does seem to work how it says here: https://docs.unity3d...tySettings.html


OGT Simulator Tour Admin

 


#3 Birdie

Birdie

    Advanced Member

  • Members
  • PipPipPip
  • 456 posts

Posted 12 March 2019 - 11:03 PM

I want to bring this up again...

DP, could you manage this issue?

I'm fairly new to speedtrees, just subscribed and bought a tropical package for my course. There is a coconut palm where the hanging coconuts are completely black until i my viewing distance reaches LOD 1 or 0 or so. Then they have there textures visible - at least in Unity. But in game they remain black. In game settings are maxxed.

In Unity i already tried different project settings, LOD  0, high bias, low bias, different LOD ranges without success.

So i ask here again...



#4 DPRoberts

DPRoberts

    Advanced Member

  • Members
  • PipPipPip
  • 1,610 posts

Posted 12 March 2019 - 11:22 PM

I never could get exactly what I wanted.

Guessing your texture only shows on LOD0, which never appears in game regardless of LOD settings.

My only thought would be you could remove LOD1 mesh and materials in Unity. Then, duplicate LOD0 mesh and materials and rename all to LOD1.

By doing this, you are essentially making your Speedtree be LOD0, LOD0 (named LOD1), LOD2.

But, your coconuts should now show in game. Other option is if you have the Speedtree editor and see if you can add that texture and coconuts to LOD1.

If you PM me your tree, I can fiddle with it and see if I can get you something useable.

#5 Birdie

Birdie

    Advanced Member

  • Members
  • PipPipPip
  • 456 posts

Posted 13 March 2019 - 01:30 AM

I couldn't manage to make the coconut appear with your suggestion of copying the LOD 0. The coconut was still "black". Even i don't know if the palm's overall detail was raised. But maybe it was just me doing something wrong...

But before i played a little with the coconut's settings in the modeler. When setting both min and max in ambient occlusion to 1 the coconut shows correctly in game. 

I can send you the tree anyway if you like, but i first have to find out how... :D



#6 Birdie

Birdie

    Advanced Member

  • Members
  • PipPipPip
  • 456 posts

Posted 09 October 2019 - 11:03 PM

I want to warm this up once more as i also think the Speedtree LOD0 is not working correctly in game. While it shows correctly in Unity and maybe also because i edited most Speedtrees to make the "visual gap" between the LODs not too noticable i nearly forgot about it or even was under the impression that it works in game. But no. On my Sassafras trees i only saw a few or only one root down on the trunk so it caught my attetntion again. I made a little one hole testcourse to speed up build times and tested whatever i could to make te LOD0 appear. But no success. Exactly what DP said in the first post.

I'm a little surprised that this issue had not been discussed a lot more? Or have others definitely Speedtrees LOD0 working in game out of the box? I know MJ recently said in another thread it should work... But does it really?

My only workaround now is to select a Speedtree already placed in Unity and in the inspector right-click LOD0 in its LOD group and select "add before". After this i turn LOD1 left to 100%. You can also do this for different Speedtrees at once if you go in debug mode. Then you can add one more in the "size" field but have to adjust all LODs values to make the added one the LOD0 with a 1.0 value which is 100%. 

gY5VQvz.jpg

 

Still interested in others observations regarding this case...

 

 

 



#7 Drrobmiller

Drrobmiller

    Advanced Member

  • Members
  • PipPipPip
  • 529 posts
  • LocationLong island

Posted 10 October 2019 - 01:07 AM

what I noticed is DP is in the ocean course.

 

When is that "AA" gonna be removed and you blow out the candle on that bad boy!

 

Rob



#8 Dropzone73

Dropzone73

    Advanced Member

  • Members
  • PipPipPip
  • 557 posts
  • LocationFinland

Posted 10 October 2019 - 05:45 AM

I want to warm this up once more as i also think the Speedtree LOD0 is not working correctly in game. While it shows correctly in Unity and maybe also because i edited most Speedtrees to make the "visual gap" between the LODs not too noticable i nearly forgot about it or even was under the impression that it works in game. But no. On my Sassafras trees i only saw a few or only one root down on the trunk so it caught my attetntion again. I made a little one hole testcourse to speed up build times and tested whatever i could to make te LOD0 appear. But no success. Exactly what DP said in the first post.

I'm a little surprised that this issue had not been discussed a lot more? Or have others definitely Speedtrees LOD0 working in game out of the box? I know MJ recently said in another thread it should work... But does it really?

My only workaround now is to select a Speedtree already placed in Unity and in the inspector right-click LOD0 in its LOD group and select "add before". After this i turn LOD1 left to 100%. You can also do this for different Speedtrees at once if you go in debug mode. Then you can add one more in the "size" field but have to adjust all LODs values to make the added one the LOD0 with a 1.0 value which is 100%. 

gY5VQvz.jpg

 

Still interested in others observations regarding this case...

Yes, LOD0 is not working correctly in the game. I have also noticed that. In Unity everything is ok, but not in the game.

Most of the trees are fine with that, but there are some that would really need that LOD0, so thanks for the work around! Must try that today.

 

How did you make the "visual gap" between the LODs not too noticable? Did you put it into the fade transition w slot or what? Would be also nice to know.

 

Thanks for your efforts again!



#9 Birdie

Birdie

    Advanced Member

  • Members
  • PipPipPip
  • 456 posts

Posted 10 October 2019 - 06:57 AM

No, but in Speedtree Modeler I adjusted some curves so that trunks don't get to thin or even disappear while you still see the palm's leaves on a farer LOD for example.

#10 DPRoberts

DPRoberts

    Advanced Member

  • Members
  • PipPipPip
  • 1,610 posts

Posted 10 October 2019 - 03:52 PM

No, but in Speedtree Modeler I adjusted some curves so that trunks don't get to thin or even disappear while you still see the palm's leaves on a farer LOD for example.

Good to hear on the above workaround for the SpeedTree. For objects, I've always used LOD0 and LOD1 as the same object. Otherwise, up close, it won't show.

Mike always thought LOD0 might show but blamed it on the Tree settings. I sense it is a JNPG thing only in some way.

As you've seen, the narrow trunks can go from lines to absent in LOD1 and LOD2. Good to hear the curves adjustments allows them to stay visible.

#11 Birdie

Birdie

    Advanced Member

  • Members
  • PipPipPip
  • 456 posts

Posted 10 October 2019 - 04:38 PM

Good to hear on the above workaround for the SpeedTree. For objects, I've always used LOD0 and LOD1 as the same object. Otherwise, up close, it won't show.


Do you mean they won't show up close in Unity? I also get this now at least when LOD bias at 2 in quality settings. When at 0.5 or so they show and lower LOD correctly in Unity as it seems. But such values completely don't transfer to the view in JNPG. There again it seems bias 2 makes more sense. 0.5 takes an endless distance in JNPG to switch to less detail. So what you see in Unity is not what you get in JNPG. But anyway it feels a little more logical or correct now if we have LOD0 too, be it the bias in Unity or the tree detail slider in JNPG.

#12 DPRoberts

DPRoberts

    Advanced Member

  • Members
  • PipPipPip
  • 1,610 posts

Posted 10 October 2019 - 05:21 PM

No, I can always get it to show correctly in Unity. I'll have to check later and see what bias settings I have been using.

#13 Birdie

Birdie

    Advanced Member

  • Members
  • PipPipPip
  • 456 posts

Posted 10 October 2019 - 05:41 PM

No, I can always get it to show correctly in Unity. I'll have to check later and see what bias settings I have been using.


Maybe a benefit of your approach...




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users