Making a 3D (viewport-ish)/real-time renderer.. from skratch

Discuss stuff not about Indigo.
User avatar
arneoog
Indigo 100
Posts: 504
Joined: Sun Jun 25, 2006 2:19 am
Contact:

Post by arneoog » Sun May 20, 2007 4:16 am

And again I've got alot of question marks :lol:

?????????????????????????????????????????

I am really noob at compiling :P
Deus said I should use Cygwin to start with..
(cygwin is a CMD like window where you do the compiling and testin/exectuting)

And I am using quite a few includes :)

Code: Select all

#include <stdio.h>
#include <math.h>
#include <algorithm>
#include <stdlib.h>
I need those to make it run :)

And what is *nix!!!???

EDIT:
I get the error when I got to many and to big variables...

User avatar
zsouthboy
Posts: 1395
Joined: Fri Oct 13, 2006 5:12 am

Post by zsouthboy » Sun May 20, 2007 7:03 am

Now I get to post a bunch of ?????'s too :)


*nix = Linux, Unix

You're using CYGWIN under windows - cygwin is a Linux-like environment for Windows.

It means you are able to use, for example, the bash shell, and gcc (which is what I'm guessing you're using to compile).

As for your problem, I bet you're passing around data using variables - causing the stack overflow. Look into what pointers are, and use them (a pointer passes the *memory address* of the data, rather than the data itself)

User avatar
arneoog
Indigo 100
Posts: 504
Joined: Sun Jun 25, 2006 2:19 am
Contact:

Post by arneoog » Wed Jun 27, 2007 6:15 am

Well, with Nick's help and a bit oodmb's I managed to fix my "mem/array" issues that I had..
All is working when ran inside of Cygwin :D

Little rotation animation (.mp4)
(the diffuse material is a rude 'fake' kinda... but it works^^)

But! When I compile this to a .exe file it crashes only moments into
the actual saving of the pixels in the bmp save part.. :?
Which I really cant understand... :(

Oh well. I think I'll be able to fix it some time :lol:


Image

User avatar
ThatDude33
Posts: 216
Joined: Wed Jul 05, 2006 1:26 pm
Contact:

Post by ThatDude33 » Wed Jun 27, 2007 11:44 am

Looking good, arne!
Matt B. >>Maya To Indigo<<
Image

User avatar
arneoog
Indigo 100
Posts: 504
Joined: Sun Jun 25, 2006 2:19 am
Contact:

Post by arneoog » Wed Jun 27, 2007 10:48 pm

Thank you, Matt :D


I'll just add a pic for those who can't play .mp4s.. :)

Image

User avatar
ThatDude33
Posts: 216
Joined: Wed Jul 05, 2006 1:26 pm
Contact:

Post by ThatDude33 » Wed Jun 27, 2007 11:44 pm

About your crashing issue, maybe you don't have any halt commad after your main loop? If you just have return 0; at the end of your program, then it will close. It doesn't crash, it just closes.
Matt B. >>Maya To Indigo<<
Image

User avatar
arneoog
Indigo 100
Posts: 504
Joined: Sun Jun 25, 2006 2:19 am
Contact:

Post by arneoog » Thu Jun 28, 2007 12:04 am

well, I do get the "blah bla Has to be closed.. blah blah" Windows Crash Messenge :)
..removing return 0; does not help..
I don't know any halt commands, but I didn't need that for anything else anyway..

Ehm...

User avatar
zsouthboy
Posts: 1395
Joined: Fri Oct 13, 2006 5:12 am

Post by zsouthboy » Fri Jun 29, 2007 5:04 am

You've come a long way from outputting some lines to a webbrowser.

:)

User avatar
arneoog
Indigo 100
Posts: 504
Joined: Sun Jun 25, 2006 2:19 am
Contact:

Post by arneoog » Fri Jul 20, 2007 5:36 am

Hehe, yes^^

And now I have the obj import/parser working! Image
Ofcourse with some help, hehe Image


A render of a squid I made some months ago: Image
The material is a kind of depth shader..

Image

"Logfile"

Code: Select all

W: 800
H: 450

--bulding mesh
  --reading..
  --done..
  --Tris: 82368
  --Verts: 41210
--Drawing mesh pixels

--Saving bmp
  --setting headers
  --setting pixels
--Done saving bmp

OBJ Time: 2.000000e+00
Render Time: 0.000000e+00
Total Time: 2.000000e+00
Still working on the timers.. hehe
Not too accurate


Back to coding and reading Image Image


(PS: Just wanted to show off my smilies)

User avatar
arneoog
Indigo 100
Posts: 504
Joined: Sun Jun 25, 2006 2:19 am
Contact:

Post by arneoog » Sun Jul 22, 2007 12:29 pm

Just wanted to show a render with a lambert material :)

Image

User avatar
Kram1032
Posts: 6649
Joined: Tue Jan 23, 2007 3:55 am
Location: Austria near Vienna

Post by Kram1032 » Sun Jul 22, 2007 1:05 pm

so, you finally fixed it :D

User avatar
DaveC
Posts: 596
Joined: Mon Sep 11, 2006 12:20 am
Location: The Tottenham, London, UK
Contact:

Post by DaveC » Sun Jul 22, 2007 6:01 pm

It's a beautiful thing :D Well done. And you got the perfect test model for it, too.
The hardest part of BEING yourself is FINDING yourself in the first place...
http://thebigdavec.googlepages.com

User avatar
arneoog
Indigo 100
Posts: 504
Joined: Sun Jun 25, 2006 2:19 am
Contact:

Post by arneoog » Tue Jul 24, 2007 12:27 pm

Thank you, Dave :D

Today I worked on two file parsers,
one for a Config/Ini File and one for the Scene File :)

The config file looks like this:

Code: Select all

#True Ignition Configuration File

#General
-sceneFile 'C:/trueignition/scenes/testfile.ti';
-outPutImage 'C:/trueignition/ti_img01.bmp';

And the scene file format looks like this:

Code: Select all

//Scene made by Arne OOG

globalSettings
    width '800'
    height '450'
;

cameraObject
    position '0.000 0.000 23.000'
    rotation '0.000 0.000 0.000'
    focusDistance '23.000'
;

materialShader
    name 'default'
    color '0.855 0.251 0.172'
;

polygonMesh
    filePath 'C:/trueignition/scenes/squid.obj'
    material 'default'
;

Some stuff in the scene file still don't work, but all file stuff is 8)
Also the parser is abit buggy at the moment :?
...and as you can see, I will call the renderer "True Ignition" :P

I think I actually can make my v0.0.1 release date :lol:

Cheers!

User avatar
Kram1032
Posts: 6649
Joined: Tue Jan 23, 2007 3:55 am
Location: Austria near Vienna

Post by Kram1032 » Tue Aug 07, 2007 2:00 pm

:D

User avatar
deltaepsylon
Posts: 417
Joined: Tue Jan 09, 2007 11:50 pm

Post by deltaepsylon » Thu Aug 09, 2007 7:33 am

Kewl!

maybe this can turn into a preview renderer for indigo eventually.... :)

good job

Post Reply
64 posts

Who is online

Users browsing this forum: Bing [Bot], Yandex [Bot] and 26 guests