Programatically generating contour map in Unity 3d over a flat surface

5 replies
Hi!

I am working on a project in Unity3D in which I have to Generate a contour map from data obtained from formulas separately over a flat surface.

I have a simple 2d surface rotated in 3d. Imagine a surface such as this:
Code:
. . . 
. . . 
. . .
I want to generate (not just apply texture of a) contour on this surface on the basis of temperature data at different points on it. This not permanent and recalculation of data will show new contours. Data of temperature will be problematically created from formulas like this:

Code:
34 54 79
56 80 108
89 110 120
Is there a way to do this?

Please note that I want to generate the contour on the surface instead of creating it by hand. There is no need to find the contours or detect them because data for contours it will be found separately using formulas. I am ok with JS as well as C# code. But any help in getting the desired result/method would be very helpful.
I hope my question was clear enough
#contour #flat #generating #map #programatically #surface #unity
  • Profile picture of the author SteveJohnson
    - if you look at the types of questions discussed here in the programming section of the WF, you'll find that this isn't the proper site to be asking your kind of questions. Might be better off to ask on StackExchange
    Signature

    The 2nd Amendment, 1789 - The Original Homeland Security.

    Gun control means never having to say, "I missed you."

    {{ DiscussionBoard.errors[9182693].message }}
  • Profile picture of the author ate8tree3
    Well I am hoping that someone with any knowledge about my question might drop by and share some knowledge
    {{ DiscussionBoard.errors[9183326].message }}
  • Profile picture of the author Valdor Kiebach
    Have you asked on the unity forum?
    Scripting

    I am not sure what you mean by contour, is it the line joining points of the same temperature just as height contour lines on a map do, if so are you asking how to draw these lines between points?

    This would need a discussion in the unity forum, people need to know if you are using unityscript C# or boo.

    I can share some knowledge but it will be better to have input from other Unity users too, also I only use C#.
    {{ DiscussionBoard.errors[9183398].message }}
  • Profile picture of the author heslil
    Your question still seems unclear. You want to know how to generate a texture from the data you have (the formula) in Unity? As you said you know the contours so all it takes is first discretize the data then fill in the matrix which will be used as the texture of your mesh.
    {{ DiscussionBoard.errors[9204598].message }}

Trending Topics