FractalGen3D : A 3D L-System Drawer

I made a 2D drawer last summer and figured I’d give JME3 a go and toss together a 3D one. I have to give respect to the developers behind the sdk, as I was able to get the first tests up and running within an hour and I now have a respectable alpha only a couple days later. Here are some dev screenies. Excuse anything poor looking or shoddy, I’m still a hobbyist with no formal training. Can’t wait for college to start up in august :slight_smile:

From the other day:

From Yesterday:

And here's the current version as of today:

I just need to get error handling and a nice gui up along with graphics options and the little tool will be done. I wish I could use pssm shadows, but the way I draw the fractals, the boxes overlap causing artifacts in the rendered shadows. I'm working on a remedy to this though and will hopefully have something tomorrow. Final version will have full control over shader parameters, sun direction, color, shininess, etc. Feedback is welcome, constructive or otherwise. Thanks JME team for such an amazing sdk :)

Very nice and welcome to jME! :slight_smile:

For the future you can also easier capture video in jME by attaching the VideoRecorderAppState(), as simple as:

[java]stateManager.attach(new VideoRecorderAppState()); //start recording[/java][]=videorecorderappstate

Thanks for the welcome and the tip :slight_smile:

Now, is there an easy/layman’s way around the shadow artifacts on intersecting planes? If not I’ll just work my way around it, but if there is, I’d like to know. I can get a screenie if you need, but I’m sure you know what I’m talking about, two boxes the same size on the same point with a shadow over it causes the back edges(and sometimes the front) to spaz out.

Looks very nice. It sounds like you need to detect and merge points that are on top of each other?

Out of interest do you create hundreds of separate geometries or do you merge them into one mesh?

They’re merged into a single mesh.

Ad yea I was thinking that’s what I’d have to do.

Hmm, essentially you need to detect duplicate points and then duplicate faces. Hope I’m not being too forward here but you did say you had no formal training so:

My first thought for how I’d do that (someone else may well know a better way) is while generating the shape keep:


// Map points to the index of the point (increment the index by one each time a point is added starting from 0)

Map<Vector3f, Integer> points = new HashMap<Vector3f, Integer>();

Set<Face> faces = new HashSet();


Where face either contains a Set or a sorted List of the index points that are used to build the face. The key thing is that equals and hashcode on Face should return equals for any face that contains the same group of points.

Then as you generate new points check if its in the mapping, if one already existed then use the index, if not then insert the point with a newly generated index (points.put(point, nextIndex++)). Once the point indexes are known for the face add it to the set of faces.

Once the set and map are fully populated you can pull the list of points out in order by walking the mapping’s entrySet into an array (or build that list up as you build up the mapping, either works) and then build all the faces knowing there are no duplicates.

Just be aware of float precision issues. If you have two points that are very close together but not quite identical and you need to deal with that then it becomes considerably harder to deal with.

Been a while since I even looked at this little project, but I got shadows in and played around with post processing to make something pleasing to look at. Hoping to embed a rendering window in a swing gui. This gui will let users have full control over absolutely everything dealing with their fractal. Not that it’s a huge deal, just, why not?

So here it is with hardcoded values and guiless ;^;. Might have something done in the next month or so. Just a flick through several fractals, the first being thought out and the others completely random with no skill or intuition involved lol.


looks really good, well done :slight_smile:

Looks nice :slight_smile:

Very nice! :slight_smile: