Home Technical Talk

Creating sprites for vegetation

polycounter lvl 12
Offline / Send Message
riot polycounter lvl 12
I've been looking on the freesdk documentation but I haven't found anything about setting up sprites for custom vegetation. I saw some similar topics on crydev but the websites are offline so I can't view them.

At first I thought that sprites are just another LOD, but then I found that 'use sprites' option on the vegetation tab, so I guess that sprites have to be set up in a specific way for the engine to recognize them as sprites. I'm doing my vegetation in max btw.

So, does anybody know how to set up sprites/imposters for vegetation in the freesdk?

Replies

  • leleuxart
    Offline / Send Message
    leleuxart polycounter lvl 12
    As long as your vegetation is using the Vegetation shader and you paint the object with the Vegetation Tool, it should automatically switch to sprites. I just tried it out with an old tree of mine and the leaves switch out, but not the trunk because it isn't using the Vegetation shader. Make sure "Use Sprites" is checked. I don't think you can make the distance any short though. The default is 1, which you can make it farther if needed, but nothing below 1 changes anything.
  • riot
    Offline / Send Message
    riot polycounter lvl 12
    Thanks for the reply leleuxart!

    My leaves are using the vegetation shader, and the trunk aswell. I have also painted the vegetation with the vegetation tool, and the 'use sprites' options is set to true, but it does no seem to create any sprites for me.

    I guess I will just manually set up a billboard as a LOD mesh. However, the problem now is that it will not face the camera. Maybe a X-Tree will do the trick.
  • leleuxart
    Offline / Send Message
    leleuxart polycounter lvl 12
    Hmm, I haven't messed with vegetation too much in CryEngine, but I tried it earlier and I'm almost positive I had sprites show for me. My leaves went from having detail bending and being very green to no bending and almost white. Did you adjust any of the LOD values? 1 is the default and should suffice, anything higher means you have to be way back for it to switch.
  • riot
    Offline / Send Message
    riot polycounter lvl 12
    No, haven't messed with the lod values since I don't have any lods fot the trees.

    I think I haven't expressed myself clearly enough, I mean, I want the whole tree to be a billboard, a quad with a diffuse+alpha channel like here, not just the leaves. Maybe the leaves do switch to a sprite, but since I have a lot of them I can't notice it and the improvement in performance is almost 0.

    The problem of doing this with lods is that the billboard won't always face the camera. Probably the only option for me is to use the lod+x-trees method.
  • leleuxart
    Offline / Send Message
    leleuxart polycounter lvl 12
    Ah, sorry, I meant LODs for the sprites. Whether or not you have LOD meshes, if you tick "Use Sprites", there is an LOD option for when they appear. 1 is the lowest, but I was wondering if you had changed that on accident or something.

    I've gotten sprites to work myself and it looks like it's replacing the entire mesh, but for some reason the sprites don't have the texture. This is about as far I've gotten though :\

    rlqYxAR.jpg
  • riot
    Offline / Send Message
    riot polycounter lvl 12
    Well, thanks anyways, but if they don't have the texture they aren't really useful. I'll just do the lod+x-tree thing. It should be enough to avoid ending with 2 million polys on screen :poly142:
  • bac9-flcl
    Offline / Send Message
    bac9-flcl polycounter lvl 10
    As far as I understand the sprites are always generated automatically as a billboard depicting whole mesh, and you can't set up a custom one nor you have to use any special setup to make it work.
Sign In or Register to comment.