Go Back   AC3D Forums > General > AC3D General
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
Old 23rd March 2005, 06:35 PM   #1
joseph
Junior Member
Junior member
 
Join Date: Mar 2005
Posts: 2
Default Using models in C++ OpenGL programs

Hello,
I am new to AC3D. I followed the tutorial for the twisted column that I found here on the forum, and I had no trouble creating the column (AC3D seems like a great program so far). I added a concrete texture to it, and it looks fine. What I really want to do is to be able to create models in AC3D and then render them in my OpenGL programs. I searched around on the forum and found the acLoader on the website. After compiling the code with the current program I'm working on, I decided to test it out with the column. I placed the column in the middle of my scene, and it showed up. The only problem I have now is that the column is dark gray, and I can't seem to get it to change colors or display a texture. I am currently using basic ambient lighting. I tried various file formats for the texture. I even tried modifying the loader to use a bitmap loading function that I know for sure works to load my textures. It may be something to do with the settings for the model in AC3D. What I want to do is to have my program display the model the way it looks in AC3D. Also, can I set the rgb and alpha components for surfaces and/or vertices in AC3D? I apologize if these questions have been answered repeatedly. Any help would be appreciated.

Thanks,
Joe
joseph is offline   Reply With Quote
Old 24th March 2005, 03:19 AM   #2
Andy
Administrator
Professional user
 
Andy's Avatar
 
Join Date: Jun 2003
Posts: 4,563
Default

The sample loader requires texture files to be rgb format.

The loader code comes with a sample file and texture - if this works fine, it's likely that you were using the wrong texture format.

Textures can contain alpha information. Materials can also have a transparancy setting - although you'll need to sort your surfaces correctly when rendering to get the transparency correct.

Andy
Andy is offline   Reply With Quote
Old 24th March 2005, 06:15 PM   #3
joseph
Junior Member
Junior member
 
Join Date: Mar 2005
Posts: 2
Default

I tried the sample rgb file. The textures still don't display. It's not just the textures that are the problem; I tried changing the material properties in AC3D, and the various color settings have no effect. I turned on light zero in my opengl scene to have white diffuse and specular light. This at least fixes the problem of the entire column being dark gray. Now the base and top of the column are very dark, while the rest of the column is light gray. The specular reflections are visible. I can turn the texture off in AC3D, and no matter what colors I set for the material, it is always the same in my program. I did not have the transparency turned on. If anyone has any ideas, let me know. I'll keep working on it.

Thanks,
Joe
joseph is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT -4. The time now is 03:23 PM.


AC3D Forum
(C) Inivis Limited 2020