www.jpct.net

jPCT - a 3d engine for Java => Support => Topic started by: AW999 on December 03, 2009, 09:28:04 pm

Title: Creating 3D objects at runtime?
Post by: AW999 on December 03, 2009, 09:28:04 pm
Does JPCT allow a program to generate 3D objects at runtime? 
Title: Re: Creating 3D objects at runtime?
Post by: EgonOlsen on December 03, 2009, 10:10:06 pm
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.
Title: Re: Creating 3D objects at runtime?
Post by: AW999 on December 04, 2009, 12:31:20 am
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.
Title: Re: Creating 3D objects at runtime?
Post by: 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 (http://www.jpct.net/forum2/index.php/topic,1343.0.html)
Title: Re: Creating 3D objects at runtime?
Post by: AW999 on December 04, 2009, 08:26: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 (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.
Title: Re: Creating 3D objects at runtime?
Post by: trisco on December 05, 2009, 10:14:24 am
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.