# Realtime Dynamic GI + Reflections + AO + Emissive - AHR

**URL:** <https://forums.unrealengine.com/t/realtime-dynamic-gi-reflections-ao-emissive-ahr/11923>\
**Category:** Game Development\
**Tags:** unreal-engine\
**Created:** [September 24, 2014, 1:58am UTC](https://forums.unrealengine.com/t/realtime-dynamic-gi-reflections-ao-emissive-ahr/11923 "2014-09-24T01:58:17Z")\
**Posts on this page:** 20\
**Page:** 6

<div class="post-metadata">

**Author:** ![Netrve](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/netrve/32/549870_2.png) [@Netrve](https://forums.unrealengine.com/u/Netrve)\
**Post date:** [December 3, 2014, 4:50pm UTC](https://forums.unrealengine.com/t/realtime-dynamic-gi-reflections-ao-emissive-ahr/11923/103 "2014-12-03T16:50:26Z")

</div>

I hope you have more luck with your exams than I do \>.\>  
But I am really excited to see some progress 😃

---

<div class="post-metadata">

**Author:** ![PLASTICA-MAN](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/plastica-man/32/990043_2.png) [@PLASTICA-MAN](https://forums.unrealengine.com/u/PLASTICA-MAN)\
**Post date:** [December 4, 2014, 2:43am UTC](https://forums.unrealengine.com/t/realtime-dynamic-gi-reflections-ao-emissive-ahr/11923/104 "2014-12-04T02:43:02Z")

</div>

Good luck again! 4.6 is released and has Static Lighting from Emissive Materials now. I am impatient how your integration will deal with the dyanmic lighting and emissive materials. Epic is going the right path with and your work is even going better and faster.

---

<div class="post-metadata">

**Author:** ![Mr\_SquarePeg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Mr\_SquarePeg](https://forums.unrealengine.com/u/Mr_SquarePeg)\
**Post date:** [December 5, 2014, 3:02am UTC](https://forums.unrealengine.com/t/realtime-dynamic-gi-reflections-ao-emissive-ahr/11923/105 "2014-12-05T03:02:39Z")

</div>

I want now 😃

---

<div class="post-metadata">

**Author:** ![RyanTorant](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@RyanTorant](https://forums.unrealengine.com/u/RyanTorant)\
**Post date:** [December 7, 2014, 11:05pm UTC](https://forums.unrealengine.com/t/realtime-dynamic-gi-reflections-ao-emissive-ahr/11923/106 "2014-12-07T23:05:53Z")

</div>

Well people, I finished (most) of my exams! Got one more on the 20 of December, but I can start to dedicate some time to . After that, I will work 24/7 on . Got a question. Does anyone knows a method to update to the new engine release, without going manually and copying the changes file by file? I tried from here : [How to Upgrade your Github Engine to the Newly Released Engine Version - C++ - Epic Developer Community Forums](https://forums.unrealengine.com/showthread.php?49550-How-to-Upgrade-your--Engine-to-the-Newly-Released-Engine-Version&p=164341#post164341) , but it didn’t work ( or I did it wrong…).  
Any ideas?

---

<div class="post-metadata">

**Author:** ![CharlestonS](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@CharlestonS](https://forums.unrealengine.com/u/CharlestonS)\
**Post date:** [December 8, 2014, 12:09am UTC](https://forums.unrealengine.com/t/realtime-dynamic-gi-reflections-ao-emissive-ahr/11923/107 "2014-12-08T00:09:58Z")

</div>

Hey , you can update your project to the latest version of the engine by first launching the latest version of the engine from the UE4 main splash screen (the one with the link to the Marketplace and Library).

On the left side of the main splash page just select the latest version of the engine from the big yellow drop down then click it to launch - Once it’s launched you will see all of the projects, those which are on older builds will be greyed out. Just click on one of them then click OPEN and it will ask you if you want to convert the project in it’s place or make a duplicate for the update which i recommend.

will copy and convert all of the files to the new build.

---

<div class="post-metadata">

**Author:** ![RyanTorant](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@RyanTorant](https://forums.unrealengine.com/u/RyanTorant)\
**Post date:** [December 8, 2014, 12:49am UTC](https://forums.unrealengine.com/t/realtime-dynamic-gi-reflections-ao-emissive-ahr/11923/108 "2014-12-08T00:49:07Z")

</div>

> [@;189287](#):
>
> Hey , you can update your project to the latest version of the engine by first launching the latest version of the engine from the UE4 main splash screen (the one with the link to the Marketplace and Library).
> 
> On the left side of the main splash page just select the latest version of the engine from the big yellow drop down then click it to launch - Once it’s launched you will see all of the projects, those which are on older builds will be greyed out. Just click on one of them then click OPEN and it will ask you if you want to convert the project in it’s place or make a duplicate for the update which i recommend.
> 
> will copy and convert all of the files to the new build.

Sorry, I wasn’t clear enough. I mean updating the source code, and keeping the changes I made

---

<div class="post-metadata">

**Author:** ![CharlestonS](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@CharlestonS](https://forums.unrealengine.com/u/CharlestonS)\
**Post date:** [December 8, 2014, 6:08am UTC](https://forums.unrealengine.com/t/realtime-dynamic-gi-reflections-ao-emissive-ahr/11923/109 "2014-12-08T06:08:04Z")

</div>

Ahh, ok, sorry, i have no experience with the Source Code yet so i couldn’t be of any help with that.

> [@;189295](#):
>
> Sorry, I wasn’t clear enough. I mean updating the source code, and keeping the changes I made

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_9ca0b5cd](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_9ca0b5cd](https://forums.unrealengine.com/u/anonymous_user_9ca0b5cd)\
**Post date:** [December 8, 2014, 4:39pm UTC](https://forums.unrealengine.com/t/realtime-dynamic-gi-reflections-ao-emissive-ahr/11923/110 "2014-12-08T16:39:24Z")

</div>

What branch are you working on? Usually I find that things work the best when I have some new branch that’s derived from . Then when I need to update my code for updates or because I’m about to put out a pull request it’s a simple matter of telling git to pull the latest changes from into my local branch, and merging those changes into my local branch. If the automatic merge succeeds (which it usually does) everything will be fine and dandy. Of course you have to have committed your changes onto the local branch first.

Or, in git commands:

```auto

[featurebranch +0 ~0 -0]$ git pull origin 
[featurebranch +0 ~0 -0]$ git merge 

```

It should just work if have the repository set up right and if Epic hasn’t pushed anything that conflicts with your code. If you have the repository set up wrong you might have to do some merging by hand to get things working. As you get more used to Git, you’ll have to do less of sort of thing.

If you have pushed on somewhere I’d definitely be interested in taking a look at it. My laptop definitely won’t be able to run , but my desktop probably can.

---

<div class="post-metadata">

**Author:** ![TimGS](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@TimGS](https://forums.unrealengine.com/u/TimGS)\
**Post date:** [December 8, 2014, 5:36pm UTC](https://forums.unrealengine.com/t/realtime-dynamic-gi-reflections-ao-emissive-ahr/11923/111 "2014-12-08T17:36:31Z")

</div>

[https://ariejan.net/2009/10/26/how-to-create-and-apply-a-patch-with-git/](https://ariejan.net/2009/10/26/how-to-create-and-apply-a-patch-with-git/)

---

<div class="post-metadata">

**Author:** ![illYay](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@illYay](https://forums.unrealengine.com/u/illYay)\
**Post date:** [December 8, 2014, 11:03pm UTC](https://forums.unrealengine.com/t/realtime-dynamic-gi-reflections-ao-emissive-ahr/11923/112 "2014-12-08T23:03:39Z")

</div>

> [@.pareschi;151367](#):
>
> Well, since even a PS4 has difficulties running any kind of GI scheme I think we could just forget about mobile GI for thjis generation.  
> Seriously guys, forget about it please.  
> Lightmass is more than fine even for the big games, it’s just that people don’t want to hustle over UVs and baking time.
> 
> @  
> is looking good btw!  
> If i were you i’d take a free scene from the marketplace and get it to work with your GI system, so you can better show the benefits and the quality.  
> I mean, Sponza sucks really bad uahaha.  
> Try the new Interior Day and Night scene by Koola, if you get the same quality even 10fps should be ok for now.
> 
> Cheers!

My levels are randomly generated on the fly so Lightmass isn’t an option. Some real time GI would be great. I wonder whatever happened to that SVOGI thing they used to have. Was it just too intense to run well?

---

<div class="post-metadata">

**Author:** ![RyanTorant](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@RyanTorant](https://forums.unrealengine.com/u/RyanTorant)\
**Post date:** [December 9, 2014, 12:33am UTC](https://forums.unrealengine.com/t/realtime-dynamic-gi-reflections-ao-emissive-ahr/11923/113 "2014-12-09T00:33:50Z")

</div>

> [@JedTheKrampus;189588](#):
>
> What branch are you working on? Usually I find that things work the best when I have some new branch that’s derived from . Then when I need to update my code for updates or because I’m about to put out a pull request it’s a simple matter of telling git to pull the latest changes from into my local branch, and merging those changes into my local branch. If the automatic merge succeeds (which it usually does) everything will be fine and dandy. Of course you have to have committed your changes onto the local branch first.
> 
> Or, in git commands:
> 
> ```auto
> 
> [featurebranch +0 ~0 -0]$ git pull origin 
> [featurebranch +0 ~0 -0]$ git merge 
> 
> ```
> 
> It should just work if have the repository set up right and if Epic hasn’t pushed anything that conflicts with your code. If you have the repository set up wrong you might have to do some merging by hand to get things working. As you get more used to Git, you’ll have to do less of sort of thing.
> 
> If you have pushed on somewhere I’d definitely be interested in taking a look at it. My laptop definitely won’t be able to run , but my desktop probably can.

I have been working on a branch I created inside my own private fork of the engine. Will still work? Can you explain a bit more? I’m a noob when it comes to

EDIT: I’m also checking out : [How to create and apply a patch with Git · devroom.io](https://ariejan.net/2009/10/26/how-to-create-and-apply-a-patch-with-git/) . What would be the idea, create a patch for the 4.6 changes or for my own code?  
EDIT 2: A strange thing I’m seeing is that the 4.6 branch doesn’t appears on my fork. Do I need to do something special to get it?

---

<div class="post-metadata">

**Author:** ![Mikand79](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Mikand79](https://forums.unrealengine.com/u/Mikand79)\
**Post date:** [December 9, 2014, 1:23am UTC](https://forums.unrealengine.com/t/realtime-dynamic-gi-reflections-ao-emissive-ahr/11923/114 "2014-12-09T01:23:19Z")

</div>

They changed the branch structure, there will be no 4.6 branch, its now in the release branch using a tag marking where the different released versions are in the history.

Im really not good at it, but maybe it hints you where to look or how to do it.

Oh and there is a free book about git.

[http://git-scm.com/book/en](http://git-scm.com/book/en)

I’d go with a merge. Rebasing is another possibility.

[http://git-scm.com/book/en/v2/Git-Branching-Basic-Branching-and-Merging](http://git-scm.com/book/en/v2/Git-Branching-Basic-Branching-and-Merging)

git checkout -b local-4.6-testmerge // create a new branch so you can destroy everything and start over if its beyond repair 🙂  
git merge release // try merging in all changes to the engine since you started working till top of the release branch, what is 4.6

Then you are going to solve all the merge conflicts that probably come up. Look in the book above it how thats done. When that is done, you execute Setup.bat to download the new dependencies and then you try to build your new engine. Id guess now you are getting build errors because the APIs changed, so resolve them too.

If that all succeeded and your engine behaves and runs, you can checkout the original branch you probably created to develop, merge in the branch created above and delete the temporary one. Or just continue to use branch for development.

---

<div class="post-metadata">

**Author:** ![TimGS](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@TimGS](https://forums.unrealengine.com/u/TimGS)\
**Post date:** [December 9, 2014, 4:17am UTC](https://forums.unrealengine.com/t/realtime-dynamic-gi-reflections-ao-emissive-ahr/11923/115 "2014-12-09T04:17:20Z")

</div>

> [@;189817](#):
>
> I’m also checking out : [How to create and apply a patch with Git · devroom.io](https://ariejan.net/2009/10/26/how-to-create-and-apply-a-patch-with-git/) . What would be the idea, create a patch for the 4.6 changes or for my own code?

The idea is following:  
— you create separate branch in your fork based on **release** branch (let’s call it **ahr-release-4.6** )  
— then you work as usual in that branch  
— if Epic makes a release you check it out to **ahr-release-4.6.1** , create a patch out of your **ahr-release-4.6** branch (which will contain only your own commits) and try to apply it to that branch to see if there’s any conflicts or problems you have to solve. If there’s none or you successfully found solutions for them you just close your **ahr-release-4.6** and work on 4.6.1 (or you can even delete your old 4.6 and rename new one to it).

The patch will not take any epic commits, just the files you’ve edited. will make you be sure that your work is like overlapping current release branch. Simple merging new changes into your working branch is risky. Epic are not collaborating with you, they do their changes without any knowledge about yours.

Patch way is the best option, imho.

---

<div class="post-metadata">

**Author:** ![Mikand79](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Mikand79](https://forums.unrealengine.com/u/Mikand79)\
**Post date:** [December 9, 2014, 2:27pm UTC](https://forums.unrealengine.com/t/realtime-dynamic-gi-reflections-ao-emissive-ahr/11923/116 "2014-12-09T14:27:21Z")

</div>

Resolving merge conflicts is the semiautomated way of resolving the errors that would occur when applying the patch manually. If one uses git merge or git rebase it will retain ones commit history.

Though I agree its risky in that it’s not fun at all and can be quite uneasy and might need more then one attempt…

---

<div class="post-metadata">

**Author:** ![TAN](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@TAN](https://forums.unrealengine.com/u/TAN)\
**Post date:** [December 9, 2014, 6:43pm UTC](https://forums.unrealengine.com/t/realtime-dynamic-gi-reflections-ao-emissive-ahr/11923/117 "2014-12-09T18:43:08Z")

</div>

Will be praying for your success.

Goodluck and godspeed mate ! 😃

---

<div class="post-metadata">

**Author:** ![RyanTorant](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@RyanTorant](https://forums.unrealengine.com/u/RyanTorant)\
**Post date:** [December 10, 2014, 12:23am UTC](https://forums.unrealengine.com/t/realtime-dynamic-gi-reflections-ao-emissive-ahr/11923/118 "2014-12-10T00:23:20Z")

</div>

Well, I think I got the idea of the patchs working, at least on a test repo. Now, when I go to my fork of the UE, I see I only have and 4.x branches, no release or promoted. Any idea on that? Do I need to do some kind of re-forking? Man, learning will take more time that integrating AHR, I’m sure of that…

---

<div class="post-metadata">

**Author:** ![TimGS](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@TimGS](https://forums.unrealengine.com/u/TimGS)\
**Post date:** [December 10, 2014, 12:39am UTC](https://forums.unrealengine.com/t/realtime-dynamic-gi-reflections-ao-emissive-ahr/11923/119 "2014-12-10T00:39:39Z")

</div>

No need for refork. You can create release branch by yourself and checkout Epic’s **upstream/release** to that branch.

Here’s how it’s done: [http://stackoverflow.com/questions/4410091-import-upstream-branch-into-fork](http://stackoverflow.com/questions/4410091-import-upstream-branch-into-fork)

Of course first you should make sure that you have upstream remote added:

[FONT=Courier New]D:\UE4\UnrealEngine [release]\> git remote -v  
origin https://.com/FamilioDevel/UnrealEngine.git (fetch)  
origin https://.com/FamilioDevel/UnrealEngine.git (push)  
upstream https://.com/EpicGames/UnrealEngine.git (fetch)  
upstream https://.com/EpicGames/UnrealEngine.git (push)

If you don’t you should add it by command:

[FONT=Courier New]git remote add upstream https://.com/EpicGames/UnrealEngine.git

---

<div class="post-metadata">

**Author:** ![RyanTorant](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@RyanTorant](https://forums.unrealengine.com/u/RyanTorant)\
**Post date:** [December 10, 2014, 1:13am UTC](https://forums.unrealengine.com/t/realtime-dynamic-gi-reflections-ao-emissive-ahr/11923/120 "2014-12-10T01:13:10Z")

</div>

> [@TimGS;190391](#):
>
> No need for refork. You can create release branch by yourself and checkout Epic’s **upstream/release** to that branch.
> 
> Here’s how it’s done: [http://stackoverflow.com/questions/4410091-import-upstream-branch-into-fork](http://stackoverflow.com/questions/4410091-import-upstream-branch-into-fork)
> 
> Of course first you should make sure that you have upstream remote added:
> 
> [FONT=Courier New]D:\UE4\UnrealEngine [release]\> git remote -v  
> origin https://.com/FamilioDevel/UnrealEngine.git (fetch)  
> origin https://.com/FamilioDevel/UnrealEngine.git (push)  
> upstream https://.com/EpicGames/UnrealEngine.git (fetch)  
> upstream https://.com/EpicGames/UnrealEngine.git (push)
> 
> If you don’t you should add it by command:
> 
> [FONT=Courier New]git remote add upstream https://.com/EpicGames/UnrealEngine.git

Thanks! I’ll try .  
Anyway, I have the feeling my repo is gonna die tonight…

---

<div class="post-metadata">

**Author:** ![RyanTorant](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@RyanTorant](https://forums.unrealengine.com/u/RyanTorant)\
**Post date:** [December 10, 2014, 2:30am UTC](https://forums.unrealengine.com/t/realtime-dynamic-gi-reflections-ao-emissive-ahr/11923/121 "2014-12-10T02:30:19Z")

</div>

> [@TimGS;190391](#):
>
> No need for refork. You can create release branch by yourself and checkout Epic’s **upstream/release** to that branch.
> 
> Here’s how it’s done: [http://stackoverflow.com/questions/4410091-import-upstream-branch-into-fork](http://stackoverflow.com/questions/4410091-import-upstream-branch-into-fork)
> 
> Of course first you should make sure that you have upstream remote added:
> 
> [FONT=Courier New]D:\UE4\UnrealEngine [release]\> git remote -v  
> origin https://.com/FamilioDevel/UnrealEngine.git (fetch)  
> origin https://.com/FamilioDevel/UnrealEngine.git (push)  
> upstream https://.com/EpicGames/UnrealEngine.git (fetch)  
> upstream https://.com/EpicGames/UnrealEngine.git (push)
> 
> If you don’t you should add it by command:
> 
> [FONT=Courier New]git remote add upstream https://.com/EpicGames/UnrealEngine.git

Well, I got to apply the patch, but getting 4 errors, where it says that the patch wont be aplied. Any idea how can I go and fix that?  
Using the --reject option I got it to apply most of the patch, but still fails at the end.  
It always fails on the same line, but if I see the file is empty on my file, and filled with some code on theirs. Is there a way I can do some kind of manual merge for each file that presents conflicts?

EDIT: Forget about that, it appears to be working now. Will have to download dependencies / build, but that’s gonna take all night long, so not much left to do here

---

<div class="post-metadata">

**Author:** ![RyanTorant](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@RyanTorant](https://forums.unrealengine.com/u/RyanTorant)\
**Post date:** [December 10, 2014, 11:36pm UTC](https://forums.unrealengine.com/t/realtime-dynamic-gi-reflections-ao-emissive-ahr/11923/122 "2014-12-10T23:36:06Z")

</div>

I did it! Everything up and running. Will get to work on the shaders, both on the shader code itself, that’s mostly a copy and paste from my demo, but also on the classes and engine stuff, which is quite more difficult, but I think I have the right idea on how to proceed. Actually, only two parts remain to be implemented. One is the voxelization stage, that I’ll try to leave working week, and the other is the RSM, which I’ll have to find a way to hack myself into the engine code, as there are already routines to render RSM, used by the LPV, for example, so I hope to be able to use them as-is. Might have to modify something, but even if I do, and I break LPV, not really a problem there, as AHR will (hopefuly) replace both LPV and distance field AO.

Stay tuned people, good things are coming…

BTW, the full compile took 7 hours. Anyone feeling like donating an i7 5960x?

[Previous page](https://forums.unrealengine.com/t/realtime-dynamic-gi-reflections-ao-emissive-ahr/11923.md?page=5)

[Next page](https://forums.unrealengine.com/t/realtime-dynamic-gi-reflections-ao-emissive-ahr/11923.md?page=7)
