Marching Cubes, Triplanar Mapping, Multires Textures, and Lemur

A video to go with it. For screen shots I can aim the camera well but for video it becomes more obvious that there is a lighting bug in the ground shader that occasionally ramps up its brightness based on camera angle. It makes the grass too contrasty when that happens.

[video]Grass Flyover - YouTube

3 Likes

this is fantastic!
Well done :slight_smile:

@netsky08 said: this is fantastic! Well done :)

Thanks!

Awesome I couldn’t even immage how to do that… :open_mouth:

@relucri said: Awesome I couldn't even immage how to do that... :O

:slight_smile: I’ll release the code soon… then you’ll be able to see. :slight_smile:

I want to do trees first and then there is a LOT of cleanup to do.

3 Likes

Ok, I’ve uploaded a newer version with the grass.
http://mythruna.com/temp/IsoSurface/IsoSurfaceDemo-Windows.zip
http://mythruna.com/temp/IsoSurface/IsoSurfaceDemo-Linux.zip
http://mythruna.com/temp/IsoSurface/IsoSurfaceDemo-MacOSX.zip

Trees will take me a bit and I wanted to let people play with it to see how it works, glitches and all.

Controls from before… they are the same:
WASD moves
Mouse looks
QZ moves up and down relative to look direction
Space – toggles the mouse cursor on and off (ie: toggles the camera control on and off) letting you mess with the GUI.
Shift – fly faster (10 m/sec)
Ctrl + Shift - fly super fast (20 m/sec)
F3 – hides the HUD
F5 – hides the JME stats
SysReq/Prt Scr – takes a screen shot

4 Likes

Watching this amazing thread :mrgreen:

Love your work!

Nice!

@lawsy said: Watching this amazing thread :mrgreen:

Love your work!

Thanks! Hopefully I’ll have some source code to release soon. Life keeps getting in the way.

1 Like

Spent over an hour playing with the first version… totally loved it. I could totally see myself building a lil hidden base in it and then crying myself to sleep waiting for the light to come out again while predators are err predating around :D. I mean, it’s quite a frightening landscape.

Could be very nice minecraft/mythruna style, but instead of zombies, just “normal” dinosaurs and animals from that era.
Wind would transport odors and alert mobs… in plains, some mobs would be quicker than humans etc.
Ok, humans and dinosaurs aren’t supposed to have coexisted but prrrt.

Make it happen… you have 2 weeks :p.

So, I’ve been working on trees off and on for the past week or so. Mostly thinking about the problem. A week ago I even almost resorted to making a paper model to sort out the texture of the branch joints. Graph paper just wasn’t cutting it.

In the mean time, I’d cobbled together a pretty decent little mesh builder class, complete with loop-creation and extrusion.

Here is one of the funny looking shapes I made while testing it:

Notice how the segment count can be stepped up and down as needed and the loops automatically get joined. It mostly works.

Tonight I got back down and dirty trying to code-generate a mesh that would join trunk to branch and keep the texture coordinates looking nice. I kept having to add vertexes and triangles and it was just getting to be a mess. I don’t even have pictures. I’d given up and started watching Blender tutorials on making trees figuring maybe I could chop parts out of them to build a template.

Something about watching a dude make a tree using extrusion made something click in my mind and I realized I’d been going about it wrong. I’m not even using the same solution that the tutorial was doing. Just something about the video inspired the solution.

It’s even so stupidly simple that I’m embarrassed that it took so long. I blame lack of caffeine, salt, and fat. (diagnosed with high blood pressure recently) It’s not perfect but it’s 1000x better than any visual I’d created before.

Anyway, here are the results, textured:

With test pattern and wire frame:

This version is even easier to adapt to my basic L-system code than anything I’d been conceiving before. So dumb.

2 Likes

Very cool! Release the code already! :wink:

@aaronperkins said: Very cool! Release the code already! ;-)

:slight_smile:

Work is slow these days. Lots of stuff going on at home and I’m not as caffeinated as I used to be.

Before I release the paging system, I want to work out LOD and ‘rebuilds’. Trees were going to be my LOD test (as well as getting geometry instancing folded into JME). It’s just taken me longer than I’d anticipated.

I made some progress last night but I’m not really happy with it. Some parts I cut out of a full L-system implementation are coming back to bite me and I have a refactoring I want to do to see if it improves.

I also still need to add “gravity” and “random variation”. Oh, and leaves… though I could technically proceed without leaves.

2 Likes
@pspeed said: :)

Work is slow these days. Lots of stuff going on at home and I’m not as caffeinated as I used to be.

Before I release the paging system, I want to work out LOD and ‘rebuilds’. Trees were going to be my LOD test (as well as getting geometry instancing folded into JME). It’s just taken me longer than I’d anticipated.

I made some progress last night but I’m not really happy with it. Some parts I cut out of a full L-system implementation are coming back to bite me and I have a refactoring I want to do to see if it improves.

I also still need to add “gravity” and “random variation”. Oh, and leaves… though I could technically proceed without leaves.

Looking realllllly cool! I put together a tree generator a while back… it was… nightmarish with… only semi-decent results in the end. Was fun… but not really what I wanted in the end. Looking forward to seeing how this one ends up!

@t0neg0d said: Looking realllllly cool! I put together a tree generator a while back... it was... nightmarish with... only semi-decent results in the end. Was fun... but not really what I wanted in the end. Looking forward to seeing how this one ends up!

Me too. As with most things like this, it alternates between excitement and banging my head against the desk in frustration.

I’ve done a full l-system before in 2D but 3D and simplification are making it difficult.

1 Like

Encouraging… turns out a little random variation goes a long way.

Here is a basic tree with each branch in 4 segments and 2 * radius random offsets:

Here is the same tree with tip-recursion turned on (longer story):

Similar setup but 1 * radius random offsets:

Next will be to create some parameter variation for length/radius… I also need to come to a decision on the issues with tip recursion (long story about how I’m trying to simplify l-systems down to one branching type per level).

2 Likes

A big fat stumpy tree:

…more like the type I actually want in my little game. Big fat trunks for slamming into at high speed.

1 Like

Actually, with gravity + offsets, I may be far enough along to move onto other things. This is “good enough” for now… three different views, regular, wireframe, and test pattern. A little bit of twist seems to add some nice qualities.

5 Likes

That really IS looking awesome! Can’t wait to play around with this!

I haven’t been following the forums lately, but seeing how much progress you’ve made since last time I was here is unbelievable, this looks amazing! Thanks already for all the time you’ve put into this :o