Irregular Board

30 views
Skip to first unread message

Peter Pitchford

unread,
Jan 18, 2015, 1:08:00 PM1/18/15
to turbulenz-e...@googlegroups.com
Hello,
I would like to make a 3d board game with pieces can move around on the board. The board has irregular shapes. Here is an example of a board with irregular shapes.
http://geotonics.com/images/board.png

I can view and build the samples but I don't see a sample that applies to this particular setup.
/physics.release.html has a matrix which is regular and not graphic, so I don't see how that applies.
forward_rendering.canvas.release.html has a floor, but it made of a pattern of regular images, and I don't see how that would apply.
I figure it might work something like an html image map, only in 3d,  and there may be a sample of this that that I haven't found it yet.
Ideally,I would like to see a sample that delineates irregular shapes with a an object that can be moved from shape to shape. Is there anything like that anywhere? 
Otherwise, which API interfaces should I use?

Ian Ballantyne

unread,
Jan 19, 2015, 5:46:23 AM1/19/15
to turbulenz-e...@googlegroups.com
I assume by your description you intend this shape to be in 3D and move to a different shape in 3D. It depends on the type of irregular shapes you intend to use. From your image it looks like you are interested in segments that have different sizes.
Will these remain on a flat plane when rendered in 3D or do you intend them to be morphed in three dimensions?

I don't think any of the default shaders have this use case in mind. Having a custom shader to render this 2D donut shape in 3D where the size and segments are specified as arguments would work. Can you explain how the boards are designed?

If it need to be manipulated in 3D then the "Immediate Mode" rendering example shows how to update and render shapes by manipulating vertices. You should be able to create you custom shapes with that and have the vertices morph into other shapes.
      


Peter Pitchford

unread,
Jan 19, 2015, 11:35:09 AM1/19/15
to turbulenz-e...@googlegroups.com
I'm not sure what you mean, so let me rephrase my question. The board is a flat plane which doesn't need to change shapes. It has small areas of irregular shapes, each of which does not need to change shapes either.   There will be pieces on the board which will move from one area to another. That's the only thing that changes, besides the perspective.

I should be able to view the board from the sides or the top.

I looked at the sample for Immediate Mode Rendering, but its 2d, which means you can't view anything from the sides.
http://biz.turbulenz.com/samples#sample-modal/samplepage/sample_assets/immediate_mode_rendering.canvas.release.html/samplesrc/sample_assets/immediate_mode_rendering.js.html
I think the reason you mentioned that sample is because the shapes are changing, which I don't need.
It seems like that sample does not apply, unless I have misunderstood which is entirely possible.

Can you explain what you mean by "explain how are the boards designed?" There is only 1 board. Its basically just a drawing of lines on a board.
Do you mean what is the math that determines where the lines go? I figure I'll be able to draw the board with one of the APIs, but I haven't done the math yet.







Ian Ballantyne

unread,
Jan 19, 2015, 1:59:03 PM1/19/15
to turbulenz-e...@googlegroups.com
I think I understand. I was just asking if the board needed to be modified at runtime, which it sounds like it doesn't. If the board is simply a set of 2D lines drawn on a 3D plane based on some design that is certainly possible using a render target as the texture for the top of the board. You could still move the view around the board object in 3D. 

I pointed you to the immediate mode rendering because it allows you to create 3D geometry programmatically. The view in this case appears to be top-down 2D, but the vertices are in fact 3D.
If you already know the shape of the board before hand e.g. a donut, then you could create it a modelling program and render it with the default renderer with a different series of lines on top, no need to generate geometry.


Reply all
Reply to author
Forward
0 new messages