Jump to content

  • Log In with Google      Sign In   
  • Create Account

Alundra

Member Since 19 Jul 2011
Offline Last Active Aug 03 2016 08:31 PM

#5300607 Magic Number 8 Used For Energy Conservation, One Reason ?

Posted by on 13 July 2016 - 04:11 PM

Hi,

I always seen pi used for energy conservation but recently in the frank luna dx12 book I saw magic number 8 used (he uses that from another book).

The full formula is :

float roughnessFactor = (m + 8.0f)*pow(max(dot(halfVec, normal), 0.0f), m) / 8.0f;

Any reason 8 is used here instead of the classical divide by pi ?

Thanks




#5298582 how to use ambient light

Posted by on 29 June 2016 - 08:57 PM

You was on the good road, never search complicated :

finalColor = (textureColor * ambientColor) + (textureColor * diffuseLightColor);

In other words, ambient is just a colorized diffuse texture added on the lighting or set as a start if multiple lights are added in the final color.




#5273463 Loosing materials when adding IK transformations to the bone?

Posted by on 31 January 2016 - 07:36 AM

frame->TransformationMatrix += matFinal;

You have to multiply matrices to combine them (in the good order).




#5272302 (UE4) Use button in inventory to show/hide items.

Posted by on 22 January 2016 - 04:57 PM

One option is to have a list of item with one parent which is the category, each category like that.

Then it's only needed to make one parent visible to have all these children visible (or if visible is not inherited, set visible on each child).




#5271451 Calculating Cylinder Width and Radius

Posted by on 16 January 2016 - 03:22 PM

On the same road as Randy Gaul said, if I understand correctly what you ask :

1) Simply for loop each vertice and find the min/max on the x axis and y axis.

2) Radius = 0.5f * (m_Max.x - m_Min.x)

3) Height = m_Max.y - m_Min.y




#5269621 Moment Shadow Maps for Single Scattering, Soft Shadows and Translucent Occlud...

Posted by on 06 January 2016 - 08:32 AM

Hi,

here a video about the update of the MSM shadowing technique :

I remember MJP did an article about it and said EVSM still the best, is it always the case ?

Thanks




#5269492 Memory Leaks on shutdown of QT application

Posted by on 05 January 2016 - 03:50 PM

I found exactly where the leaks happen, it's when the render window is resized, maybe because I don't clean up correctly everywhere the set of variables of shaders and because of that the release count never go down to 0, if it's the reason, the leak then has nothing to do with Qt, it's an engine issue.




#5268839 Axis aligned boxes and rotations

Posted by on 02 January 2016 - 10:58 AM

Whatever else you need is a separate object which is attached to the scene node.

In other words : components.




#5268834 Keyboard/Mouse input missing because of low FPS

Posted by on 02 January 2016 - 10:05 AM

I missed one information you right, it only happens on action in the mode "Press Once" (example : character punch on the mouse left click).

It's surely because of mouse down + mouse up events ? On this case the state of the action is then not actionned and the game code will never do the action.

I use 3 modes "Hold", "Press Once" and "Release Once", surely the "Release Once" mode has the same issue.




#5268147 IMGUI

Posted by on 27 December 2015 - 04:22 PM

Hi,

IMGUI becomes populare but is it good for everything (game, debug, editor) ?

What is your opinion about it ?

Thanks




#5266440 Axis aligned boxes and rotations

Posted by on 15 December 2015 - 06:03 AM

This is what I said in my previous post, you have a flag and if it's needed to update local or world transform then you update.

But also, what you do is very inefficient because you update surely multiple time in an hierarchy.

What irrlicht do is common way, it gets the parent world transform recursively when needed.

Using the flag, if the parent is already updated, you end with a simple get of transform.




#5266167 Axis aligned boxes and rotations

Posted by on 13 December 2015 - 04:58 PM

To manipulate position, rotation and scale separately but then of course you have the 4x4 matrix.

You can use a flag + mutable keyword on the 4x4 matrix to check if it's needed to compute the matrix if position, rotation or scale changed.




#5265376 Writing 'floats' to a file

Posted by on 07 December 2015 - 09:15 PM

Also don't forget endian will be needed to know when reading, you can add the endian type on the beginning of the file in save process.




#5265125 Unity C# Jump Code Was Working. Now It's Not.

Posted by on 06 December 2015 - 07:36 AM

Public variables are there to allow artists to set up values on editor, your rigidbody has no sense to be public since it's only used for this class.




#5265080 Specular aliasing : The order 1886 method

Posted by on 05 December 2015 - 06:02 PM

There's ALSO a really nifty demo showing LEAN, CLEAN, and Toksvig results so you can see them all side by side with performance, but I don't know where it is.

You surely speak about : https://mjp.codeplex.com/releases/view/109905






PARTNERS