Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (541)
Games in Android Showcase (133)
games submitted by our members
Games in WIP (603)
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 1462 times)
0 Members and 1 Guest are viewing this topic.
Offline jackcharlez

Junior Newbie





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

Hello,

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

Thanks
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

http://www.red-zombie.com/blog/wp-content/uploads/2008/04/lion2.jpg

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: 56
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.

[ TriangularPixels.com - 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 Knight


Medals: 30
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
« 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  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

Mr.CodeIt (24 views)
2014-12-23 03:34:11

rwatson462 (55 views)
2014-12-15 09:26:44

Mr.CodeIt (46 views)
2014-12-14 19:50:38

BurntPizza (91 views)
2014-12-09 22:41:13

BurntPizza (113 views)
2014-12-08 04:46:31

JscottyBieshaar (83 views)
2014-12-05 12:39:02

SHC (92 views)
2014-12-03 16:27:13

CopyableCougar4 (101 views)
2014-11-29 21:32:03

toopeicgaming1999 (160 views)
2014-11-26 15:22:04

toopeicgaming1999 (163 views)
2014-11-26 15:20:36
Resources for WIP games
by kpars
2014-12-18 10:26:14

Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50
java-gaming.org 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‑gaming.org
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!