Simplex3D (Scala Engine)

Simplex3D is a (first?) Scala 3d Engine.



When writing 3d applications a large amount of time is spent working with 3d math and processing arrays of data. Also, these two areas are major contributors of bugs. Since Scala allows the creation of very flexible API, it made sense to spend considerable effort into developing solid, well tested, and easy to use components to work with math and data buffers. One of the main objectives was to make coding fun and easy.



The project has been steadily developing since October 2009.  The math library is complete and a first version of the buffer library has been released. These two libraries alone are aready very powerful tools. Below is a short demo with source.



Liquid Metal Demo, using OpenGL 2.0 (no permissions required): http://lexapplets.appspot.com/files/mercury.jnlp

The demo source can be found here: http://lexapplets.appspot.com/files/mercury-src.zip



Now that the core components are near completion, the fun part can begin with the development of the renderer and other engine sub-systems.

Contributors are welcomed!



Head to the project page for more details: http://simplex3d.googlecode.com

Discussion group: http://groups.google.com/group/simplex3d-dev

Looks like there was a problem with some malformed xml in the Jnlp file. I am using Sun's Java implementation, which does not mind the malformed file, so the bug slipped through.  :roll:



Should be fixed now. Thank you for taking the time and sending the trace!

Cool!  But unfortunately you aren't the first :wink:



Check out Sgine, being worked on by our old friend DarkFrog: http://www.sgine.org/

I am aware of Sgine project, it was created after Simplex3d… so I figured I should claim the title :smiley:

Ah I did not know this!  I'll have to have a look at this!

Sorry, the JNLP doesn't work on Linux x86_64  :expressionless:

I am using Linux x86_64 as my main desktop and JNLP works for me. What is your distribution and Java version?



Sometimes the browser does not recognize JNLP. In that case you can save the JNLP file to the disk, then go to the console, cd into the correct directory, and run "javaws jnlp-file.jnlp".

I am using IcedTea 6… Here is the console output:



$ java -version

java version "1.6.0_17"

OpenJDK Runtime Environment (IcedTea6 1.7.3) (suse-2.1.1-x86_64)

OpenJDK 64-Bit Server VM (build 14.0-b16, mixed mode)



$ javaws mercury.jnlp

netx: Unexpected net.sourceforge.jnlp.ParseException: Invalid XML document syntax. at net.sourceforge.jnlp.Parser.getRootNode(Parser.java:1200)



$ xmlproc_parse mercury.jnlp

xmlproc version 0.70



Parsing 'mercury.jnlp'

E:mercury.jnlp:17:8: End tag for 'jnlp' seen, but 'update' expected

E:mercury.jnlp:17:8: Premature document end, element 'update' not closed

Parse complete, 2 error(s) and 0 warning(s)



Hope this helps!



Edgar

Cool, now it works! It is mesmerizing!  :-o … How about porting it to jME? 

Hi Lex! Good to see that you are active.



Since reading about DarkFrog's Sgine made me curious, i checked out Scala. And the thing is, i don't like that language. It takes away the most important thing about Java: simplicity. It adds such syntactic complexity that it hurts readability. Granted it reduces boilerplate code of Java, but instead it adds such complexity, that its unreadable. All in the name of expressiveness. I do have a sympathy for D, and Go lately.

duenez said:

Cool, now it works! It is mesmerizing!  :-o ... How about porting it to jME? 


It's like one of those sheets of silicone that is *untearable*.. very nice!
vear said:

Hi Lex! Good to see that you are active.

Since reading about DarkFrog's Sgine made me curious, i checked out Scala. And the thing is, i don't like that language. It takes away the most important thing about Java: simplicity. It adds such syntactic complexity that it hurts readability. Granted it reduces boilerplate code of Java, but instead it adds such complexity, that its unreadable. All in the name of expressiveness. I do have a sympathy for D, and Go lately.


It's good to see you too. All languages have their pros and cons. I have chosen Scala to be THE language for me. Hope you can find your language of choice as well.


sbook said:

It's like one of those sheets of silicone that is *untearable*.. very nice!


Except that it was supposed to be liquid metal... oh well, at least it looks nice :)

The project has been developing steadily. I am working on a simple engine at the moment. Meanwhile the official project site has been launched http://www.simplex3d.org/. And I am happy to announce a new version of the core API.



*** Simplex3D Math 1.1 ***

Simplex3D Vector Math DSL resembles GLSL and has the same set of functions.

http://code.google.com/p/simplex3d/wiki/VectorMathDSL



*** Simplex3D Data 1.1 ***

Simplex3D Data Binding API is designed to simplify access to raw numerical data that defines geometry and textures.

http://code.google.com/p/simplex3d/wiki/DataBindingAPI





Tutorials can be found on the project site.

1 Like

A new version of the Simplex3D Core API has been released for Scala 2.9.0.

The engine development is coming along slowly. Meanwhile you can experiment with procedural textures using an Interactive Scala Console. It’s a simplified IDE that uses WebStart, so no installation required. You can find it here: http://www.simplex3d.org/console/



Using the console you can instantly run short Scala scripts like this:

[java]val octaves = 4

val lacunarity = 2

val amplitudeDivisor = 2

val expectedMagnitude = 1.7



val frequencyFactors = (for (i <- 0 until octaves) yield pow(lacunarity, i)).toArray

val amplitudeFactors = (for (i <- 0 until octaves) yield pow(amplitudeDivisor, -i)).toArray



def noiseSum(p: inVec2) = {

def octave(i: Int, p: inVec2) = {

val f = amplitudeFactors(i)

abs(noise1(pfrequencyFactors(i)) - 0.3f)*f

}



var sum = 0.0; var i = 0; while (i < octaves) {

sum += octave(i, p + i)

i += 1

}

sum

}



drawFunction(“Turbulence”) { (dims, pixel) =>

val p = pixel/200

Vec3(noiseSum§/expectedMagnitude)

}[/java]



And get results like this:

Cool stuff … in the moment I saw the animated noise texture I think about a animated surface for our minecraft clone bloxel :smiley: This would be fun to run over a sea of boxes gg