🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

New Plants & Shadows

Published March 21, 2017
Advertisement

I've been working hard the last week.. firstly I put all the plants so far in the same blender file so I could render all the frames out in an automated fashion rather than manually. It was becoming ridiculous that everytime I wanted to tweak the lighting / depth export I'd have to redo all the files manually. The new process is much easier, I have them all lined up on a stage and move it along as each plant is rendered. Takes about 45 mins but I can go off and make a cuppa.

Here they are all lined up in blender:

backgrounds.png

And here's how I've been making the plants, using ngplant. I gather there is a sapling plugin for doing this in blender, but it seems a bit more time consuming to use than ngplant. I just put in a few branching parameters, load in some leaf textures, then export it as an .obj, then import into blender and fixup the materials. Could be a little quicker with the materials but it's not bad, I can do a new plant in circa 30 mins.

ngplant.png

The depth buffer render was a bit tricky to setup in blender, I used the composite node editor, then everything is run through an external tool to downsize the renders, and batch them up into spritesheets.

Once the new plants were working I finally had a go at getting shadows working again. Having a couple of weeks off from the renderer is really bad for forgetting how it works, but I managed to get the depth write shaders writing a shadow map, and using that to do PCF shadows as each row / column comes into view in the scrolling system. It's a little complex because the view angle for the shadow render is different to the main scrolling system, but it seems to work (just about!). I may end up having 2 long thin frame buffers for the shadow map for horizontal and vertical columns and rows (to save on fill rate) but it's a trade off as I'd have to submit all the geometry twice. For now I'm just using a 360x360 ish shadow map and blurring it loads, as I don't really need sharp shadows.

And here it is all put together (just random map):

5 likes 3 comments

Comments

Aardvajk
Looks great :)
March 23, 2017 01:19 PM
Navyman

Looking awesome!

March 23, 2017 06:50 PM
lawnjelly

Thanks guys. I've got the dynamic shadows working too now, but I might have them switchable or change the dynamic implementation because the PCF version has so many texture reads.

March 24, 2017 10:27 AM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Advertisement