Hi jME coders.
I am new to jME. I have been doing a self-inflicted crash course on jME and I have a few questions regarding Texture tiling. I saw mars’ post: http://www.jmonkeyengine.com/jmeforum/index.php?topic=5976.0 on tiling and from what was said on the topic it is possible.
I basically have a large image/texture that I want to display and be able to scroll around to view it (it is a D&D map.) I have found both code and papers that make it fairly clear what to do using the CLAMP_TO_EDGE feature, but I am new to scene graphs and I am not sure how to introduce this kind of functionality to jME.
I understand how a scene graph works, what need is how to connect to dots with the algorithm and the graph.
From what I have read so far in the manuals, I need to create a new type of node that handles both culling and image tile streaming. Once the node type is created it can then be added to the graph? Then the graph would then work with the node getting visible geometry and texturing applied. I am sort of theorizing based on what I have read.
I am not really looking for splatting or PTG just simple tiling.
I know how I would code the algorithm in a simple test harness; all I need to learn is how to work within the confines of the graph.
Anyone have tutorials, example code or even a node all ready to go.
The help would be appreciated.
Hi jME coders.
There are several ways to do this, the easiest would be to have a matrix of quads, each quad has a small section of the map image as a texture, you then arrange them to be next to each over and place them in a node.
Thanks for the tips.
I have C code that does it using Blythe's demo. What I am looking for is how to integrate it with jME. I am new to scene graphs and I have some ideas based on what I have read so far but I am not sure what is the best/correct approach is with jME's scene graph.
Perhaps if anyone has example code where they are creating a custom Node that has special culling and texturing properties, that might help.
As for now I will continue perusing through the jME source looking for guides and ideas.
I would suggest you check the Tutorials http://www.jmonkeyengine.com/wiki/doku.php?id=the_tutorials, which include very good step by step explanations taking you from your first jME application to some very complex applications. The all include the full code in them.
This one is for Nodes: http://www.jmonkeyengine.com/wiki/doku.php?id=starter:hello_node
This one for states, including textures: http://www.jmonkeyengine.com/wiki/doku.php?id=starter:hello_states
After that, maybe your questions are answered, but if not, there is a plethora of Tests you can use for learning. Including the marvelous effects like the Projected Grid Water demo in the main page, and the TestIsland which is simply breath-taking with less than 500 lines of code.
Ahh, Thank duenez.
I will certainly check them out. I didn't think about the hello_node because I saw the word "hello". The TestIsland looks like a good suggestion too. Thanks very much. Looks like I have more self-infliction… err studying to do.