Custom Mesh update performance problems

@Sploreg said:
It fails on all edges then.

Yes, im aware of this, that's why i said :
@Drollian said:Shure, with my Mesh i’ll have the same problem on the odd spaced points, but I’ve tried TerrainMesh and it felt like 1 direction is missing.


But this:
@Sploreg said:
there is a straight line possible there, just raise the points in between.
seems to solve my issue.

Just for my understanding, doing this:


will end up in a result like this??
http://i.imgur.com/18PVU.jpg

edit:
or this?!
http://i.imgur.com/hXggj.jpg
1 Like

no you can only raise vertices

0 0 .5 0 0 0 0

0 0 0 0 0 0 0

.5 0 1 0 .5 0 0

0 0 0 0 0 0 0

0 0 .5 0 1 0 .5

0 0 0 0 0 0 0

0 0 0 0 .5 0 0

will raise the middle.



And like I stated before, you won’t notice it with smooth normals. Also you will be building on flat surfaces, the slope part will be in between the flat areas and probably not built on.

1 Like
@Sploreg said:
no you can only raise vertices
0 0 .5 0 0 0 0
0 0 0 0 0 0 0
.5 0 1 0 .5 0 0
0 0 0 0 0 0 0
0 0 .5 0 1 0 .5
0 0 0 0 0 0 0
0 0 0 0 .5 0 0
will raise the middle.

And like I stated before, you won't notice it with smooth normals. Also you will be building on flat surfaces, the slope part will be in between the flat areas and probably not built on.

ok, ill try this, thanks alot :)
1 Like

sorry i haven’t read some answers i was in a hurry.


@zarch said:
I think the problem is that you are trying to sculpt with single points instead of multiple. For example if you raised/lowered a group of 4 points at a time. Also have you tried that with smooth shading on to see how it changes the look?

Note that with any grid shape there will always be lines that cannot directly follow the edges, that is unavoidable. Adding the lines you have makes one extra shape possible but as someone else already demonstrated if instead you group points you can then make any shape you like using the standard mesh.

Yes, after reading Sploreg's last post i think i've got the idea. I havent thought about that before.

@pspeed said:
If it is a grid then why are you running your lines diagonally instead of along the grid? I'm just kind of curious.

Or are you planning to support building in 8 directions versus the 4 that that sim-city like games have?

No, I'm not planning to support building in 8 directions. I want to modify the terrain in 8 directions because it provides more artistic freedom in designing it.
1 Like

I agreed with @drollian . I hope this will be added to jme Terrain system. It’s a very useful thing.

1 Like
@mifth said:
I agreed with @drollian . I hope this will be added to jme Terrain system. It's a very useful thing.

adding what to the terrain system? You mean 8 lines from 1 point?

this feature:

http://i.imgur.com/Udk5y.jpg



But no matter how you implement it.

It doesn’t change anything. Half of the points have more lines connecting them, half have fewer. With the current technique each point is equal. And with smoothed normals the difference will not be visible.

I still don’t got it working like it should, this:

@Sploreg said:
0 0 .5 0 0 0 0
0 0 0 0 0 0 0
.5 0 1 0 .5 0 0
0 0 0 0 0 0 0
0 0 .5 0 1 0 .5
0 0 0 0 0 0 0
0 0 0 0 .5 0 0

looks like this:

...you won't notice it with smooth normals...

Do i have to set something like setSmoothNormals(true) somwhere? I've searched for smooth normals but havent found something usefull.

no just raise the points that are in between. See there are some that aren’t raised at all there.

My ascii diagram was matching yours with the # not on the actual vertices, but on the lines. Do this instead:



0 0 0 0 0

0 1 .5 0 0

0 .5 1 .5 0

0 0 .5 1 0

0 0 0 0 0

@Sploreg said:
no just raise the points that are in between. See there are some that aren't raised at all there.
My ascii diagram was matching yours with the # not on the actual vertices, but on the lines. Do this instead:

0 0 0 0 0
0 1 .5 0 0
0 .5 1 .5 0
0 0 .5 1 0
0 0 0 0 0


hm, this is looking like this:


thats kinda different from this


there are still gaps between the hills. :(

well adjust it a bit. Make the 0.5’s: 1, and then smooth out the ones around it

This will result in something like this ?!:



http://i.imgur.com/cm6cl.jpg

???



Thats a totally different look



I feel stupid :frowning:

you cannot get it exactly the way you want going one diagonal direction, but you can the other, as all of these wireframe pictures show. Just like if you use odd-spaced points with your mesh technique.



I will point this out again. You will not notice these things with smooth shading (smooth normals). I’m just trying to save you time by re-writing the underlying mesh structure when in the end it will look the same. The only difference would be if you have your polygons at that zoomed-in of level where you can clearly see the individual sides, and force the user to only modify even-spaced points. That is a restriction I do not want to impose on the terrain system.

zoomed-in where you can clearly see the individual sides,

I want exactly that. That's the style of the game. Every Quad is clearly visible. Thats why i need that Mesh.

It would look super beautiful and be awesome with that mesh and the possibility to modify odd and even-spaced points. I've tried it out and i fell in love with its look and simplicity.

Here is what im working on:


Telling me not be able to use that mesh feels like telling me to do Minecraft without the ability to use blocks, since its an essential part and the style of the game.
@drollian said:
Telling me not be able to use that mesh feels like telling me to do Minecraft without the ability to use blocks.

What are you going on about?
Do it however you want. I will stop providing advice from experience.
@Sploreg said:
What are you going on about?
Do it however you want. I will stop providing advice from experience.

I've edited this: since its an essential part and the style of the game.

Of course I could cluster the mesh in many points and simulate the pattern i want but why would i do that if i don't really need that and therefore it would only costs resources.

Seems like there is no simple approach to do it the way i want.

Do it however you want. I will stop providing advice from experience.

Im really glad for every advice and i appreciate the time you take answering my questions. If i've pissed you off in some way im sorry.
@drollian said:
Im really glad for every advice and i appreciate the time you take answering my questions. If i've pissed you off in some way im sorry.

No, just a frustrating day at work. Don't mean to take it out here. Apologies.
I need a beer.
1 Like
@Sploreg said:
No, just a frustrating day at work. Don't mean to take it out here. Apologies.
I need a beer.

No prob, chill out bro, have fun :)
1 Like

hey again. After trying around for a while i came up with this result wich will look O.K. and draws in 8 directions from every point on the map:



http://i.imgur.com/hY1NM.jpg



http://i.imgur.com/7t7pZ.jpg



http://i.imgur.com/uBdTe.jpg



I think that’s kinda like the approach @Sploreg was up to.

With this approach i’m having the problem that i would have n66-1 more heightmap information than i would need with my mesh (n), just to get a nearly wanted result (remember, i still think it would be totally fine to have different building behaviors on even and odd spaced points).



I feel bad about having that much more information to handle, its theoretically useless information because what i want could be done with another Mesh. With this style, on a 1024*1024 map, there will be 36.700.160 more float points, this means the maps i would be able to handle have to be 35 times smaller than the maps on the other Mesh.



Either i’ve missed something or this approach isn’t optimal.