Voxel or Multiple Heightmaps?

Home Forum Development Engine Development Discussion Voxel or Multiple Heightmaps?

This topic contains 15 replies, has 10 voices, and was last updated by  Momoko_Fan 2 years, 11 months ago.

Viewing 15 posts - 1 through 15 (of 16 total)
  • Author
    Posts
  • #20994

    Guedez
    0p
    Member

    After some years i got the motivation to start a project again. And i have ran into a serious issue that needs to be addressed before even starting. Should i use multiple heightmaps one on top of the other? or Voxels?

    While Heightmaps are already implemented in JME3. Voxels seens to be the awnser for all my needs, however not only there is not much about it implemented in JME3(i think at least), and i don’t want my game to look like another minecraft clone.

    Making a voxel engine is almost out of the question for me, the little i know about voxels tells me that i need to know LOTS of crazy mathmagic to make it work good, and altough im confident in my knologe as a java developer, i know very little about math and geometry, a lot less than i should(won’t be able to address this lack of knowloge anytime soon).

    So, any tips or sugestions?

    More info related to the problem:

    The Idea of the game:
    Something like The Unreal World or Dwarf Fortress Adventurer Mode.
    Single Player Only.

    What i WANT it to have.

    – Water that flows realisticaly enough, something in the line of coluns of liquid.
    – Caves/Caverns, being able to make one, explore/modify one, making tunnels, tunnels with water for large scale ships to come thru mountains if you have the patience to make them.
    – – Those must collapse if there is not enough support.
    – Modificable terrain, being able to rise and romove mountains/islands/anything if you have the patience.
    – – Erosion would be very nice to have, as walls of dirt are simply retarded

    Thx for the help!

    #141768

    tralala
    32p
    Participant

    Then you need voxels or minecraft thingy.

    #141769

    Erlend Sogge Heggen
    510p
    Keymaster

    To further clarify your vision, would you say the technical aspects of “From Dust” are similar to what you have in mind?
    http://www.youtube.com/watch?v=CfKQCAxizrA

    Keep in mind that the primary reason why there isn’t such a game as “Dwarf Fortress – Adventurer Mode (3D)” out yet is by and large because no one has yet figured out how to do that technically, not because there’s a lack of ambitious designs. So if you yourself can’t easily envision how you would approach these technical challenges, there’s a good chance you’re going a bit out of scope.

    That said, I’m dying to see more of these games realized.

    #141771

    TimePath
    8p
    Participant

    @phate666: I don’t suppose you’re willing to release your completed framework to the community when it’s in a user friendly state?

    #141772

    Guedez
    0p
    Member

    erlend_sh said:
    To further clarify your vision, would you say the technical aspects of “From Dust” are similar to what you have in mind?

    F awesome, too bad it’s on a very small scale, but yeah, it’s very close to that

    TimePath said:
    @phate666: I don’t suppose you’re willing to release your completed framework to the community when it’s in a user friendly state?

    If that question’s awenser don’t turn to be true, i probably will have to reduce some of the scope acording to the other’s posts D:

    #141774

    Guedez
    0p
    Member

    phate666 said:
    I will release the code once it is in an usable state. But that will not happen until next month as I am busy with exams right now.

    well, i got tons of other things to do, like making moddable content.

    Thx for the heads up peeps, can’t wait to mess up with the voxels stuff later

    #141775

    nomnom
    32p
    Participant

    @phate666 can’t wait ;) Thanks for working on that!!! It’s so helpful for the community :)

    #141777

    Normen Hansen
    2798p
    Keymaster

    Cool, you think you can pack it in a jMP plugin? Theres not much to do about it really, this way people can find, install and update the library from the update center in jMP.

    #141779

    Decoy
    13p
    Participant

    @phate666: wow, that looks fantastic! i cant wait to see what can be done with your framework! (im tempted to go get an MRI just to have some data to throw at it.)
    its gonna be fun trying to slap on some lighting and make physics collisionshapes for that stuff. :D
    (of course my old pc probably wont be able to keep up, what hardware are you running that on in those screenshots?)

    #141780

    tralala
    32p
    Participant

    it doesnt work on my computer.

    WARNING: Bad compile of:
    #define GENERATE_NORMALS 1
    uniform sampler2D m_ColorMap;
    uniform float m_textureScale;

    varying vec4 vVertex;
    varying vec3 vNormal;

    void main(){
    #ifdef GENERATE_NORMALS
    vNormal = cross(dFdy(vVertex.xyz), dFdx(vVertex.xyz));
    #endif

    // tri-planar texture bending factor for this fragment’s normal
    vNormal = normalize(vNormal);
    vec3 blending = abs( vNormal );
    blending = (blending -0.2) * 0.7;
    blending = normalize(max(blending, 0.00001)); // Force weights to sum to 1.0 (very important!)
    float b = (blending.x + blending.y + blending.z);
    blending /= vec3(b, b, b);

    // texture coords
    vec4 coords = vVertex;

    vec4 col1 = texture2D( m_ColorMap, vVertex.yz * m_textureScale );//* 0.01 + vec4(1.0,0.0,0.0,1.0);
    vec4 col2 = texture2D( m_ColorMap, vVertex.xz * m_textureScale );//* 0.01 + vec4(0.0,1.0,0.0,1.0);
    vec4 col3 = texture2D( m_ColorMap, vVertex.xy * m_textureScale );//* 0.01 + vec4(0.0,0.0,1.0,1.0);
    // blend the results of the 3 planar projections.
    vec4 tex1 = col1 * blending.x + col2 * blending.y + col3 * blending.z;

    gl_FragColor = tex1 ;

    }

    Jul 23, 2011 6:14:32 PM com.jme3.app.Application handleError
    SEVERE: Uncaught exception thrown in Thread[LWJGL Renderer Thread,5,main]
    com.jme3.renderer.RendererException: compile error in:ShaderSource[name=MatDefs/UnshadedTriPlanar.frag, defines, type=Fragment] error:Fragment shader failed to compile with the following errors:
    ERROR: 0:10: error(#164) l-value required assign “vNormal” (can’t modify a varying)
    ERROR: 0:14: error(#164) l-value required assign “vNormal” (can’t modify a varying)
    ERROR: error(#273) 2 compilation errors. No code generated

    #141782

    Guedez
    0p
    Member

    got it from the googlecode and maan, that’s awesome. The marching cubes makes a perfect donnut.

    #141783

    cebollo3
    0p
    Participant

    This is brilliant!
    I’m getting around 2000 fps and 250 fps with SSAO disabled and enabled, respectively.

    @tralala said:
    it doesnt work on my computer.

    I had the same issue using Eclipse. There were some libraries missing in the buildpath. Everything you need to add is under the lib folder.

    #141784

    Decoy
    13p
    Participant

    any new updates on this project? has it been committed as a plugin? i dont see it in my jMP update/plugins menu.

    #141785

    Normen Hansen
    2798p
    Keymaster

    No, the plugin isn’t an actual library plugin.. It just contains a few classes with the code that you can copy to your code or that you could use in another plugin, I guess @phate666 didn’t see this tutorial.

    #141786

    bvierra
    0p
    Participant

    Hey guys,
    New here (and with game design in general) and was looking to just try this out.

    However I don’t seem to have com.jme3.renderer.GLObjectManager. I see it is still mentioned in the docs but I don’t see it in SVN either… Is this an oversight or am I doing something incorrect?

Viewing 15 posts - 1 through 15 (of 16 total)

You must be logged in to reply to this topic.