Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (767)
Games in Android Showcase (230)
games submitted by our members
Games in WIP (854)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  JOGL - Hard coding a complex 3D model?  (Read 2619 times)
0 Members and 1 Guest are viewing this topic.
Offline jackcharlez

Junior Newbie

« Posted 2010-04-03 17:31:08 »


What's the best plan of attack if I wanted to hard code a complex 3d model, like a lion or a blade of grass?

If I were to make a lion, would I start with one triangle and keep adding more to form a foot, then more and more to form a leg etc? Or is the a better way of doing it? Either way it seems like it's going to take a lot of effort working out the 3d coordinates for each point Sad

I have to hard code for a uni project, so dI'm not allowed to use 3d modelling software

Offline Karmington

Senior Devvie

Medals: 1
Projects: 1

Co-op Freak

« Reply #1 - Posted 2010-04-03 17:41:45 »

I'd attack a problem as if it were an architectural drawing : do front, side and top views of some _very_ simple object. A lion sounds pretty ambitious,
a blade of grass sounds too unimpressive.

Under no circumstances take on anything that you could not build out of say 12 blocks of lego or 12 simple 3d objects ( square, pyramid, ball ).
one option is to visualize the while thing before hand, plot out the points and tweak for fixes.

A more professional way would be to make a minimalistic editor that makes the square, rectangle, pyramid and ball objects / or plotpoints, and allows you
to move them around in 3d space, and finally save the positions, allowing you to load / display the mode from raw data.

Offline jackcharlez

Junior Newbie

« Reply #2 - Posted 2010-04-03 18:02:58 »

So attempting something like this

Would be waaaaay too complicated? It certainly looks it  Tongue

I have to do an 'impressive animated 3d scene', so I was thinking a lion walking through grass blowing in the wind.  No?
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline SimonH
« Reply #3 - Posted 2010-04-03 18:20:53 »

I have to hard code for a uni project, so dI'm not allowed to use 3d modelling software
This is a very strange assignment; an impressive animated 3d scene but with hard-coded data?  What is he trying to teach you?  Huh

Anyway, my instinct would be towards procedural modelling. All the different trees in 4bidden Fruit for example are all grown from fairly a simple formula which could easily be adapted to 3D. A forest of non-identical trees swaying in the wind would be pretty impressive!

People make games and games make people
Offline Orangy Tang

JGO Kernel

Medals: 57
Projects: 11

Monkey for a head

« Reply #4 - Posted 2010-04-03 18:53:46 »

This is a very strange assignment; an impressive animated 3d scene but with hard-coded data?  What is he trying to teach you?  Huh

Yeah, very odd.

Hard-coding vertices isn't going to be much fun or produce decent results. To get anything half-reasonable you're going to go for something largely generated (possibly from a small set of hand-crafted input data).

One option could be CSG modeling, so your actual hand-crafted data is very high level (brown sphere at x,y, etc.). but a proper CSG implementation is pretty complicated. Another approach might be something image based - heightmaps are an obvious approach (where your input is a greyscale image turned into a 3d height field), or you could take regular 2d sprites and extrude them into solid 3d objects.

[ - Play Growth Spurt, Rescue Squad and Snowman Village ] [ Rebirth - game resource library ]
Offline ryanm

Senior Devvie

Projects: 1
Exp: 15 years

Used to be bleb

« Reply #5 - Posted 2010-04-03 19:16:35 »

Yeah, procedural content is the way to go. For one thing, it'll give you a lot more to write about for your assignment than sitting and typing in vertex data. A couple of ideas:
  • Darwinia-style landscape scene. A simple random heightmap, some fractal trees, fields of swaying grass, etc. It'll be difficult to make it look realistic, so you're best to stick to obviously computer-y looking stuff
  • Exploration of the internals of a Menger Sponge. A high-speed, swooping, twisting path through the internal structure at smaller and smaller scales, trippy feedback textures etc. Bonus points if you can make people queasy
Offline delt0r

JGO Wizard

Medals: 144
Exp: 18 years

Computers can do that?

« Reply #6 - Posted 2010-04-03 19:24:50 »

One way to hard code it, would be to write a python script that converts the 3d model into a java program that compiles! Animation would be a bit harder however, but doable if performance is not too much of a problem (aka almost immediate mode).

I have no special talents. I am only passionately curious.--Albert Einstein
Offline pjt33

« JGO Spiffy Duke »

Medals: 40
Projects: 4
Exp: 7 years

« Reply #7 - Posted 2010-04-03 21:54:32 »

If you do want to go for the CSG approach then I suggest using voxels. Voxel-based height-mapped terrain using Perlin noise can also look very cool.
Pages: [1]
  ignore  |  Print  

EgonOlsen (1328 views)
2018-06-10 19:43:48

EgonOlsen (1204 views)
2018-06-10 19:43:44

EgonOlsen (929 views)
2018-06-10 19:43:20

DesertCoockie (1330 views)
2018-05-13 18:23:11

nelsongames (1110 views)
2018-04-24 18:15:36

nelsongames (1359 views)
2018-04-24 18:14:32

ivj94 (2093 views)
2018-03-24 14:47:39

ivj94 (1251 views)
2018-03-24 14:46:31

ivj94 (2249 views)
2018-03-24 14:43:53

Solater (803 views)
2018-03-17 05:04:08
Deployment and Packaging
by mudlee
2018-08-22 18:09:50

Java Gaming Resources
by gouessej
2018-08-22 08:19:41

Deployment and Packaging
by gouessej
2018-08-22 08:04:08

Deployment and Packaging
by gouessej
2018-08-22 08:03:45

Deployment and Packaging
by philfrei
2018-08-20 02:33:38

Deployment and Packaging
by philfrei
2018-08-20 02:29:55

Deployment and Packaging
by philfrei
2018-08-19 23:56:20

Deployment and Packaging
by philfrei
2018-08-19 23:54:46 is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!