Code Monkey home page Code Monkey logo

Comments (14)

Syntaxxor avatar Syntaxxor commented on September 13, 2024 2

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

from oceanproject.

TheZoc avatar TheZoc commented on September 13, 2024

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? :)

from oceanproject.

Syntaxxor avatar Syntaxxor commented on September 13, 2024

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.

from oceanproject.

tdw46 avatar tdw46 commented on September 13, 2024

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

from oceanproject.

Syntaxxor avatar Syntaxxor commented on September 13, 2024

@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.

from oceanproject.

Kamithra avatar Kamithra commented on September 13, 2024

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.

from oceanproject.

tdw46 avatar tdw46 commented on September 13, 2024

@DeadMan2001 You're a freaking genius. Well done

from oceanproject.

Mellnik avatar Mellnik commented on September 13, 2024

Will this fix be committed to the repo?

from oceanproject.

matheusgrieger avatar matheusgrieger commented on September 13, 2024

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

from oceanproject.

EvoPulseGaming avatar EvoPulseGaming commented on September 13, 2024

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!

from oceanproject.

NilsonFLima avatar NilsonFLima commented on September 13, 2024

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).

from oceanproject.

matheusgrieger avatar matheusgrieger commented on September 13, 2024

@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.

from oceanproject.

gwalton23 avatar gwalton23 commented on September 13, 2024

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.

from oceanproject.

SmartPoly1 avatar SmartPoly1 commented on September 13, 2024

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

from oceanproject.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.