Archive 17/01/2023.

Procedural vegetation

Eugene

I have started porting procedural vegetation from my engine onto Urho3D codebase.
Here are reference screenshots from my old demo.


cadaver,
Do you need such functionality in Urho3D core?
If yes, I’ll write code according to your code standard and inside Urho. And I’ll have a lot of questions.
If no, it will be a separate C++11 library over Urho3D.

Update:
This screenshot demonstrates editing of procedural tree.

Update 2:
All related code is stored here

Enhex

Procedural generation isn’t in the scope of a game engine, so I think it should be external library.

yushli

The trees look quite beautiful. Thank you for sharing this. Where can I find the sample project to try out?

Eugene

Unity devs disagree with you.

I don’t want to share my old demo and I haven’t finished porting. I post here as soon as ready.

cadaver

Looks like a beautiful feature. And I agree that it works best as an external library outside Urho.

hdunderscore

Looks nice, I hope to see it shared in some form eventually !

Eugene

It would be cool to have such external libraries that could be easily used by anybody (like assets in Unity).

I can easily create some library and player that wraps and extends Urho.
However, this way looks very limited in the context of extensibility.
I mean that several libraries could be only merged manually.
And matryoshka-like library design is not the best solution.

Do you have any ideas how it could be resolved?

cadaver

I’d recommend just providing the code files and a CMakeLists if appropriate, and some kind of instructions how people can incorporate it in their application. I don’t recommend actually wrapping and extending Urho.

Eugene

Does Urho have any codebase of such external add-ons?
It’s quite hard to find and re-use code from forks… And from threads in ‘Feature Request’ too.

cadaver

I’m not aware of a “god” repository, however what you (or anyone else) can do is to make a PR into Urho’s documentation to the “external links” section to include a link to your project.

Eugene

This screenshot demonstrates editing of procedural tree.

Eugene

Update

All related code is stored here. The code is dirty and unsupported but may still be useful.

yushli1

Thank you for sharing this. Those beautiful trees at least worth adding a sample demo to Urho3D.

Eugene

It would be hard, but I’ll think about it.

RCKraken

@Eugene Hello, I watched your vegetation test, and I was wondering how you went about implementing the wind animations to the leaves of the trees. I have only had experience writing wind animation glsl shaders for grass animation. Thank you,

Orion

Eugene

Check this
https://github.com/eugeneko/Urho3D-Sandbox-Dirty/blob/master/Asset/Architect/Shaders/HLSL/StandardCommon.hlsl
and this
https://github.com/eugeneko/Urho3D-Sandbox-Dirty/blob/master/Source/FlexEngine/Graphics/StaticModelEx.cpp
and this
https://github.com/eugeneko/Urho3D-Sandbox-Dirty/blob/master/Source/FlexEngine/Graphics/Wind.cpp
and Unity manual about wind, cause I copypasted things from there.

RCKraken

Thank you very much!