Author Topic: Creating 3D objects at runtime?  (Read 3434 times)

Offline AW999

  • int
  • **
  • Posts: 57
    • View Profile
Creating 3D objects at runtime?
« on: December 03, 2009, 09:28:04 pm »
Does JPCT allow a program to generate 3D objects at runtime? 

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: Creating 3D objects at runtime?
« Reply #1 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.

Offline AW999

  • int
  • **
  • Posts: 57
    • View Profile
Re: Creating 3D objects at runtime?
« Reply #2 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.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: Creating 3D objects at runtime?
« Reply #3 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

Offline AW999

  • int
  • **
  • Posts: 57
    • View Profile
Re: Creating 3D objects at runtime?
« Reply #4 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

  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.

Offline trisco

  • byte
  • *
  • Posts: 23
    • View Profile
Re: Creating 3D objects at runtime?
« Reply #5 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.