HeroEngine Forums
Welcome, Guest. Please login or Register for HeroCloud Account.

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - McIndus

Pages: [1]
Art & Art Pipeline / Dynamic Detail "Popping" Issue
« on: Jan 27, 18, 03:24:51 PM »
I am having some strange issues with Dynamic Details loading upon crossing area seams.
Here's a video with the entire process and my audio explanation of this issue:

I know that if I paint from one area into an area that i'm not currently -in-, that my details may vanish when I cross the area seam -- however, this is NOT the issue I'm running into.

Sarrene painted some billboard grass (Dynamic Details) in an area, and when I walk into that area with my character, the grass disappears like so:

Which is interesting because the grass originated from the area that i'm loading -into-.

I then painted billboard details myself and the details 'popped' back into existence immediately:

So I was wondering what was going on... was it me painting dynamic details or just effecting the heightmap?  I then reproduce this 'popping back' using other methods:

Painting a Texture:

Modifying Height:

This is an issue that I also see happening in Repop when you cross an area/zone line into the next, and doesn't seem to happen while crossing heightmap seams within the same area/zone.

Omzy's Advanced Texture Shader
For use with HeroEngine

Hello fellow Dev's!
We at Odyssey of Ydris have been working hard creating our world these past few months, and in the process we have created a Texture Splatter shader for use with HeroEngine that revolutionizes the way texture layering is processed by the engine.  This shader is merely a few lines of code injected into an existing .fx shader file within your repo. 

You can read more about how to use custom shaders here:

I was working in our world when I became frustrated with the way opacity blending worked.  There were textures that faded into nothingness, and unless you became extremely creative with alpha layers, you couldn't really create realistic layering effects with your terrain textures.  I ran across this article (http://www.gamasutra.com/blogs/AndreyMishkinis/20130716/196339/Advanced_Terrain_Texture_Splatting.php) which explains the math and the process for creating more realistic layering, and directed it to Omzy, our owner/programmer/developer.  In response, he provided me with this shader, and we're sharing it with the community!

This custom shader replaces the normal opacity function on all layers except the bottom layer.

In order to create 'depth', you must use the alpha layer of the normal map (currently only for spec).  To do this, create a heightmap/bump map of your texture and blend it with your spec map, so that the image has pronounced highs/lows. (you can modify/tweak this later using levels, brightness, and contrast controls).  You must create a 'balance' between your spec and your heightmap so you don't completely sacrifice your spec.

I will be providing a more in-depth texture splatting tutorial using this shader at a later date.  Until then, this video pretty much sums up how this functions:

And now for the shader!


Find this code in heightmappermutations.fx locade in your "Render/shaders200a/game" folder:

    #if defined(DO_TEXTURE_ALPHA)
      fadevalue *= diffuseTexColor.a;

(Insert the code below here)

    diffuseTexColor.rgb *= In.VertexColor;

Code: [Select]

float4 normaltexture = tex2D(NormalSampler,In.TexCoord0.zw);
float heightval = normaltexture.w; //w is alpha, which contains spec = heightmap substitute
if (fadevalue > 0.2 && fadevalue < 0.6) { //transition width is 0.4
float fadenorm = (fadevalue - 0.2)/ 0.4;
float edgenorm = (fadevalue - 0.2)/ 0.0625; //edge blend value
if (fadenorm < (1-heightval)) {
if ( fadenorm > (1-heightval)*0.55) { //blend a few adjacent pixels
if ( fadevalue < 0.3) { //blend the edge down
fadevalue = (fadenorm - (1-heightval)*0.55) / ((1-heightval)*0.45) * edgenorm;
} else {
fadevalue = (fadenorm - (1-heightval)*0.55) / ((1-heightval)*0.45);
} else {
fadevalue = 0.0;
} else {
if ( fadevalue < 0.3) { //blend the edge down
fadevalue = edgenorm;
} else {
fadevalue = 1.0;
} else {
if (fadevalue < 0.2) {
fadevalue = 0.0;
} else {
fadevalue = 1.0;

Screenshots of how it's used in our game:

And a video flyby of our world in progress:

MCINDUS and Omzy

Odyssey of Ydris

Art & Art Pipeline / Texture Settings for Diffuse and Normals
« on: May 30, 15, 12:46:41 AM »
Hello fellow devs! 
I have been making a plethora of textures for our game, and there are two issues that I'm seeing overall that I'd like to find out more information about.  [This is after heavy testing, wiki reading, and experience]

First Issue:
In the diffuse channel for materials, you can have Parallax Bumps/Bump Maps in Hero Materials, but I don't see any way to enable them for the terrain textures.  If you put an alpha channel in a diffuse currently (as DXT5), it asks like a gradient "Alpha Mask" property (which is cool, but our game doesn't need Alpha Mask for our terrain).  I would MUCH rather be able to put a true 'heightmapped' bump/parallax map in that Alpha channel.  I know what you're going to say: "norm maps are far superior.. etc." while as this is true, we all know that -normal map + bump map- is in combination, far superior to either alone.

Is there any way to do this?  I've tried pretty much every .dds filetype and setting to try to enable this function, but I'm not sure how to get the terrain shader to comply.

Second Issue:
I see that HE reads DXTnm files as RGBA instead of XY (GA) - but that it does indeed read them as DXT5 files.  Is there a plan in the future to enable this, since it's a normal function of DX?

Both of these issues surmount to this:
Hero Engine currently only lets you use compressed .dds files, which is fine for Diffuse, but when it comes to normals, they come out pixelated and lossy.  I'd like to be able to use DXTnm, but since that doesn't seem possible (especially because the spec being the alpha just gets wacky with the L/R normal channel being the spec in DXTnm) is there a way to get more out of my normals?  I know I can make them double the resolution, but in all honesty, I'd either like to use a non-compressed .dds at 1/2 resolution (or 1/4, whatever) for the normals, use DXTnm, or be able to at least add a parallax/bump to the diffuse.  Maybe there's a filetype i've missed that enables this?

EDIT -- Also, to give the devs more of an idea of what this combo does: 
The effect that I'm going for is good depth at extreme angles.  Parallax Bump + Normal = Good depth at extreme angles.  The normals by themselves do really really poorly at keeping dimension at extreme angles (which, if you're in first person - everything is extreme angles).

Any help would be awesome.  Love this engine!

Odyssey of Ydris

EDIT/UPDATE -- I got ARGB working.  It makes the files much larger, but lowering the resolution and keeping them uncompressed seems to do the trick!  Comparable file size, better normals!

I'm still hoping there's some info on the bump maps for diffuse, so let me know - thanks!

Hello everyone, this is my first post here and I'd like to bring a bug to light that may have been addressed before, but I have a way to reproduce the problem, and am hoping for a fix!

I have been creating my own 4-tiled textures for use as Dynamic grass, but have been running into a major issue.  When I zoom out to the point of where it swaps resolutions, the alpha channel gets a 'line' drawn across it.

I thought it was my textures, so I pushed everything a few pixels away from each other and it 'quick-fixed' my issue, but I have tried again and again to track down the problem on my end, to no avail. (even using bright colored blocks to determine what was going on). 

Here is a screenshot of close up with NO artifact:

And here it is zoomed out, with noticeable artifact (turned transparency to 0 to make obvious)

This is also happening when I use the SpeedTree compiler and use billboard leaves.



I have looked into my textures, and realized that both of these textures are set up in quadrants - the grass billboards, and the speedtree compiled texture.  If the image is divided like this:

Then the bleed is happening from the top/bottom sections between textures, but not on the original texture, only on it as you zoom out... which is telling me that HE is calling the wrong pixel locations for the second set of mipmaps from combined textures.  It also seems to pop up on the left/right side of the Dynamic grass textures sometimes as well.

Thanks, let me know if you need any more information!

Pages: [1]