Delgine 3D Tools & Content DeleD Community Edition
Forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Small room WIP
Goto page 1, 2  Next
 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    DeleD Community Edition Forum Index -> DeleD 3D Modelling
View previous topic :: View next topic  
Author Message
Daaark
DeleD PRO user


Joined: 01 Sep 2004
Posts: 2696
Location: Ottawa, Canada

PostPosted: Sat Mar 12, 2005 5:01 pm    Post subject: Small room WIP Reply with quote

I've been here long enough, about time I post something. Smile
Just some Work in Progress shots of a small, very low poly room.

http://img.photobucket.com/albums/v227/Vampyre_Dark/misc/df_lng_1.jpg
http://img.photobucket.com/albums/v227/Vampyre_Dark/misc/df_lng_2.jpg
http://img.photobucket.com/albums/v227/Vampyre_Dark/misc/dc_dfllng_01.gif


Embarassed Well... low poly when I delete all those back faces! I think I need to replace the floor, I think it clashes really bad with everything else.
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
granada
Team member


Joined: 07 Aug 2004
Posts: 1955
Location: England

PostPosted: Sat Mar 12, 2005 5:20 pm    Post subject: Reply with quote

I like it Very Happy ,it looks like you hard work is paying off.

dave
_________________
AMD Phenom(tm)IIx6 1090t Processor 3.20 GHS
8.00 GB memory
Windows 7 64 bit
Nvida Geforce GTX 580
Back to top
View user's profile Send private message Visit poster's website
Jeroen
Site Admin


Joined: 07 Aug 2004
Posts: 5332
Location: The Netherlands

PostPosted: Sat Mar 12, 2005 9:26 pm    Post subject: Reply with quote

Looks very nice indeed, it has a realistich atmosphere. Smile Do post more! Wink
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Daaark
DeleD PRO user


Joined: 01 Sep 2004
Posts: 2696
Location: Ottawa, Canada

PostPosted: Sun Mar 13, 2005 8:17 am    Post subject: Reply with quote

Did you guys get the mail I sent out to you about this yesterday?
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
Daaark
DeleD PRO user


Joined: 01 Sep 2004
Posts: 2696
Location: Ottawa, Canada

PostPosted: Sun Mar 13, 2005 9:42 am    Post subject: Reply with quote

I had a lot of trouble with my face normals yesterday. I finally got them to face the right way by negating all of them. I'm not sure if I'm doing something wrong, or if the vertices are wound in the wrong order in the dmf files.

Code:
void c_mapobj::CreateFaceNormals(void)
{
    vector3 v1, v2;

    for (int i = 0; i < NumTriangles; ++i)
    {
        v1 = (vtx[tri[i].vtx[1]] - vtx[tri[i].vtx[0]]);
        v2 = (vtx[tri[i].vtx[2]] - vtx[tri[i].vtx[0]]);

        tri[i].vNorm.x = v1.y * v2.z - v1.z * v2.y;
      tri[i].vNorm.y = v1.z * v2.x - v1.x * v2.z;
      tri[i].vNorm.z = v1.x * v2.y - v1.y * v2.x;

        //tri[i].vNorm = v1.CrossProduct(v2);

        tri[i].vNorm.Negate();
    }

    return;
}
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
Mr.Fletcher
DeleD PRO user


Joined: 07 Aug 2004
Posts: 1772
Location: Germany

PostPosted: Sun Mar 13, 2005 10:34 am    Post subject: Reply with quote

You need to normalize the normals after doing the cross product. Well, you don't really need to, but it should be normalized for OpenGL-Lighting, etc.
_________________
Behold! The DeleD Wiki! Please help us expanding it Smile
DeleD on IRC
Back to top
View user's profile Send private message
Daaark
DeleD PRO user


Joined: 01 Sep 2004
Posts: 2696
Location: Ottawa, Canada

PostPosted: Sun Mar 13, 2005 10:36 am    Post subject: Reply with quote

I was normalizing them too. Smile But then they get messed up again. So I removed my vNorm.Normalize() line, and did it by hand... and still the wrong results... Confused

So I just turn on glEnable(GL_NORMALIZE); and it's working for now. Smile Something I will solve later.
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
Paul-Jan
Site Admin


Joined: 08 Aug 2004
Posts: 3066
Location: Lage Zwaluwe

PostPosted: Sun Mar 13, 2005 11:12 am    Post subject: Reply with quote

Cool screenshots! And I think you are right about the floor, at least make it it a little more low-contrast (white less white, black less black) and add some scratches. Other then that, very(!) interesting project! Cool

About the winding, DeleD uses clockwise winding for front facing polygons. If you use OpenGL, glFrontFace(GL_CW) will do the trick. If you prefer to use counter-clockwise winding in your project, simply reverse the winding when loading in the polygons.

Even though the OpenGL default is CCW frontfacing, I wouldn't exactly call CW 'wrong'. That makes just as much sense as calling either LHS or RHS wrong. Very Happy
Back to top
View user's profile Send private message Visit poster's website
Daaark
DeleD PRO user


Joined: 01 Sep 2004
Posts: 2696
Location: Ottawa, Canada

PostPosted: Sun Mar 13, 2005 11:16 am    Post subject: Reply with quote

I didn't mean to imply that it was wrong. Smile But I figured you would use ccw with Deled since it's done with OpenGL.... is this written anywhere?

How do I make them ccw? Do I just reverse v3, v2 and v1?

I may change the floor to blue carpet.. right now working on bottle textures for the bar shelf.. and something for a fireplace. The floor texture did have some variation in it. It was subtle and Deled's texturing filtering options is smoothing it all out. Smile
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
Daaark
DeleD PRO user


Joined: 01 Sep 2004
Posts: 2696
Location: Ottawa, Canada

PostPosted: Sun Mar 13, 2005 12:58 pm    Post subject: Reply with quote

Here's today's progress. Smile After spending some time on google images, I found a nice fireplace to model my own after. I'm still only at 702 polygons, and that's only because I haven't deleted the un-needed faces. I think the back shelf needs work.

Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
granada
Team member


Joined: 07 Aug 2004
Posts: 1955
Location: England

PostPosted: Sun Mar 13, 2005 1:48 pm    Post subject: Reply with quote

Better all the time Very Happy Nice one

dave
_________________
AMD Phenom(tm)IIx6 1090t Processor 3.20 GHS
8.00 GB memory
Windows 7 64 bit
Nvida Geforce GTX 580
Back to top
View user's profile Send private message Visit poster's website
Daaark
DeleD PRO user


Joined: 01 Sep 2004
Posts: 2696
Location: Ottawa, Canada

PostPosted: Sun Mar 13, 2005 2:28 pm    Post subject: Reply with quote

Thanks granada.

I solved the winding problem by storing the indices in reverse as I read them in. Smile I guess sometimes, some things ARE THAT EASY! Laughing No more negation. But even through I normalize manually as I create the normals, I still have to enable GL_NORMALIZE for everything to light properly. Crying or Very sad
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
Paul-Jan
Site Admin


Joined: 08 Aug 2004
Posts: 3066
Location: Lage Zwaluwe

PostPosted: Sun Mar 13, 2005 3:26 pm    Post subject: Reply with quote

Cool, love the new screenshot! (although the lighting really looks like it is rendered by Lite Wink I would suggest making the shadows a bit less opaque)

Quote:
is this written anywhere?


Nope, you got us there Embarassed With all the other things going on, there seems to be never enough time for thorough documentation. Then again, I did notice how none of the other fileformats I wrote importers/exporters for ever had the winding specified in the docs. It was usually a trial-and-error thing (hey, my polies are facing the wrong way, let's reverse the order of the vertices/vertex indices) Very Happy

About the normalization, what exactly is wrong with your normals then? Still negated? When solving these problems, it can really help to make your normals visible (by drawing lines from face centers (or corner vertices) in the direction of the normal), usually provides a lot of insight.
Back to top
View user's profile Send private message Visit poster's website
Paul-Jan
Site Admin


Joined: 08 Aug 2004
Posts: 3066
Location: Lage Zwaluwe

PostPosted: Sun Mar 13, 2005 3:36 pm    Post subject: Reply with quote

Just noticed how you wrote "I was normalizing them too. But then they get messed up again". That suggests a bug in your normalization code, if you could post/mail it we could have a look.

The normal-generation posted above looks ok, although if you really need to negate the vector you could simply reverse the arguments in the initial 2 edge-vector subtractions instead of negating the whole thing in the end.
Back to top
View user's profile Send private message Visit poster's website
Daaark
DeleD PRO user


Joined: 01 Sep 2004
Posts: 2696
Location: Ottawa, Canada

PostPosted: Sun Mar 13, 2005 3:49 pm    Post subject: Reply with quote

I don't have to negate them now, as I reversed the winding back to CCW by reading the indices in 3,2,1 instead of 1,2,3. Smile (as posted above^^^)

Code:
//normalize the vector
void vector3::Normalize(void)
{
    float s = sqrt((x * x) + (y * y) + (z * z));
    x *= s; y *= s; z *= s;
    return;
}


Embarassed THERE WE GO!

FIXED

Code:
//normalize the vector
void vector3::Normalize(void)
{
    float s = sqrt((x * x) + (y * y) + (z * z));
    x /*= s; y /*= s; z /= s;
    return;
}
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    DeleD Community Edition Forum Index -> DeleD 3D Modelling All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum