Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Landacape Modulation not working on large landscape #59

Open
Syntaxxor opened this issue Jan 6, 2018 · 14 comments
Open

Landacape Modulation not working on large landscape #59

Syntaxxor opened this issue Jan 6, 2018 · 14 comments

Comments

@Syntaxxor
Copy link

I have a landscape made up of 9 tiled 2017x2017 landscapes using World Composition. I'm trying to use Landscape Modulation, but it's not doing anything. I'm using the landscape object and a texture that is 6041x6041. Does the ocean not support that large of a landscape?

@TheZoc
Copy link
Contributor

TheZoc commented Jan 19, 2018

I'm not familiar with the stuff you're currently using... Do you mind giving an example on how to set that up so I can check what's going on? :)

@Syntaxxor
Copy link
Author

Okay, here's what I did:
I set up a world in World Machine. Built it as a tiled world of 3x3 heightmaps with a resolution of 2017x2017, giving me a total world size of 6041x6041. I imported these tiles into UE4 with World Composition's Tiled Landscape import function. Then, I exported the completed heightmap from the UE4 terrain to a .png and reimported it as a texture. I applied that texture to the Ocean under Landscape Modulation, set the "Use Landscape Modulation" tick to true, and nothing changed. I could use other landscape textures, though. What should be happening is that where the landscape is higher the waves are shorter, but they weren't changing at all.

@tdw46
Copy link

tdw46 commented Mar 2, 2018

I'm having the same problem, would definitely appreciate some assistance @TheZoc Did you ever figure anything out @DeadMan2001 ?

@Syntaxxor
Copy link
Author

@tdw46 Haven't figured anything out yet. Only solution I've found is to make the ocean not use waves at all, which completely defeats the purpose of using this ocean. Or you could use a smaller landscape, but that doesn't work for big landscapes.

@Kamithra
Copy link

Hi Guys,

We're trying to get the same thing done. We're using world compo with maps at 1009x1009 resolution. (32x32km total world size.) The ocean itself runs nicely when set up on the persistent map, but so far we've been unable to get the modulation to work correctly. @TheZoc The easiest way to test is to just put in a world compo and duplicate the island map twice. set them up and see if you can get the modulation to work on both maps (using world compo). So far I have been unable to do so.

And yes, no waves solves it off course, but is no option...

Hope we can find a solution for this since the ocean really works awesome in our MMO project.

@Syntaxxor
Copy link
Author

Okay, I think I've figured something out. What I did was:

  1. Modified the source code so that it takes an actor instead of a landscape.
  2. Set an actor's transform to the same as the X0 Y0 landscape tile.
  3. Export the heightmap and reimport as a texture.
  4. Make the ocean reference the actor and texture.
  5. Profit!
    The reason for this is that the "Landscape" actor that appears when you import a tiled landscape is, as far as I can tell, absolutely useless and inactive.
    screenshot00000

@tdw46
Copy link

tdw46 commented Apr 29, 2018

@DeadMan2001 You're a freaking genius. Well done

@Mellnik
Copy link

Mellnik commented Apr 30, 2018

Will this fix be committed to the repo?

@matheusgrieger
Copy link

matheusgrieger commented Jul 13, 2018

@DeadMan2001 any chance to provide some walkthrough for the less experienced, such as me?

@EvoPulseGaming
Copy link
Member

I'll go ahead and reopen this, DotCam is away right now, but he'll look at this when he gets back.
There are some changes for 4.20 so this may or may not be needed anymore.
Also, if deadman could make a pull request so we can view it over that would be great!

@NilsonFLima
Copy link
Collaborator

I have checked the code and it seems doing correctly. What I think it is happening is that when the heightmap is imported into Unreal, some scaling is being done on the on X-Y-Z axis (all tutorials seens to advice for this), we would need to receive this scaling aswel and multiply it for the heightmap given to have it properly scaled aswel. Another issue to be considered with World Composition is that with just one single heightmap fed we might see some loss of resolution for each tile and with this not accurate modulation at one spot. (I hope Im not that sleepy enough to make myself clear).

@matheusgrieger
Copy link

matheusgrieger commented Jul 17, 2018

@EvoPulseGaming so after reading a bit I understood what @DeadMan2001 meant and what his changes are, though I cannot replicate them since C++ is not among my expertises. But here goes:

  1. First he changed the Landscape option under Ocean Manager in BP_Ocean to accept an Actor (any actor) instead of the Landscape itself.
  2. Placed an empty actor in the same position of the first world tile (x0 y0), maybe with the same size as well (I don't know, can't test it).
  3. Imported his heightmap as a texture and added to the Heightmap option under Ocean Manager.
  4. Set the new Landscape option to his empty actor.

That's all. Apparently the Ocean is using the Landscape only for calculating sizes, so anything would be fine there, really, if it only takes into account the Heightmap for landscape modulation.

Hope that's correct.

@gwalton23
Copy link

gwalton23 commented Jul 17, 2018

Long have I struggled with streamed worlds and the Ocean. The Tropical Island pack on the market place has a really nice shoreline effect that seems to be done by the material. It takes in AbsoluteWorldPosition and works things out from there. It seems to only need AbsoluteWorldPosition as input. I have been trying to find out if I can change the material, so I can see what happens if I use their material with this ocean plane.

Another positive from the ocean material in the tropical island pack is that if you fly high above the landscape, the ocean plane doesn't appear to change height, which is what I see with the Ocean plane from the ocean project. It would be great to address these issues.

I have tried the solution of the empty actor - but I still don't see landscape modulation working with the shore for tiled landscapes. I used world machine professional to generate a bunch of tiles, and I also generated a single image of the heightmap to use as texture for the ocean.

@SmartPoly1
Copy link

Can someone make a tutorial on how to do this? Or does anyone have a link to the test build @DeadMan2001 created?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants