Anim8or Community

Please login or register.

Login with username, password and session length
Advanced search  

News:

An update to Anim8or, v1.00b, is available with a few bug fixes. Get your copy HERE. See the "ReadMe" file for details.

Pages: [1] 2 3

Author Topic: An8Render  (Read 8577 times)

Claude

  • Full Member
  • ***
  • Posts: 244
    • View Profile
An8Render
« on: November 11, 2013, 01:55:50 am »

Hi

After a few year pause, I'm starting to code again.
I'm learning Opengl 3.0 and 4.0.
Started by adding a function to An8lib to extract mesh data
in a form compatible with Opengl indexed VBO.
Wrote some Classes to render object using this data.
Now it supports:- diffuse,specular material  and specular power
                        - ambient,diffuse and specular factor
                        - diffuse texture
                        - ambient color = diffuse color(mat and tex)
                        - specular color = diffuse color(tex)
                        - 1 material / mesh
                        - 3 types of An8 lights.

Obviously ,I wrote a test program for these Classes and it
would be nice if a few of you guys would try it.

There's a few things, I find interresting to check:
   - small UI I've added allowing to change material properties on the run  for debugging purpose.
   - the rotoslider as a way to adjust UI input values.
   - when rotating the camera,the specular effect of the
     spotlight on the front face of the cube makes it looks
     like there's a hole in it.

To try the program,you need a video card supporting
OpenGl 3.3.To check your video card support,start Anim8or
and go to menu About/OpenGl Info.Please note the first 3 lines
if the OpenGl version is equal or higher than 3.3.

Run the program and let me know if it works or not.
Please also post OS and the OpenGl Info.

This will allow me to know if the program works well
compiled with static runtime library and using different videocard and OS.

Thanks for your help.

Claude

P.S.

A few more info:

Click on the ? at the bottom left corner of the window for
help with the rotoslider.

Use the keyboard arrows to rotate the camera around the
object.

There's 2 objects.The first one is made of 2 primitives.
The second one is the apollo-soyuz assembly and was added to show texture rendering.You can change model in the General UI.
Source of the apollo_soyuz_carbajal 3D model: NASA.

You can see the light setup in the An8 file.

« Last Edit: November 12, 2013, 04:48:27 am by Claude »
Logged

captaindrewi

  • Sr. Member
  • ****
  • Posts: 450
  • errm...errr?
    • View Profile
Re: An8Render
« Reply #1 on: November 11, 2013, 12:00:26 pm »

Crashes whilst loading - windows 7
vendor - ati tech inc
renderer - amd radeon 9tm)hd 6520g compatibility profile context
version - 4.1.110627 compatibility profile context
Logged
!

Raxx

  • Administrator
  • Hero Member
  • *****
  • Posts: 1446
    • View Profile
Re: An8Render
« Reply #2 on: November 11, 2013, 08:27:01 pm »

Hey Claude, interesting start so far. It runs well on my computer, but it crashes whenever I try changing the model number.

Vendor: NVIDIA Corporation
Renderer: GEForce GTX 780/PCIe/SSE2
Version: 4.4.0

[edit]-Windows 7 Ultimate x64
« Last Edit: November 11, 2013, 11:51:53 pm by Raxx »
Logged

Claude

  • Full Member
  • ***
  • Posts: 244
    • View Profile
Re: An8Render
« Reply #3 on: November 12, 2013, 04:46:35 am »

Sorry guys for the delay.I was trying to find a way to redirect the
console output to a file.

Could you please run the app by double clicking the batch file
An8RenderRun.
After the app is closed, a file named "debug" should have been created.
Please post it.

Raxx

Is your OS WIN7 ?
Is the camera moving ?
Can you change the material properties ?
Do you see the specular effects ?
Do the rotosliders work correctly ?

If you have time,could you swap the An8 file name and rerun the app.
Use the right click rename function.
Post the "debug" file.

Thanks.

Claude
« Last Edit: November 13, 2013, 04:11:46 pm by Claude »
Logged

Raxx

  • Administrator
  • Hero Member
  • *****
  • Posts: 1446
    • View Profile
Re: An8Render
« Reply #4 on: November 12, 2013, 05:20:56 am »

Win 7 Ultimate x64

The camera moves when I use the arrow keys.
I can change the material properties.
The specular effects work, though it seems that the values representing SpecularPower are in reverse (0 is max, 32 is none)
The rotosliders appear to work properly.

Changing the Model Number still causes a crash, and it doesn't seem to be caught in the debug log. The program also crashes on startup if I swap the two an8 file names. I tried using my own anim8or files with the same file names, but those also crashed.

Attached is the debug log and an image of what it looks like when it works.
Logged

captaindrewi

  • Sr. Member
  • ****
  • Posts: 450
  • errm...errr?
    • View Profile
Re: An8Render
« Reply #5 on: November 12, 2013, 12:34:49 pm »

find attached debug log.
Logged
!

Claude

  • Full Member
  • ***
  • Posts: 244
    • View Profile
Re: An8Render
« Reply #6 on: November 12, 2013, 03:21:06 pm »

There seems to be a problem loading the texture.(path maybe ?)

Ready for an experience ?

Download the An8Render file again to be sure everything is reset.
Open the apollo_soyuz_carbajal An8 file in Anim8or.
Go to Option/Debug and select Output Normals.
Save.
An8RenderRun.

Thanks again

Raxx
SpecularPower: I will look into this.
Output Normals: might be the reason it was crashing when
using your files.
Logged

captaindrewi

  • Sr. Member
  • ****
  • Posts: 450
  • errm...errr?
    • View Profile
Re: An8Render
« Reply #7 on: November 12, 2013, 06:04:20 pm »

new debug file
Logged
!

Claude

  • Full Member
  • ***
  • Posts: 244
    • View Profile
Re: An8Render
« Reply #8 on: November 12, 2013, 08:10:12 pm »

captaindrewi

Did you do this ?
Download the An8Render file again to be sure everything is reset.
Open the apollo_soyuz_carbajal An8 file in Anim8or.
Go to Option/Debug and select Output Normals.
Save.
An8RenderRun.

I'm asking because the debug2 file shows that the textures are still
on my computer.

0 - loaded texture 'C:\\Users\\Claude\\Documents\\Visual Studio 2010\\Projects\\Opengl tutorial\\Opengl tutorial\\tutorial02_red_triangle\\APOLLO6.JPG'
1 - loaded texture 'C:\\Users\\Claude\\Documents\\Visual Studio 2010\\Projects\\Opengl tutorial\\Opengl tutorial\\tutorial02_red_triangle\\APOLLOCO.JPG'
2 - loaded texture 'C:\\Users\\Claude\\Documents\\Visual Studio 2010\\Projects\\Opengl tutorial\\Opengl tutorial\\tutorial02_red_triangle\\WINGS2.JPG'
3 - loaded texture 'C:\\Users\\Claude\\Documents\\Visual Studio 2010\\Projects\\Opengl tutorial\\Opengl tutorial\\tutorial02_red_triangle\\SOVIETFL.JPG'
4 - loaded texture 'C:\\Users\\Claude\\Documents\\Visual Studio 2010\\Projects\\Opengl tutorial\\Opengl tutorial\\tutorial02_red_triangle\\WHITESTR.JPG'

instead it should show a path on yours.

Thanks for your patience.

Claude
Logged

captaindrewi

  • Sr. Member
  • ****
  • Posts: 450
  • errm...errr?
    • View Profile
Re: An8Render
« Reply #9 on: November 13, 2013, 12:00:24 am »

yes i believe i did as you requested.tried complete operation starting from a fresh download twice.
debug file still showing wrong path.
Logged
!

Claude

  • Full Member
  • ***
  • Posts: 244
    • View Profile
Re: An8Render
« Reply #10 on: November 13, 2013, 04:30:44 pm »

Raxx     captaindrewi

I've modified the app to get rid of the texture loading problem.
(fingers crossed)

Simply, double click the batch file An8RenderRun
and post the "debug" file if needed.

Thanks

Claude
« Last Edit: November 17, 2013, 03:09:42 pm by Claude »
Logged

captaindrewi

  • Sr. Member
  • ****
  • Posts: 450
  • errm...errr?
    • View Profile
Re: An8Render
« Reply #11 on: November 13, 2013, 05:01:04 pm »

no luck here claude.
Logged
!

Raxx

  • Administrator
  • Hero Member
  • *****
  • Posts: 1446
    • View Profile
Re: An8Render
« Reply #12 on: November 13, 2013, 07:39:34 pm »

Hey Claude. The new version works fine for me--both models load perfectly. In the previous version it had also worked when I re-saved it as per your instructions.

Still crashes whenever I try loading my own model, even with normals saved.
Logged

cooldude234

  • Sr. Member
  • ****
  • Posts: 901
  • You know what I realized, I dont have an avatar :\
    • View Profile
Re: An8Render
« Reply #13 on: November 14, 2013, 08:20:23 am »

Works here
Windows xp, Nvidia GTX 760, Opengl 4.4.0

PS Nice choice of window manager ;P
Logged

Claude

  • Full Member
  • ***
  • Posts: 244
    • View Profile
Re: An8Render
« Reply #14 on: November 14, 2013, 03:47:27 pm »

cooldude234
Nvidia GTX 760: confirms Raxx result
Windows xp: very nice

Raxx
Great news.
It was the path problem.
If you're OK with it, I could have a look at one of your file.
I could PM my email address.If you have one with morphs,
it would be even better since I've started working on morph rendering.

captaindrewi
Solving the path bug,didn't solve the second problem.
It seems like the ATI GLSL compiler is trying so hard to optimize
the fragment shader code that it ditches uniform 'gMat.DiffTexture'.
My error checking code pics it up and stops the program.
I will need some time to figure out a way to satisfy both GLSL compilers.

Thanks guys.

Claude

Logged
Pages: [1] 2 3