Creating 3D objects at runtime?

Started by AW999, December 03, 2009, 09:28:04 PM

Previous topic - Next topic

AW999

Does JPCT allow a program to generate 3D objects at runtime? 

EgonOlsen

Of course. You can always create new Object3Ds and add triangles to it. The only precondition is, that you have to know the polygon count of your object before creating it.

AW999

Thank you for your reply. What's the easiest way to handle terrain?  I thought I read somewhere that there was a special feature for it, but I can't find the page now.

EgonOlsen

What do you mean by "handle"? Create or render it? For creation, have a look at this thread: http://www.jpct.net/forum2/index.php/topic,1343.0.html

AW999

Quote from: EgonOlsen on December 04, 2009, 04:51:46 PM
What do you mean by "handle"? Create or render it? For creation, have a look at this thread: http://www.jpct.net/forum2/index.php/topic,1343.0.html

  Thank you - that should be a big help. But if I'm wondering if there's any other way to do it, such as a 'heightmap' type 2D array separate from any 3D polygon objects?  I remember coming across a webpage that seemed to imply that something of that sort was possible, although I may have misinterpreted.

trisco

you could dynamically generate a perlin noise map or load a greyscale bitmap and displace the terrain vertices based on that map, however, that doesn't change anything about the basic terrain creating as shown by EgonOlsen.