November 20, 2009

3D Beach Scene

Outdoor rendering using Blender 2.49b. Utilizing Blender internal renderer and GIMP. Works on real-time too (GLSL bumps, reflections, etc..). Pine trees are real 3D and highly optimized. Images are not final. Darken, noised & untextured on purpose :)








October 22, 2009

What to Blog about?

Someone ask me "What to Blog about?" and this is just my opinion...

First of all, let me share with you. Why this page "My Blog" exist.

I want to learn more. I always refer to other developer's Blog. They don't charge me anything at all!. They are great and successful developers/artist/deviners - and they are willing to share their works and ideas, tips and tutorials for free. Like they says, more knowledge you share, more you will learn.

I love programming, 3D graphics and computer games - since I was a kid. When I was in primary school, I even wrote to "Electronic Arts" - telling them that I love their games so much. After a few weeks, they do reply me - with appreciation letters - and the best thing is, they even sent a full color printer copies of their games catalog! That was 20 years ago.

Now, communication doesn't takes days anymore. The technology spread rapidly like wildfire across the world. Without knowledge, the technology are useless.

Technology and knowledge grows together. There are too many things to cope up with. Too many things to know, too many things to learn - one person will not have all those knowledge, but one person can focus on their own expertise to enrich their knowledge.

I do refer to my own Blog for solution which I have forgotten.

This is my suggestion for what to write on your blog..

If you loves storybooks/write storybooks..
  1. Review on books you read + cover image
  2. Vocab dictionary - having multiple languages are much more better
  3. Ancient words dictionary - and guide on how to use it
  4. Write your own online storybooks

If you loves cars..
  1. Review on cars. Specs
  2. Tips on maintainance
  3. Pictures, pictures and lots of pictures - or even videos!
  4. Makeover, paintjob - can do it in free image manipulation software like Gimp

If you loves plants/trees..
  1. Write about plants
  2. Tips on planting
  3. Pictures, pictures and lots of pictures!


That's all what I can think of. :)
Amende laa aku merapu nih! hehe..

October 19, 2009

Internet: Apa yang ibubapa perlu tahu?

Raya dah abis. So, standard aa.. time Raya, jumpa senior citizens, ibubapa, pakcik makcik, sedara-mara, etc. My family and almost everybody here in Malaysia ada access Internet - from Desktop, Laptops (mini laptops, notebook) and handphone.

What written here, based on 2009 technology in Malaysia and just my opinion/point-of-view.

Kat sini, I won't touch much about Handphone, just desktops and laptops. Sebab, Handphone, screen dia kecik - kurang sesuai untuk pendidikan. Handphone lebih sesuai untuk entertainment - music, videos socializing(communication) media.

"What is Internet?"

Internet adalah jaringan wired/wireless communication. Jaringan ini membolehkan setiap satu alat (Desktops/Laptops/HP/etc) yang mempunyai sambungan ke Internet berinteraksi/bercomumnicate antara satu sama lain.

"Amende yang dicommunicate tu?"

Data! atau lebih ringkas binary. Binary ialah 1 dan 0. Binary yang diwakili oleh signal 'on' and 'off' kat electronic devices. Setiap satu 1 and 0 dikenali sebagai 1 bit. 1 bit hampir kepada kelajuan cahaya. Sebab tu computer dulu-dulu ada yang 8 dan 16 bit. Sekarang 32 dan 64 bit. Contohnya 64-bit, menghantar 64 signal 'on' and 'off' serentak.

Setiap 8-bit = 1 byte. Untuk lebih mudah 1 byte = 1 character/huruf. Hmm.. nie too basic. Citer sampai esok pun tak abis..

Susunan bit ini akan jadi text, arahan, music, lagu, gambar, movie dan apa saja bentuk data - termasuklah worm and virus.

"Apa ada kat Internet?"

Macam-macam ada. Daripada bahan-bahan rujukan dan pembelajaran sehiggalah bahan-bahan hiburan, daripada bahan-bahan sejarah sehiggalah project-project prototype, daripada benda yang baik sampailah kepada benda-benda tak baik. Mana aku tau? - Tau aaa sebab almost semua aku dah try.. hehe..

"Kat TV slalu kuar berita pasal benda-benda pirate. Anak-anak lak slalu beli CD/DVD pirate! Aku dan korang pun beli gak kat pasar malam!!!??"

Dah mak bapak pun beli CD/DVD pirate, aku tak leh nak cakap apa aa.. hehe.. Okay. First of all, kenapa jadi pirate? Pirate jadi sebab software tersebut tidak dibeli dengan MAHAL( > RM10) secara SAH.

"Mahal la internet nie!"

Tak semestinya. Korang cuma perlu beli Desktops/Laptops/Notebooks (lepas nie aku panggil PC (Personal Computer) je.. nak type banyak-banyak, panjang lak..) dan subscribe Internet sama ada dari Telekom-Streamyx (wired), Celcom (Wireless), Maxis(Wireless), Digi(Wireless) atau P1(Wireless) - sila tanya diorg tentang coverage - contoh soklan "Wahai Adik manis yang comel, kat area rumah abang ada 3G tak?"

"Itu aje?"

Tak abis lagi. Ada sikit jer lagi. Biasa dengan Windows? Windows dibuat oleh Microsoft atau lebih dikenali sebagai M$. Dimana M$ perlu dibeli dan menjadi sasaran utama virus and worms. Sekiranya PC takde Windows atau tak dibeli bersama Windows, aku cadangkan sejenis Operating System yang dikenali sebagai Ubuntu untuk mengambil alih tugas Windows.

Ubuntu sejenis Operating System berasaskan Linux yang OpenSource.

"OpenSource nie apa lak?"

Open source nie ialah software dan teknik yang dibangunkan beramai-ramai oleh sesiapa sahaja (contributor) seluruh dunia yang diberikan percuma kepada sesiapa sahaja yang memerlukan (user) - korang dan aku.

"Apa yang best ngan OpenSource?"

Open = telus, Source = Sourcecode. Source code adalah arahan-arahan yang dapat ditafsirkan oleh PC untuk menjalankan tugas - dan korang mempunyai hak untuk mengubah dan mengetahui setiap arahan-arahan tersebut. Arahan-arahan tersebut dinyataka secara terperinci. Sekiranya korang terrer.. korang juga diberi peluang untuk menjadi contributor. Kalau korang kurang terrer, korang diberi peluang untuk memberi cadangan untuk menjadikan software tersebut lebih besstt!!. Kalau korang lagi lagi lagi tak terrer, tau complain je, korang juga diberi peluang untuk complain. Bayangkan beratus ribu ideas, beratus ribu complains/feedbacks dan beratus ribu contributors working together tanpa mengira agama dan bangsa untuk menghasilkan sesuatu product!

"Apasal diorang bagi/buat free-free je?"

Apasal korang menderma? Apasal korang nak share ilmu? Apasal korang bagi makan kat anak? Semuanya adalah untuk kegunaan generasi masa depan..

"Mana mau dapat?"

Download kat sini.. http://www.ubuntu.com/ ingat! Wajib membaca! Jangan malas. Membaca sumber ilmu.

Pastu burn kat CD. Pastu follow je instruction... "haaaiiizzz.. baca lagii.."

Anak-anak malas baca buku. Exam tak bagus. Matematik lembab! Sebab apa? Sebab mak bapak pun malas membaca. Pastu salahkan anak yang lebih advance. Kat dalam paper pun selalu kuar bahagian technology. Mmm.. korang tak baca pun (hehe.. aku agak je..). Kalau baca, Alhamdulillah..

Step-step seterusnya memerlukan lebih banyak pembacaan.. Kalau rasa otak dah jem, ghontikan lah.. gie la layan sinetron, konsert RTM (hehe jgn marah..), drama, atau citer-citer yang sesuai untuk generasi korang...

Ubuntu akan di Install bersama software-software biasa seperti OpenOffice (utk buat keje), Fireofox (Internet Browsing), Gimp (Edit gambar) dan lain-lain (korang explore la sendiri).

"Apa yang Ubuntu tak install?"

Sememangnya semua benda yang user biasa pakai, Ubuntu dah Install. Lain lah kalau korang Engineers, Architects, Scientists, Doctors atau apa-apa bidang kepakaran lain. Bukannya takde yang OpenSource, cuma tak di Install bersama Ubuntu. And most of experts pakai OpenSource.

"Aku tak expert. Kena ke pakai OpenSource?"

Kalau macam tu, pakai jer la Ubuntu with pre-installed softwares. Mana tau tetiba korang leh jadi expert.

"Aku bukannya nak jadi expert"

Tu passal la artikel nie just guidance untuk ibu bapa. Supaya anak-anak aku dan korang jadi experts"

"Kenapa ko nie pro OpenSource?"

Aku nak menggalakkan perkembangan ilmu. Menggalakan sharing of knowledge. Menggalakkan pembacaan. Artikel aku tunggang langgang. Kenapa? Sebab aku mengutamakan content - aku harap lebih mudah paham - tak skema, tak boring and lebih dekat dengan pembaca/visitors - Korang dah baca sampai sini, ayat-ayat skema bab technology yang kat dalam sotkabar tu korang baca sampai abis ke? Ayat-ayat skema - aku pun malas nak type..

Kalau dah ada Windows, install Firefox.. Download kat sini www.mozilla.com. Kenapa? Sebab, aku rasa Firefox lagi best.. and sebab dia OpenSource.

.. and install OpenOffice. Download kat sini OpenOffice. Sebab OpenOffice bleh support lebih banyak format and buat pdf straight away... and dia OpenSource!

Let's continue..

Bila sumer dah setup, PC and Internet, aku cadangkan korang gie laa masuk youtube.. . Berikut some channels yang best kat youtube.
  1. MakeMagazine
  2. Discovery
  3. National Geographic
  4. dan macam-macam lagi.. search jer kat youtube tu

Kengkadang ada gak sumber-sumber ilmu kat youtube yang kita kat sini tak leh access.. cara-cara bypass kat artikel aky yang nie.. Proxy country

Selain daripada tu, sekiranya anak-anak korang dah ter advanced sesangat, ajak diorang masuk sini. Massachusetts Institute of Technology. Syllabus, lectures recording and notes diberi secara percuma dalam berbagai bidang.

Gunakan search engine Google untuk carik notes atau projects daripada overseas Univerisities.. kaedah nyedut (download) yang aku sarankan kat artikel aku yang nie.. Sedut Notes

Lain-lain site yang menarik..
  1. HowStuffWorks - Learn How Everything Works!
  2. SesameSteet (Amaran! Untuk kanak kanak sahaja)

Kalau korang tau mana-mana site educational lain yang menarik, bleh aa tambah kat comment.

Dah laa.. nak gie makan.. lapo plak.. kang kalau aku rasa nak tambah, aku tambah..

Sekian..

Oh ya.. lupa nak bagi tau.. Sekiranya lebih banyak benda yang boleh dibuat - sebab dah tau camner nak buat - educational. Anak-anak dah takde masa untuk sex and porn - it's the same thing - 2 kaki, 2 tangan.. whereby, technology + education sentiasa berkembang and evolves - new things everyday. Rugi woo kalau tak catchup!

October 15, 2009

Masalah "Country" ngan youtube - tak dpt tengok!

Hehe.. tajuk mcm hampehkan? - SEO friendly tuu..

Aku ske sagat tengok youtube. Mcm2 ada - Especially National Geographic! Kengkadang kena block/censored - error msg.. bla.. bla.. "not available in your country" n x dpt tengok.

Jgn putus asa. Nak tengok youtube censored mcm nie senang je.. pakai proxy.

Kaedah 1.
Google jer freeproxy. Pilih mana2 site yg provide service nie. Diorg akan bagi satu input bar. type: http://www.youtube.com. Browse youtube - carik citer yg kena censored tu kat situ - kat situ maknanya, ada 2 layer. 1st layer, layer free proxy, 2nd layer = youtube. So.. video tu dah dpt tengok tanpa error bla.. bla.. "not available in your country" bodoh tu.

Kaedah 2.
Firefox addon.. nanti aku sambung.. nak layan youtube jap (dah abis load - internet speed mcm siput babi! terpaksa download dulu pakai FreeDownloadManager http://www.freedownloadmanager.org)

Nanti2 aku sambung...

October 4, 2009

.. and when I'm bored! [ my F-15E: 3D Blender Model ]


I play with texture painting in Blender.




Nak comment.. sila2.. jgn segan2.
Translation: Comments appreciated.
Those images are made from free 3D application called Blender and image manipulator called Gimp. You can do it too. Get Blender for free from www.blender.com and Gimp at www.gimp.org.

Thank you!

September 10, 2009

Stealing Password aka Simple Hacking 101

Mungkin tak sedar.. mungkin tak tau.. atau mungkin..

"I don't care.. so what? You are so paranoid!!!" - templakan yang sama yang slalu aku kena bila bagi nasihat/pandangan drpd kengkawan or almost everybody..

Pengalaman dolu-dolu keje kat company luar yg specialize on security/military mmg best - ngadap PC je.. programming and optimizing..

Enough bullshit..

Let's start stealing password..
  1. Sumer e-mail ada recovery password recovery system.
  2. Almost sumer soklan utk password recovery bleh carik kat online. Dulu henjut info ICQ and x banyak site that provide those kind of information. Skarang macam-macam ada.. tempat lahir, dob, nama skolah.. & almost all info mangsa2 akan sesuka je publish - korang sendiri mau ingat aaa.. kat mana yg korang dah publish..
  3. Apa bleh dpt drpd e-mail? Almost everything.. linking to another password accounts, personality, patterns..
  4. Biasanya password yg sama akan digunakan utk account2 yg lain.
  5. Pretending to be the mangsa - online - chat/email can assist gaining further information required.
Dapat 1, yang lain dah mudah...

Mmmm.. oleh sbb penceritaan aku berterabur.. sekian adalah penceritaan semula oleh ibn.azzis..

meh aku terangkan..

Semua emel ada password recovery system. Soalan-soalan yang digunakan dalam password recovery system tu pulak selalunya soalan yang typical :: tarikh lahir, nama mak, tempat lahir, tarikh ulang tahun. Dan jawapan-jawapan tu pulak bole didapati dengan mudah. Contoh? Bole fikir sendiri..

Orang simpan macam-macam dalam emel tu. Mungkin password ke emel lain, login id & password tuk internet banking. Mungkin jugak gambar-gambar :: yang berkenaan mahupun tak. Maknanya, bila da dapat akses ke emel tu, macam-macam jugak la yang akan ditemui.

Dan biasanya jugak, password tuk semua emel adalah sama. Senang nak ingat, takyah pening-pening. Orang kita tak sensitif. Tak rajin tukar password. Katanya tak penting. Abes, bila da akaun CIMBclicks kena hijack, baru nak nyesal?

Yang kat atas tu adalah tuk orang yang rajin menggodek, meng'google. Yang ni pulak namanya social engineering. Di mana, pencurik ni akan berlakon, buat baik, kononnya tolong setelkan problem emel ke pe ke. Bila da dapat password, setel la keje nye..

Sekian & Slamat berbuka..

Diharap dapat membantu... thanks ibn.azzis...

June 29, 2009

I WAS in LOVE with Adobe Director until 11.5

Made this with Director MX, republished with 11, runs well with 11. Until... and the project halted since the new player requires me to buy new version of Director. WTF!!! And they don't even support Shaders - at this time. And they are still buggy (please refer to Adobe Director forum)

It's not so great, but took me many hours of time and efforts..

Here's the screenshots one of my personal project (I'm not able to release client's project screenshots)

Opening screen.. procedural texture and models are generated here.

Orbiting the space.. showing Earth, Sun, Mars and some stars on the background.

Fly through the procedural generated landscape.. terrain and clouds (clouds are generated according to the terrain heights.

Water.. fake reflection, multi-texture waves

Finally, smoke and fire... burn the terrain with mouse (carve your wive's name or your mother in-law)

To get these screenshots I have to open through Director using .dir file. Director's .dcr and .exe won't work anymore.

That's about it. Life sucks!

June 28, 2009

2007 rendering with 3D Studio Max






I don't know what to tell about this project. Just smoke, glass, butts.. mm and some emitter..

Some Interrior 3D Rendering few months ago..






Some info in the image will remain hidden. :)

June 26, 2009

Abusing Blender 2.49a and Fix the Black/Dark 3D Objects

I've been discouraged on using Blender last few years because of my ATI glitches - black screen, blue screen, broken textures, weird texture, weird pattern, etc. Last few days, once again I tried to eliminate or at least minimize those random bugs during GLSL.

Until now I've been trying to replicate those glitches with my new tweak. There are no glitches anymore unless adding 2 or more lights (1 hemi and 1 spot still runs well for me)

Here's my tweak.. with ATI tray tools (I'm using ATI 9600xt)

[HKEY_CURRENT_USER\Software\Ray Adams\ATITrayTools\Profiles\d3d\myProfileMax]
"FlipQueueSize"="1"
"SwapEffect"="0"
"LODAdj"="0"
"ASTT"="1"
"ASD"="1"
"AreaAniso"="1"
"AntiAlias"="2"
"AntiAliasSamples"="6"
"AnisoType"="0"
"AnisoDegree"="16"
"TextureOpt"="0"
"TextureLod"="0"
"VSync"="1"
"TruformMode"="0"
"PixelCenter"="0"
"ExportCompressedTex"="1"
"ExportBumpMappedTex"="1"
"AnisotropyOptimise"="1"
"TrilinearOptimise"="1"
"CatalystAI"="1"
"GI"="1"
"ATMS"="2"
"TemporalAAMultiplier"="2"
"TemporalAAFrameThreshold"="0"
"EnableTripleBuffering"="1"
"ForceZBufferDepth"="0"
"OGLCustomSwapSourceFile"=""


That's what in my registry for ATI Tray Tools.

Update: 11 October 2009.

Enable the Temporal AA and Anisotropic AA to fix the black/dark objects.

Here's my xml Catalyst profile (for Catalyst - if not using ATI Tray tools)
This xml file located in:

C:\Documents and Settings\ [your name] \Local Settings\Application Data\ATI\ACE\Profiles

NOTE: I have 2 profiles. 1 with TAA and AAA and another without TAA and AAA. Why? Because with TAA and AAA, "Sculpting" and "Painting" won't work. Simply switching one profile to another will simplify my work. During sculpting and painting, I am not going to use GLSL.

<Profile> <Caste name="Graphics"> <Groups /> <Feature name="PanningMode"> <Property name="PanningMode_Control" value="At_Least_One_No_Panning" /> </Feature> <Feature name="DisplayDetection"> <Property name="DisplayDetection_Control" value="Manual" /> </Feature> <Feature name="Platform" /> <Adapter name= "PCI_VEN_1002&DEV_4152&SUBSYS_2096148C&REV_00_4&354AEA31&0&0008A"> <Feature name="Active"> <Property name="Active_Control" value="True" /> </Feature> <Feature name="Primary"> <Property name="Primary_Control" value="True" /> </Feature> <Feature name="Mode"> <Property name = "ModeInfo_Control" value = "Width:1152; Height:864; Bpp:32; RefreshRate:60; ModeFlag:0; Orientatio n:0; XPos:0; YPos:0;" /> </Feature> <Feature name = "MappingInfo"> <Property name = "MappingInfo_Control" value = "1stControllerDevice:0; 2ndControllerDevice:NIL; Manner(Single):0;" /> </Feature> <Feature name="CrossDisplay"> <Property name="XDMode_Control" value="MultipleAdapter" /> <Property name="DisplayAdapterIndex_Control" value="0" /> <Property name="RenderAdapterIndex_Control" value="0" /> </Feature> <Aspect name="DisplaysColour2"> <Feature name="ATIMode_3D"> <Property name="ATIMode_3D" value="True" /> </Feature> <Feature name="FullScreen3D"> <Property name ="FullScreen3D" value ="Gamma_Red:1; Gamma_Green:1; Gamma_Blue:1; Brightness_Red:0; Brightnes s_Green:0; Brightness_Blue:0; Contrast_Red:100; Contrast_Green:100; Contrast _Blue:100;" /> </Feature> <Feature name="ATIMode_Desktop"> <Property name="ATIMode_Desktop" value="True" /> </Feature> <Feature name="Desktop"> <Property name ="Desktop" value ="Gamma_Red:1; Gamma_Green:1; Gamma_Blue:1; Brightness_Red:0; Brightnes s_Green:0; Brightness_Blue:0; Contrast_Red:100; Contrast_Green:100; Contrast _Blue:100;" /> </Feature> <Feature name="LUT_Desktop"> <Property name="LUT_Desktop" value=" 0,0,0,257,257,257,514,514,514,771,771,771,1028,1028,1028, 1285,1285,1285,1542,1542,1542,1799,1799,1799,2056,2056,2056, 2313,2313,2313,2570,2570,2570,2827,2827,2827,3084,3084,3084, 3341,3341,3341,3598,3598,3598,3855,3855,3855,4112,4112,4112, 4369,4369,4369,4626,4626,4626,4883,4883,4883,5140,5140,5140, 5397,5397,5397,5654,5654,5654,5911,5911,5911,6168,6168,6168, 6425,6425,6425,6682,6682,6682,6939,6939,6939,7196,7196,7196, 7453,7453,7453,7710,7710,7710,7967,7967,7967,8224,8224,8224, 8481,8481,8481,8738,8738,8738,8995,8995,8995,9252,9252,9252, 9509,9509,9509,9766,9766,9766,10023,10023,10023,10280,10280, 10280,10537,10537,10537,10794,10794,10794,11051,11051,11051, 11308,11308,11308,11565,11565,11565,11822,11822,11822,12079, 12079,12079,12336,12336,12336,12593,12593,12593,12850,12850, 12850,13107,13107,13107,13364,13364,13364,13621,13621,13621, 13878,13878,13878,14135,14135,14135,14392,14392,14392,14649, 14649,14649,14906,14906,14906,15163,15163,15163,15420,15420, 15420,15677,15677,15677,15934,15934,15934,16191,16191,16191, 16448,16448,16448,16705,16705,16705,16962,16962,16962,17219, 17219,17219,17476,17476,17476,17733,17733,17733,17990,17990, 17990,18247,18247,18247,18504,18504,18504,18761,18761,18761, 19018,19018,19018,19275,19275,19275,19532,19532,19532,19789, 19789,19789,20046,20046,20046,20303,20303,20303,20560,20560, 20560,20817,20817,20817,21074,21074,21074,21331,21331,21331, 21588,21588,21588,21845,21845,21845,22102,22102,22102,22359, 22359,22359,22616,22616,22616,22873,22873,22873,23130,23130, 23130,23387,23387,23387,23644,23644,23644,23901,23901,23901, 24158,24158,24158,24415,24415,24415,24672,24672,24672,24929, 24929,24929,25186,25186,25186,25443,25443,25443,25700,25700, 25700,25957,25957,25957,26214,26214,26214,26471,26471,26471, 26728,26728,26728,26985,26985,26985,27242,27242,27242,27499, 27499,27499,27756,27756,27756,28013,28013,28013,28270,28270, 28270,28527,28527,28527,28784,28784,28784,29041,29041,29041, 29298,29298,29298,29555,29555,29555,29812,29812,29812,30069, 30069,30069,30326,30326,30326,30583,30583,30583,30840,30840, 30840,31097,31097,31097,31354,31354,31354,31611,31611,31611, 31868,31868,31868,32125,32125,32125,32382,32382,32382,32639, 32639,32639,32896,32896,32896,33153,33153,33153,33410,33410, 33410,33667,33667,33667,33924,33924,33924,34181,34181,34181, 34438,34438,34438,34695,34695,34695,34952,34952,34952,35209, 35209,35209,35466,35466,35466,35723,35723,35723,35980,35980, 35980,36237,36237,36237,36494,36494,36494,36751,36751,36751, 37008,37008,37008,37265,37265,37265,37522,37522,37522,37779, 37779,37779,38036,38036,38036,38293,38293,38293,38550,38550, 38550,38807,38807,38807,39064,39064,39064,39321,39321,39321, 39578,39578,39578,39835,39835,39835,40092,40092,40092,40349, 40349,40349,40606,40606,40606,40863,40863,40863,41120,41120, 41120,41377,41377,41377,41634,41634,41634,41891,41891,41891, 42148,42148,42148,42405,42405,42405,42662,42662,42662,42919, 42919,42919,43176,43176,43176,43433,43433,43433,43690,43690, 43690,43947,43947,43947,44204,44204,44204,44461,44461,44461, 44718,44718,44718,44975,44975,44975,45232,45232,45232,45489, 45489,45489,45746,45746,45746,46003,46003,46003,46260,46260, 46260,46517,46517,46517,46774,46774,46774,47031,47031,47031, 47288,47288,47288,47545,47545,47545,47802,47802,47802,48059, 48059,48059,48316,48316,48316,48573,48573,48573,48830,48830, 48830,49087,49087,49087,49344,49344,49344,49601,49601,49601, 49858,49858,49858,50115,50115,50115,50372,50372,50372,50629, 50629,50629,50886,50886,50886,51143,51143,51143,51400,51400, 51400,51657,51657,51657,51914,51914,51914,52171,52171,52171, 52428,52428,52428,52685,52685,52685,52942,52942,52942,53199, 53199,53199,53456,53456,53456,53713,53713,53713,53970,53970, 53970,54227,54227,54227,54484,54484,54484,54741,54741,54741, 54998,54998,54998,55255,55255,55255,55512,55512,55512,55769, 55769,55769,56026,56026,56026,56283,56283,56283,56540,56540, 56540,56797,56797,56797,57054,57054,57054,57311,57311,57311, 57568,57568,57568,57825,57825,57825,58082,58082,58082,58339, 58339,58339,58596,58596,58596,58853,58853,58853,59110,59110, 59110,59367,59367,59367,59624,59624,59624,59881,59881,59881, 60138,60138,60138,60395,60395,60395,60652,60652,60652,60909, 60909,60909,61166,61166,61166,61423,61423,61423,61680,61680, 61680,61937,61937,61937,62194,62194,62194,62451,62451,62451, 62708,62708,62708,62965,62965,62965,63222,63222,63222,63479, 63479,63479,63736,63736,63736,63993,63993,63993,64250,64250, 64250,64507,64507,64507,64764,64764,64764,65021,65021,65021, 65278,65278,65278,65535,65535,65535," /> </Feature> <Feature name="BlackAndWhite"> <Property name="BlackAndWhite_Control" value="0" /> </Feature> </Aspect> <Aspect name="DisplaysOptions"> <Feature name="3DRefreshRateOverride"> <Property name="RefreshRateOverride_Control" value="0;Disabled" /> </Feature> <Feature name="MouseTracksOrientation"> <Property name="MouseTracksOrientation_Control" value="True" /> </Feature> <Feature name="ForceTVDetection"> <Property name="ForceTVDetection_Control" value="False" /> </Feature> <Feature name="ForceCVDetection"> <Property name="ForceCVDetection_Control" value="False" /> </Feature> </Aspect> <Aspect name="VPURecover"> <Feature name="VPUEnableSubmissionBox"> <Property name="VPUEnableSubmissionBox_Control" value="Enable" /> </Feature> <Feature name="DisableSmartSave"> <Property name="DisableSmartSave_Control" value="Enable" /> </Feature> </Aspect> <Aspect name="Radeon3D"> <Feature name="Main3D"> <Property name="Main3D" value="CusSelection" /> </Feature> <Feature name="AntiAlias"> <Property name="AntiAlias" value="On" /> <Property name="AntiAliasSamples" value="2" /> </Feature> <Feature name="AnisoType"> <Property name="AnisoType" value="App" /> <Property name="AnisoDegree" value="0" /> <Property name="AreaAniso" value="Disable" /> </Feature> <Feature name="TextureLod"> <Property name="TextureLod" value="HiPerformance" /> </Feature> <Feature name="VSyncControl"> <Property name="VSyncControl" value="AppPerformance" /> </Feature> <Feature name="EnableTripleBuffering"> <Property name="EnableTripleBuffering" value="Enable" /> </Feature> <Feature name="TemporalAAMultiplier"> <Property name="TemporalAAMultiplier" value="Enable2" /> </Feature> <Feature name="CatalystAI"> <Property name="CatalystAI" value="Disable" /> </Feature> <Feature name="GI"> <Property name="GI" value="Enable" /> </Feature> <Feature name="ASTT"> <Property name="ASTT" value="Enable" /> <Property name="AdaptiveAAMethod" value="SuperSample" /> <Property name="ASD" value="Performance" /> <Property name="ATMS" value="Disabled" /> </Feature> <Feature name="AAF"> <Property name="AAF" value="" /> </Feature> <Feature name="DisplayCrossfireLogo"> <Property name="BooleanWriteableProperty" value="False" /> </Feature> <Feature name="ForceHigh3DClocks"> <Property name="ForceHigh3DClocks" value="Disable" /> </Feature> </Aspect> <Aspect name="MMVideo"> <Feature name="MainVideo"> <Property name="MainVideo" value="0" /> </Feature> <Feature name="VideoVision"> <Property name="VideoVision_brightness" value="0" /> <Property name="VideoVision_contrast" value="0" /> <Property name="VideoVision_saturation" value="0" /> <Property name="VideoVision_gamma" value="0" /> <Property name="VideoVision_hue" value="0" /> <Property name="VideoVision_appdecide" value="True" /> </Feature> <Feature name="TheaterMode"> <Property name="TheaterMode_DisplayMode" value="0" /> <Property name="TheaterMode_TheaterSettings" value="0" /> </Feature> <Feature name="Deinterlacing"> <Property name="Deinterlacing_Deinterlacing" value="0" /> <Property name="Deinterlacing_EnableDeinterlacing" value="True" /> </Feature> <Feature name="DXVA_WMV"> <Property name="DXVA_WMV" value="False" /> </Feature> <Feature name="3to2Pulldown"> <Property name="3to2Pulldown" value="False" /> </Feature> <Feature name="dynamicContrast"> <Property name="dynamicContrast" value="False" /> </Feature> <Feature name="Detail"> <Property name="Detail_Detail" value="0" /> <Property name="Detail_EnableDetail" value="False" /> </Feature> <Feature name="Denoise"> <Property name="Denoise_Denoise" value="0" /> <Property name="Denoise_EnableDenoise" value="False" /> </Feature> <Feature name="FleshTone"> <Property name="FleshTone_FleshTone" value="0" /> <Property name="FleshTone_EnableFleshTone" value="False" /> </Feature> <Feature name="ColorVibrance"> <Property name="ColorVibrance_ColorVibrance" value="0" /> <Property name="ColorVibrance_EnableColorVibrance" value="False" /> </Feature> </Aspect> </Adapter> <Adapter name= "PCI_VEN_1002&DEV_4172&SUBSYS_2097148C&REV_00_4&354AEA31&0&0108A"> <Feature name="Active"> <Property name="Active_Control" value="False" /> </Feature> <Feature name="Primary"> <Property name="Primary_Control" value="False" /> </Feature> <Feature name="Mode"> <Property name = "ModeInfo_Control" value = "Width:640; Height:480; Bpp:8; RefreshRate:60; ModeFlag:0; Orientation: 0; XPos:1024;YPos:0;" /> </Feature> <Feature name="MappingInfo"> <Property name ="MappingInfo_Control" value ="1stControllerDevice:NIL; 2ndControllerDevice:NIL; Manner(NotActive) :-1;" /> </Feature> <Feature name="CrossDisplay"> <Property name="XDMode_Control" value="MultipleAdapter" /> <Property name="DisplayAdapterIndex_Control" value="0" /> <Property name="RenderAdapterIndex_Control" value="0" /> </Feature> </Adapter> </Caste> </Profile>

Remake: F-15 100% Blender WIP


The previous F-15 Model are nice.. but.. build with tris not quads. I decided to remodel from scratch with 100% blender... and of course aimed for real-time.

The new version fixes..
  1. normals
  2. quads!
  3. easy and nicer progressive meshes implementation
  4. unlimited high detail smooth model
  5. shaders!
  6. real-time reflection
  7. real-time mirror
  8. reat-time shadow
More images coming... - If I'm not lazy..

June 15, 2009

Custom 3D Loader and Viewer

10 OCT 2015. NOTE: This is too old - outdated code. (The concept of retrieving/loading data/vertex still can be use)
OpenGL 3D object loader in action!

Made this on somewhere around 2007 - on my other site. Posting the source code here..

// 3D Viewer for Ababil // Created by MZIskandar 2007 #define WIN32_LEAN_AND_MEAN #include <windows.h> #include <stdio.h> #include <GL/gl.h> #include <GL/glu.h> #include <GL/glext.h> #include <time.h> #include "3DData.h" // Windows globals, defines, and prototypes char szAppName[] = "3D Viewer"; HWND ghWnd; HDC ghDC; HGLRC ghRC; #define SWAPBUFFERS SwapBuffers(ghDC) #define WIDTH 640 #define HEIGHT 320 LONG WINAPI MainWndProc (HWND, UINT, WPARAM, LPARAM); BOOL bSetupPixelFormat(HDC); // OpenGL globals, defines, and prototypes float aspect = (float)WIDTH / (float)HEIGHT; float zNear = 1.0f; float zFar = 1024.0f; float TWOPI_OVER_360 = (2*M_PI)/360.0f; GLfloat SpinX = 0.0f; GLfloat SpinY = 0.0f; GLfloat Zoom = -50.0f; GLvoid resize(GLsizei, GLsizei); GLvoid initializeGL(GLsizei, GLsizei); GLvoid drawScene(GLvoid); PFNGLGENBUFFERSPROC glGenBuffers = NULL; PFNGLBINDBUFFERPROC glBindBuffer = NULL; PFNGLBUFFERDATAPROC glBufferData = NULL; PFNGLDELETEBUFFERSPROC glDeleteBuffers = NULL; GLuint vertexBuffer = 0; int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) { MSG msg; WNDCLASS wndclass; // Register the frame class wndclass.style = 0; wndclass.lpfnWndProc = (WNDPROC)MainWndProc; wndclass.cbClsExtra = 0; wndclass.cbWndExtra = 0; wndclass.hInstance = hInstance; wndclass.hIcon = LoadIcon(hInstance, szAppName); wndclass.hCursor = LoadCursor(NULL,IDC_ARROW); wndclass.hbrBackground = (HBRUSH)(COLOR_WINDOW+1); wndclass.lpszMenuName = szAppName; wndclass.lpszClassName = szAppName; if (!RegisterClass(&wndclass)) return FALSE; // Create the frame ghWnd = CreateWindow ( szAppName, "3D Viewer for Ababil", WS_OVERLAPPEDWINDOW | WS_CLIPSIBLINGS | WS_CLIPCHILDREN, CW_USEDEFAULT, CW_USEDEFAULT, WIDTH, HEIGHT, NULL, NULL, hInstance, NULL ); // Make sure window was created if (!ghWnd) return FALSE; // Show and update main window ShowWindow(ghWnd, nCmdShow); UpdateWindow(ghWnd); // Animation loop while (1) { while (PeekMessage(&msg, NULL, 0, 0, PM_NOREMOVE) == TRUE) { if (GetMessage(&msg, NULL, 0, 0) ) { TranslateMessage(&msg); DispatchMessage(&msg); } else { return TRUE; } } drawScene(); } } // Main window procedure LONG WINAPI MainWndProc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { static POINT ptLastMousePosit; static POINT ptCurrentMousePosit; static int bLMousing, bRMousing; LONG lRet = 1; RECT rect; switch (uMsg) { case WM_CREATE: { ghDC = GetDC(hWnd); if(!bSetupPixelFormat(ghDC)) PostQuitMessage (0); ghRC = wglCreateContext(ghDC); wglMakeCurrent(ghDC, ghRC); GetClientRect(hWnd, &rect); initializeGL(rect.right, rect.bottom); break; } case WM_PAINT: { drawScene(); static int frames; static clock_t oldTime; static float rate; frames++; if (frames >= 100) { clock_t newTime = clock(); // Optimizing.. // rate = 100.0f / ((newTime - oldTime) / 1000.0); rate = frames / ((newTime - oldTime) * 0.001); oldTime = newTime; char buffer[64]; sprintf(buffer, "3D Viewer for Ababil [mziskandar@yahoo.com] FPS: %3.2f", rate); SetWindowText(hWnd, buffer); frames = 0; } break; } case WM_SIZE: { GetClientRect(hWnd, &rect); resize(rect.right, rect.bottom); break; } case WM_CLOSE: { if (ghRC) wglDeleteContext(ghRC); if (ghDC) ReleaseDC(hWnd, ghDC); ghRC = 0; ghDC = 0; DestroyWindow(hWnd); break; } case WM_DESTROY: { if (ghRC) wglDeleteContext(ghRC); if (ghDC) ReleaseDC(hWnd, ghDC); glDeleteBuffers(1, &vertexBuffer); PostQuitMessage (0); break; } case WM_KEYDOWN: { switch( wParam ) case VK_ESCAPE: PostQuitMessage(0); break; break; } case WM_LBUTTONDOWN: { ptLastMousePosit.x = ptCurrentMousePosit.x = LOWORD(lParam); ptLastMousePosit.y = ptCurrentMousePosit.y = HIWORD(lParam); bLMousing = 1; break; } case WM_LBUTTONUP: { bLMousing = 0; break; } case WM_RBUTTONDOWN: { ptLastMousePosit.x = ptCurrentMousePosit.x = LOWORD(lParam); ptLastMousePosit.y = ptCurrentMousePosit.y = HIWORD(lParam); bRMousing = 1; break; } case WM_RBUTTONUP: { bRMousing = 0; break; } case WM_MOUSEMOVE: { ptCurrentMousePosit.x = LOWORD(lParam); ptCurrentMousePosit.y = HIWORD(lParam); if(bLMousing) { SpinX -= (ptCurrentMousePosit.x-ptLastMousePosit.x); SpinY -= (ptCurrentMousePosit.y-ptLastMousePosit.y); } if(bRMousing) { Zoom -= (ptCurrentMousePosit.y-ptLastMousePosit.y); } ptLastMousePosit = ptCurrentMousePosit; break; } default: { lRet = (LONG)DefWindowProc(hWnd, uMsg, wParam, lParam); break; } } return lRet; } BOOL bSetupPixelFormat(HDC hdc) { PIXELFORMATDESCRIPTOR pfd, *ppfd; int pixelformat; ppfd = &pfd; ppfd->nSize = sizeof(PIXELFORMATDESCRIPTOR); ppfd->nVersion = 1; ppfd->dwFlags = PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL | PFD_DOUBLEBUFFER; ppfd->dwLayerMask = PFD_MAIN_PLANE; ppfd->iPixelType = PFD_TYPE_COLORINDEX; ppfd->cColorBits = 16; ppfd->cDepthBits = 16; ppfd->cAccumBits = 0; ppfd->cStencilBits = 0; pixelformat = ChoosePixelFormat(hdc, ppfd); if((pixelformat = ChoosePixelFormat(hdc, ppfd)) == 0) { MessageBox(NULL,"ChoosePixelFormat failed", "Error",MB_OK); return FALSE; } if(SetPixelFormat(hdc, pixelformat, ppfd) == FALSE) { MessageBox(NULL,"SetPixelFormat failed", "Error", MB_OK); return FALSE; } return TRUE; } // OpenGL code // ----------- GLvoid resize(GLsizei width, GLsizei height) { glViewport( 0, 0, width, height ); aspect = ((GLfloat) width / (GLfloat) height); glMatrixMode( GL_PROJECTION ); glLoadIdentity(); GLdouble half_height = zNear * tan( 60.0 * 0.5 * TWOPI_OVER_360 ); GLdouble half_width = half_height * aspect; glFrustum( -half_width, half_width, -half_height, half_height, zNear, zFar ); glMatrixMode(GL_MODELVIEW); } GLvoid createObjects() { glBindBuffer = (PFNGLBINDBUFFERPROC)wglGetProcAddress("glBindBuffer"); glGenBuffers = (PFNGLGENBUFFERSPROC)wglGetProcAddress("glGenBuffers"); glBufferData = (PFNGLBUFFERDATAPROC)wglGetProcAddress("glBufferData"); glDeleteBuffers = (PFNGLDELETEBUFFERSPROC)wglGetProcAddress("glDeleteBuffers"); glGenBuffers(1, &vertexBuffer); glBindBuffer(GL_ARRAY_BUFFER, vertexBuffer); glBufferData(GL_ARRAY_BUFFER, sizeof(vertices), vertices, GL_STATIC_DRAW); // Release buffer after usage. // --------------------------- glVertexPointer(3, GL_FLOAT, 0, 0); glBindBuffer(GL_ARRAY_BUFFER, 0); } GLvoid initializeGL(GLsizei width, GLsizei height) { glEnable(GL_DEPTH_TEST); glPolygonOffset(1.0, 1.0); glClearColor(0.0, 0.0, 0.0, 0.0); glDisable(GL_NORMALIZE); glEnable(GL_CULL_FACE); resize(WIDTH, HEIGHT); createObjects(); } GLvoid drawScene(GLvoid) { glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glLoadIdentity(); glTranslatef( 0.0, 0.0, Zoom ); glRotatef( -SpinY*0.2, 1.0, 0.0, 0.0 ); glRotatef( -SpinX*0.2, 0.0, 1.0, 0.0 ); glEnableClientState(GL_VERTEX_ARRAY); // Hidden line remover // ------------------- glColor3f(0.0,0.0,0.0); glPolygonMode(GL_FRONT, GL_FILL); glEnable(GL_POLYGON_OFFSET_FILL); glDrawArrays(GL_TRIANGLES, 0, 25128); glDisable(GL_POLYGON_OFFSET_FILL); glColor3f(1.0,1.0,1.0); glPolygonMode(GL_FRONT, GL_LINE); glDrawArrays(GL_TRIANGLES, 0, 25128); glDisableClientState(GL_VERTEX_ARRAY); SWAPBUFFERS; }




With pre-baked rendered textures.

The "3DData.h" containing..

const float vertices[]={ -2.4000f,2.5907f,11.0000f,-1.2972f,2.3958f,11.0000f,-1.3320f,2.3501f,9.0000f, ... and so on .. ... and so on .. };



Its and array containing 3D objects vertices from .obj files. The later version with textures.. I lost the codes.. looks like this. Now I'm trying to port to OpenGL 3.