Allegro.cc - Online Community

Allegro.cc Forums » Off-Topic Ordeals » 3D Model Hack!! :D

This thread is locked; no one can reply to it. rss feed Print
 1   2 
3D Model Hack!! :D
Mark Oates
Member #1,146
March 2001
avatar

{"name":"610070","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/1\/5\/15ba2db2a7f5d4a19a69c80ed163b117.png","w":545,"h":253,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/1\/5\/15ba2db2a7f5d4a19a69c80ed163b117"}610070

What is 3D Model Hack?

3D Model Hack is a spontaneous hack-a-thon that literally started right now!

What?! I have to join! What do I do!?

I know, right?! :D

All you have to do is create some 3D models. You can create anything, as long as it's in 3D :)

1. Download Blender.
3. Hack away!
4. Share and post pictures of your models as you work on them
5. Export your model as an .obj to share with others!

But I'm not very good / don't know 3D modeling.

Perfect! That's totally in the spirit of 3D Model Hack. If you've never made a 3D model before, now's the perfect time to start! :D

How long does it run?

Oh, let's say... it'll run until Sunday at 10:00 Eastern Standard Time at which point I'll pick a winner.

How do I win? What do I get!?

By my own discretion, I'll pick the winner. Probably whoever's models are the most amusing. ;D If you can put a UV texture your model, that's a huge plus!

Can I share more than one model?

Absolutely!!! ;D

Now go run off and make some models!
{"name":"610071","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/4\/6\/46f9563e4ad0d945523d6988b8c803f1.gif","w":432,"h":320,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/4\/6\/46f9563e4ad0d945523d6988b8c803f1"}610071

--
Visit CLUBCATT.com for cat shirts, cat mugs, puzzles, art and more <-- coupon code ALLEGRO4LIFE at checkout and get $3 off any order of 3 or more items!

AllegroFlareAllegroFlare DocsAllegroFlare GitHub

Bruce Pascoe
Member #15,931
April 2015
avatar

Haha, that cat GIF is awesome.

Gideon Weems
Member #3,925
October 2003

{"name":"610072","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/2\/c\/2cfc53ed948c3b654eabe4dae8ff5ccf.png","w":1366,"h":768,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/2\/c\/2cfc53ed948c3b654eabe4dae8ff5ccf"}610072

The giant pig will consume us all.

type568
Member #8,381
March 2007
avatar

Damn, the pig has some light on it.

Elias
Member #358
May 2000

{"name":"DJDAbPV.png","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/6\/1\/61b1375a9a62fc1cc3b3aba031521d97.png","w":1920,"h":1080,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/6\/1\/61b1375a9a62fc1cc3b3aba031521d97"}DJDAbPV.png

--
"Either help out or stop whining" - Evert

Sevalecan
Member #4,686
June 2004
avatar

I have created and rendered a close approximation of a Borg Cube.

{"name":"610073","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/2\/b\/2b850abe88917e9180072f82b84faeec.png","w":960,"h":540,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/2\/b\/2b850abe88917e9180072f82b84faeec"}610073

TeamTerradactyl: SevalecanDragon: I should shoot you for even CONSIDERING coding like that, but I was ROFLing too hard to stand up. I love it!
My blog about computer nonsense, etc.

Gideon Weems
Member #3,925
October 2003

Sevalecan gets bonus points for actually figuring out how to export.

Mark Oates
Member #1,146
March 2001
avatar

Awesome entries so far, guys!

The giant pig will consume us all.

:D I figured the pig would make an appearance.

I've trying to make a 3D model of Alex. :) When I inline the image, the preview resizes the animated gif all weird.

610075

Hopefully I have enough time to finish before the deadline!

--
Visit CLUBCATT.com for cat shirts, cat mugs, puzzles, art and more <-- coupon code ALLEGRO4LIFE at checkout and get $3 off any order of 3 or more items!

AllegroFlareAllegroFlare DocsAllegroFlare GitHub

Chris Katko
Member #1,881
January 2002
avatar

{"name":"9D2A88859DDB845DD363F5AF472A604D7CC85E61","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/b\/c\/bc83e32ade16c2e2214758a60bea49c0.jpg","w":1920,"h":1200,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/b\/c\/bc83e32ade16c2e2214758a60bea49c0"}9D2A88859DDB845DD363F5AF472A604D7CC85E61

I only had about 30 minutes to spend on it. Not my best work.

-----sig:
“Programs should be written for people to read, and only incidentally for machines to execute.” - Structure and Interpretation of Computer Programs
"Political Correctness is fascism disguised as manners" --George Carlin

Mark Oates
Member #1,146
March 2001
avatar

Random teaching moment:

So the two main "modes" in Blender are Object Mode and Edit Mode. You can toggle between them by just hitting TAB while your cursor is in the viewport:

{"name":"610079","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/2\/a\/2afb5f51e4a40be9b31fd41af2b941e1.gif","w":441,"h":204,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/2\/a\/2afb5f51e4a40be9b31fd41af2b941e1"}610079

Object Mode lets you move the different models and objects around in your scene.
Press "G" while a model is selected to "grab" the model and move it around. You can constrain the movement to an axis by pressing "X", "Y", or "Z" (note: you select things in blender with the middle right mouse button):

{"name":"610081","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/a\/a\/aad587ccc828c00a928baa88b2cee31a.gif","w":561,"h":319,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/a\/a\/aad587ccc828c00a928baa88b2cee31a"}610081

Edit Mode lets you edit vertexes, faces, and edges on a single object. So you can modify your mesh.:

{"name":"610082","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/d\/a\/da9ad72ed0167247bcd3cbe175ee84b1.gif","w":310,"h":176,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/d\/a\/da9ad72ed0167247bcd3cbe175ee84b1"}610082
You can "grab" and move vertexes, faces, and edges just like in object mode.

Bonus: a really useful modeling technique. In Edit Mode press "E" to "extrude" a face:

{"name":"610083","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/2\/a\/2ab619320f617ee227ad7f9450d427b5.gif","w":243,"h":176,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/2\/a\/2ab619320f617ee227ad7f9450d427b5"}610083

===

Nice Elias, are those textures on the eyes? :)

--
Visit CLUBCATT.com for cat shirts, cat mugs, puzzles, art and more <-- coupon code ALLEGRO4LIFE at checkout and get $3 off any order of 3 or more items!

AllegroFlareAllegroFlare DocsAllegroFlare GitHub

SiegeLord
Member #7,827
October 2006
avatar

This is a deflating baloon:

{"name":"610084","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/8\/2\/82b0a85ffc73784b191c44925c0d7043.png","w":960,"h":540,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/8\/2\/82b0a85ffc73784b191c44925c0d7043"}610084

This is a klingon warship:

{"name":"610085","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/2\/4\/24779b5b8ea724f2b47435fd864d43e9.png","w":960,"h":540,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/2\/4\/24779b5b8ea724f2b47435fd864d43e9"}610085

"For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18
[SiegeLord's Abode][Codes]:[DAllegro5]:[RustAllegro]

Mark Oates
Member #1,146
March 2001
avatar

Woooahhh the Klingon Warship is soooo coool! :D

EDIT:
Now I'm trying to make one ;D
{"name":"610086","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/e\/9\/e97f9d25d5843d7aca7d59995115c84c.png","w":925,"h":512,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/e\/9\/e97f9d25d5843d7aca7d59995115c84c"}610086

--
Visit CLUBCATT.com for cat shirts, cat mugs, puzzles, art and more <-- coupon code ALLEGRO4LIFE at checkout and get $3 off any order of 3 or more items!

AllegroFlareAllegroFlare DocsAllegroFlare GitHub

Elias
Member #358
May 2000

Nice Elias, are those textures on the eyes?

No, the entire thing is 8 spheres (one of them stretched along an axis). I remember the one time I tried textures in Blender it was a real pain, had to first assign U/V coordinates to stuff which just somehow magically worked once but then not again :P

--
"Either help out or stop whining" - Evert

Mark Oates
Member #1,146
March 2001
avatar

Random Teaching Moment: The easiest way to UV Texture your model!

Step 1: Create your model - I made a cube. :)
{"name":"610087","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/6\/f\/6f8aa72ed3742f3a6b5d27f8b3cabecb.png","w":288,"h":182,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/6\/f\/6f8aa72ed3742f3a6b5d27f8b3cabecb"}610087

Step 2: Make a new pane and set it to "UV/Image Editor"
{"name":"610091","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/a\/a\/aa0335732d640019f677029f4f1188d6.gif","w":455,"h":254,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/a\/a\/aa0335732d640019f677029f4f1188d6"}610091

Step 3: In the previous pane, go into Edit Mode (press TAB), and then press "A" so select "all" of the vertices.
{"name":"610092","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/2\/4\/246caf17aa96768b7d481f0ff732b98e.gif","w":477,"h":264,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/2\/4\/246caf17aa96768b7d481f0ff732b98e"}610092

Step 4: In the tools panel on the far left, click on the "Shading/UV" tab, click the dropdown under "UV Mapping:", click "Smart UV Project", and just click OK.
{"name":"610093","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/b\/b\/bb3ae0ae22fb4108fa20051355471f34.gif","w":471,"h":259,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/b\/b\/bb3ae0ae22fb4108fa20051355471f34"}610093

Congratulations! Your model is texture mapped! (But you just can't see it yet ;D )

If you were to export this as an .obj file and then load it into an array of ALLEGRO_VERTEXs, then you could draw your textured model with al_draw_prim() while passing any ALLEGRO_BITMAP as the texture. Cool, huh? 8-)

Now let's just add a reference texture in Blender so we can actually see our UV mapping. :)

Step 5: In the "UV/Image Editor" pane on that bottom menu bar, click the "Open" button with the folder icon on it, and pick your texture from your file system.
{"name":"610095","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/d\/b\/dbf176653abf80867601da682df30496.gif","w":446,"h":258,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/d\/b\/dbf176653abf80867601da682df30496"}610095

And there it is! When you click on the faces of your model, the corresponding texture coordinates will also be hi-lighted on the right pane.

We still can't see the texture on the model yet - one last step. We need to setup our viewport to show us the textures on the models.

Step 6: In the left pane, click the [+] on upper right to expand the panel. Scroll down to "Shading", from the dropdown select "GLSL", and then click the "Textured solid".

{"name":"610096","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/b\/e\/bed81af2d560e17f370e564a1cdaf10c.gif","w":478,"h":261,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/b\/e\/bed81af2d560e17f370e564a1cdaf10c"}610096

;D

You can "grab" and edit vertexes in the UV view the same way you did in 3D view.

--
Visit CLUBCATT.com for cat shirts, cat mugs, puzzles, art and more <-- coupon code ALLEGRO4LIFE at checkout and get $3 off any order of 3 or more items!

AllegroFlareAllegroFlare DocsAllegroFlare GitHub

Chris Katko
Member #1,881
January 2002
avatar

Thanks for the tutorial. I've tried like three times to learn Blender and hated it every single time.

What I want to know is how are you making GIF videos so easy?!. If I made one, it'd probably take at least 5 minutes each to create and upload them and here you are spamming them like you're some sort of reaction gif guy on Reddit.

-----sig:
“Programs should be written for people to read, and only incidentally for machines to execute.” - Structure and Interpretation of Computer Programs
"Political Correctness is fascism disguised as manners" --George Carlin

SiegeLord
Member #7,827
October 2006
avatar

More warp drives for more redundancy (and I remembered about the cycles renderer):

{"name":"610097","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/9\/d\/9d5f43579099166b622a9cb463316503.png","w":960,"h":540,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/9\/d\/9d5f43579099166b622a9cb463316503"}610097

"For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18
[SiegeLord's Abode][Codes]:[DAllegro5]:[RustAllegro]

Mark Oates
Member #1,146
March 2001
avatar

how are you making GIF videos so easy?!

I use a Mac and am using Monosnap.

On Windows, it's a mess. :/ I use Microsoft Expression Encoder and it takes forever to make and the video capture is all messed up. And that doesn't even output to GIF.

[Edit]

*Time now is 8:30PM EST meaning there are only 1 and a half hours left. :o:o:o Get your submissions in!*

[Edit]
I don't think I'll be able to get Alex done in time, but my klingon cruiser doesn't look half bad :)
{"name":"610100","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/7\/8\/7805f659d8f5f4023dc7e37e23c6d0bd.png","w":572,"h":415,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/7\/8\/7805f659d8f5f4023dc7e37e23c6d0bd"}610100

I had some trouble with the texture when I added some new faces to the geometry, (but I figured it out eventually.)
{"name":"610099","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/6\/3\/63e564dcb6cf30ca40086fffbd674551.png","w":536,"h":350,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/6\/3\/63e564dcb6cf30ca40086fffbd674551"}610099

My Final Entry @10:00:

{"name":"610101","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/e\/9\/e95442c47d3efb109e55a5a9c7267417.png","w":716,"h":413,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/e\/9\/e95442c47d3efb109e55a5a9c7267417"}610101
{"name":"610102","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/c\/0\/c032823b28184e148ce82f6eeb42612a.png","w":822,"h":262,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/c\/0\/c032823b28184e148ce82f6eeb42612a"}610102

--
Visit CLUBCATT.com for cat shirts, cat mugs, puzzles, art and more <-- coupon code ALLEGRO4LIFE at checkout and get $3 off any order of 3 or more items!

AllegroFlareAllegroFlare DocsAllegroFlare GitHub

SiegeLord
Member #7,827
October 2006
avatar

One thing that drives me bonkers in Blender is that you can't simply draw a polygon/polyline: you have to start with like a rectangle or something and delete the face and one of the edges and then move/extend the vertices around. This is just as obtuse as GIMP's idea of drawing circles/rectangles (via selections!).

I did quite a bit of simple modeling with LightWave back in the day, but this 'Hack' made try Blender again for serious. Perhaps I could use some of this output in a game or something. Thanks Mark for inspiring me to learn something new ;).

"For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18
[SiegeLord's Abode][Codes]:[DAllegro5]:[RustAllegro]

Mark Oates
Member #1,146
March 2001
avatar

SiegeLord said:

you have to start with like a rectangle or something and delete the face and one of the edges and then move/extend the vertices around.

Yea that's annoying. Despite that, I definitely leveled up by doing this hack, and was able to gain a lot more control when weaving my models and faces. I need to get better at textures, tho.

Here's my Starfleet ship: Download the .obj model

{"name":"610103","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/d\/c\/dca1c5ad8b8817b3e89308e3cc37a429.png","w":492,"h":216,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/d\/c\/dca1c5ad8b8817b3e89308e3cc37a429"}610103

Quote:

Thanks Mark for inspiring me to learn something new ;).

No prob. :) That's the goal :D

--
Visit CLUBCATT.com for cat shirts, cat mugs, puzzles, art and more <-- coupon code ALLEGRO4LIFE at checkout and get $3 off any order of 3 or more items!

AllegroFlareAllegroFlare DocsAllegroFlare GitHub

Neil Roy
Member #2,229
April 2002
avatar

If you do a search on Youtube, there's a bunch of Blender tutorials that are quite good.

Here's a link to a list I have added to as I found them that some may find handy...

https://www.youtube.com/playlist?list=PL2x9r8ZOcIlCTuJOQ2Ttc4Xh-_kl46cub

This is a render I done with it when creating a red ghost for my Deluxe Pacman 2 game...

{"name":"610105","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/0\/d\/0d49a056b216a05c58475d7a8efcf3de.png","w":1280,"h":720,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/0\/d\/0d49a056b216a05c58475d7a8efcf3de"}610105

I'm not sure what the little artifacts are on his head, but this doesn't look too bad.

---
“I love you too.” - last words of Wanda Roy

Bruce Pascoe
Member #15,931
April 2015
avatar

That's a really creepy Blinky. I think it's the nose, it's... off-putting. :P

Neil Roy
Member #2,229
April 2002
avatar

That's a really creepy Blinky. I think it's the nose, it's... off-putting. :P

He's supposed to be creepy and evil, he's one of the worst ones for chasing you (on hard mode where the game's AI acts like the original arcade). ;)

This is a kewl render I done following one of those youtube videos (link above). It was fairly simple to do, but I love the effect...

{"name":"610106","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/0\/b\/0be961a53908ab53adcb9ca59a853dad.png","w":1280,"h":720,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/0\/b\/0be961a53908ab53adcb9ca59a853dad"}610106

---
“I love you too.” - last words of Wanda Roy

Niunio
Member #1,975
March 2002
avatar

Thanks for the tutorial. I've tried like three times to learn Blender and hated it every single time.

Exactly the same happened to me.

Thank you very much, Mark. I'll put this in my bookmarks, and even download this thread HTML to my HD.

-----------------
Current projects: Allegro.pas | MinGRo

Arvidsson
Member #4,603
May 2004
avatar

More tutorials Mark! :) I like the concept of short, to the point, teaching only one thing kind of tutorials.

Schyfis
Member #9,752
May 2008
avatar

What I want to know is how are you making GIF videos so easy?!

I use a Mac and am using Monosnap.

On Windows, it's a mess.

Allow me to emerge from lurker status to slightly derail the thread and introduce everyone to LICEcap: http://www.cockos.com/licecap/
For Windows and Mac, it creates a transparent window you can drag to resize. On the window border is a "Record" button. Simple as that. Most importantly, it's free!

________________________________________________________________________________________________________
[freedwill.us]
[unTied Games]

 1   2 


Go to: