I made the switch to Ogre3D (v1.7) and to using PagedGeometry. What I'm trying to do is make a simple scene with a terrain, some trees and grass. In a nutshell, I would like to achieve this kind of effect in Ogre:

Grass Receiving Shadows

Transparent/cut-out shadows are implemented in PagedGeometry demos but I can't find any solution on how to properly cast shadows on grass like the example above.

What technique can I use to accomplish this?

  • 1
    \$\begingroup\$ What kind of material/shader the grass is using ? For the shadowing to work the grass shader needs to read the shadowmap(s) and do shadows calculations based on this ... \$\endgroup\$ Aug 18 '15 at 10:48
  • 1
    \$\begingroup\$ Appreciate your input on this @VB_overflow, but a comment with an actual code solution or example would really help. In any case, I have moved on to a better engine with a built-in functionality offering this feature. Perhaps, it would help other Ogre enthusiasts who are on the same boat with me, as shown with the upvotes here. \$\endgroup\$
    – scottyp
    Aug 18 '15 at 20:20
  • 1
    \$\begingroup\$ If these are billboards, they tend to act a bit funky when you try to do per-pixel shading on them. You can use a grass metch which sort of looks like some sort of jacked up elongated and twisted plane. The texture will make it look like grass. After that, the mesh should be able to receive shadow maps. \$\endgroup\$ Apr 18 '16 at 20:01
  • \$\begingroup\$ Does this post describe (and solve) your problem? ogre3d.org/addonforums/14/t-8945.html \$\endgroup\$
    – Tim Holt
    Jan 9 '18 at 1:30

This is not my answer, but a reference to what I believe is the solution to the question.

The post I am linking to below (titled "paged geometry trees and shadows") directly describes solving the problem of putting tree shadows on grass with paged geometry. It specifically involves calling m_sceneMgr->setShadowTechnique(SHADOWTYPE_TEXTURE_ADDITIVE) with a custom shader for the shadows.

https://www.ogre3d.org/addonforums/14/t-8945.html or Archive.org version.

This tutorial also references paged geometry, trees, grass, and shadows. It applies a lightmap to the grass, use the setColorMap() function.

https://ogrecave.github.io/ogre-pagedgeometry/tut3.html or Archive.org version. It specifically aplplies a lightmap to grass, use the setColorMap() function.

  • \$\begingroup\$ This answer would be better if you take the relevant details from the sites you're linking to and summarize them in the body of the answer itself. As things stand, if the links ever break, the answer would be left completely devoid of useful information. \$\endgroup\$
    – DMGregory
    Mar 4 '18 at 17:15
  • 1
    \$\begingroup\$ I considered including content from the posts, but didn't want to just duplicate someone's content and call it an answer. The solutions are also somewhat code heavy, and quoting them would involve a lot of copied content, which again, isn't my creation. I also considered installing Ogre and trying to duplicate it but that's a lot of work for a few rep points. Irrespective, I think those links would help the OP out, and anyone else trying to solve those problems. I guess to prevent dead links I can link to the archive.org version... \$\endgroup\$
    – Tim Holt
    Mar 5 '18 at 18:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.