Some questions about doing low poly fences

The place for artists, modellers, level designers et al to discuss their approaches for creating content for OGRE.
Post Reply
User avatar
duststorm
Minaton
Posts: 921
Joined: Sat Jul 31, 2010 6:29 pm
Location: Belgium
Contact:

Some questions about doing low poly fences

Post by duststorm » Sun Sep 26, 2010 3:18 pm

Hi,
I'm relatively new to creating low poly 3d content and have some questions about how I can make fences with few polygons.

In my scene I want to have a lot of these so I'm looking for the most efficient way of doing them.
I thought about minimizing the amount of polygons by putting a texture with alpha of the bars on a single non-culled (two-sided) plane.
However, with this technique I run into problems at further distances.
fence_problem1_small.jpg
Fence up close
Up close everything is fine
fence_problem2_small.jpg
a little further
But the bars start disappearing quickly
Image
And soon they are not visible anymore

I think this is due to anti-aliasing/mipmapping of the textures.
After some reading I tried using the alpha to coverage technique, but this didn't change anything. Maybe this was because my hardware/drivers don't support a2c (linux, intel graphics), but anyway, I want a solution that works everywhere.

What could be a solution? Would it help defining my own mip maps for the texture, making sure the bars are wide enough on every mipmap level? And if so, how would I do this?

I also have a second question. Would this technique be the most optimal in terms of performance, when there a lot of such fences in a scene, or would the high amount of "holes" in the transparent textures cause a lot of slowdowns?
For the previously shown fence I believe I don't have much choice other than a transparent texture, but for this one I have an alternative.
fence.jpg
Another fence
Again the bars are a texture with alpha on a plane.
Would it be faster if I did each bar with a separate plane, without transparency, or would the increased amount of polygons only lead to a slower framerate?

These are a lot of questions but I hope someone can help me out here ;)
Last edited by duststorm on Fri Jun 17, 2011 12:28 am, edited 1 time in total.
0 x
Developer @ MakeHuman.org

User avatar
metaldev
Orc Shaman
Posts: 761
Joined: Thu Mar 17, 2005 11:56 pm
Location: Boston
Contact:

Re: Some questions about doing low poly fences

Post by metaldev » Sun Oct 10, 2010 4:29 am

What could be a solution? Would it help defining my own mip maps for the texture, making sure the bars are wide enough on every mipmap level? And if so, how would I do this?
yes, if you require fences, the best way is to define your own mip maps. Otherwise you will forever be fighting jaggies and disappearing depending if you are culling or using a full 8 bit channel for alpha.
Another way could be with LOD, you could swap into a model that uses a different texture altogether that is more fitting with its required distance.


I would avoid representing fence meshing with geometry.


/imho
0 x

User avatar
duststorm
Minaton
Posts: 921
Joined: Sat Jul 31, 2010 6:29 pm
Location: Belgium
Contact:

Re: Some questions about doing low poly fences

Post by duststorm » Sun Oct 10, 2010 9:21 am

Thanks for the advice :)
I have it a little more under control now by using a -1 mipmap bias. Anisotropic filtering on the alpha textures seemed to help a bit also, but I don't think I want the extra performance hit.
On graphics cards (and drivers) that support the alpha2coverage technique there are almost no issues, but as said before that technique does not work on every system.

I believe I will settle with making .dds textures with custom mipmap levels where I widen the bars, leaving A2C enabled for systems that support it.
0 x
Developer @ MakeHuman.org

User avatar
duststorm
Minaton
Posts: 921
Joined: Sat Jul 31, 2010 6:29 pm
Location: Belgium
Contact:

Re: Some questions about doing low poly fences

Post by duststorm » Tue Aug 14, 2012 2:12 pm

A follow up to one of my old posts:
I recently came upon this article which deals with the same problem. The solution proposed here is calculating the mipmaps with a special technique in code. From a quick glance, it is my understanding that it is an improved version of "alpha to coverage".
0 x
Developer @ MakeHuman.org

User avatar
Zonder
Ogre Magi
Posts: 1133
Joined: Mon Aug 04, 2008 7:51 pm
Location: Manchester - England
x 22

Re: Some questions about doing low poly fences

Post by Zonder » Fri Aug 17, 2012 3:48 am

I always thought don't use mipmaps.

but if you give the alpha a negative infulance and the rest a positive it should enhance. like a sharping matrix this off the top of my head.

(drunk as a skunk atm so maybe discount this)
0 x
There are 10 types of people in the world: Those who understand binary, and those who don't...

User avatar
areay
Bugbear
Posts: 819
Joined: Wed May 05, 2010 4:59 am
Location: Auckland, NZ

Re: Some questions about doing low poly fences

Post by areay » Tue Aug 28, 2012 6:09 am

Zonder wrote:I always thought don't use mipmaps.

but if you give the alpha a negative infulance and the rest a positive it should enhance. like a sharping matrix this off the top of my head.
Hi Zonder, your post makes no sense
Zonder wrote: (drunk as a skunk atm so maybe discount this)
Oh...... :lol: :lol:
0 x

Post Reply