Jump to content

  • Log In with Google      Sign In   
  • Create Account

Calling all IT Pros from Canada and Australia.. we need your help! Support our site by taking a quick sponsored surveyand win a chance at a $50 Amazon gift card. Click here to get started!


Member Since 03 Oct 2000
Offline Last Active Aug 25 2015 06:40 AM

#5213979 An alternative to the Sponza mesh for demos?

Posted by Tessellator on 02 March 2015 - 11:43 AM

I went looking for a similar thing when the sponza got a bit boring and I quite like the Natural History Museum model from here: http://www.3drender.com/challenges/

IIRC it might require a bit of tidy up with the materials (but it's been a long time since I grabbed it).

#5208167 Propagating data through an engine to constant buffers

Posted by Tessellator on 02 February 2015 - 05:00 AM

Just throwing in another idea that's a slight change on the render key approach that I'm trying recently:


In my hobby engine I maintain a list of sorted material instances - they're sorted by state, shader, texture and hashed constant data. They don't need much sorting after being loaded (changing material params or streaming in new materials requires another small re-sort). I sort these much like you would with a render key and maintain a list of indices into the material instances. Additionally, each material instance also knows its sorted index.


When I render, rather than trying to pack lots of info into the render key, I make use of the fact that the material instances are already sorted and simply use the material instance's sorted index + mesh data (vb/ib handles munged together) to then sort the data. I can also pack depth in at this stage since I don't need much space for material index (14 bits currently and that's overkill for my needs).

#5163277 UE4 IBL / shading confusion

Posted by Tessellator on 27 June 2014 - 01:13 PM



1) As far as I can tell, the metallic parameter controls how the primary colour is used i.e. whether it goes into diffuse (metallic == 0) or into specular (metallic == 1) or a mix somewhere in between. When metallic == 1, the diffuse colour is black (0), when metallic == 0, the specular colour is assumed to be 0.04 (which is typical for the majority of non-metals as they tend to lie between 0.02 and 0.05 for common things). Perhaps something similar to this in shader terms:

vec3 diffuse = mix(colour, vec3(0, 0, 0), metallic);
vec3 specular = mix(vec3(0.04, 0.04, 0.04), colour, metallic);


2) I *think* the cavity map is multiplied by the resulting specular value to help darken it - light from an environment map tends to look a little too bright in small creases without proper occlusion being taken into account, so this is a reasonable work around for it. They no longer need a separate specular input (except for special cases) as it's handled by the single colour input and the metallic parameter.

#5066381 What tone-mapping technique are you using?

Posted by Tessellator on 31 May 2013 - 05:32 AM



Regarding getting light values for things - I've had some success capturing my own with some of the light metering iOS apps (e.g. LightMeter by whitegoods). I doubt it's super accurate, but it does a good job illustrating how crazily different light values can be.


Although I've worked with engines that use tone mapping for some time, I've not dabbled with anything using real-world values. At home I'm starting from scratch and trying out something with realistic values. I was searching for some docs covering local and perceptual tone mappers, and found this fairly gentle paper: http://aris-ist.intranet.gr/documents/Tone%20Mapping%20and%20High%20Dinamic%20Range%20Imaging.pdf



#5065812 Generating Cube Maps for IBL

Posted by Tessellator on 29 May 2013 - 08:16 AM


ATIs CubeMapGen does what you want and although it's no longer being updated the source is available: http://developer.amd.com/resources/archive/archived-tools/gpu-tools-archive/cubemapgen/

IIRC in a recent presentation on the new Killzone, one of Guerrilla's devs said that they'd modified the code to match their BRDF when doing the integration, so material roughness is treated uniformly for all light types.

Oh, and this is handy for some of the background and rolling your own: http://www.rorydriscoll.com/2012/01/15/cubemap-texel-solid-angle/


* Hmmm, not so sure it was Guerrilla now... I'll have a look and edit the post if I find different.

#5060556 Per-polygon self shadowing problem with stencil shadows

Posted by Tessellator on 09 May 2013 - 07:00 AM

I always thought this was a nice solution to the issue, albeit more expensive to compute the edges: http://www.sjbrown.co.uk/2004/05/11/continuous-silhouettes/

I've given it zero thought but it seems likely this could be implemented nicely on GPU nowadays.



#4944045 Scalable UI

Posted by Tessellator on 28 May 2012 - 09:14 AM

Creating multiple sets of assets at differing resolutions seems to be a fairly popular solution to the problem - I can't remember the game right now, but I know one popular (although fairly old) RTS did that.

The other thing you can try is to break your UI elements up into corner, edge and center pieces that you manipulate in different ways. This is often referred to as scale 9 (see here: http://jessewarden.c...ilverlight.html). It adds some complexity to things but is used in Flash regularly.

Depending on your UI style, you could create the entire thing from geometry and avoid bitmaps entirely. :)