Anim8or Community
General Category => General Anim8or Forum => Topic started by: Claude on November 10, 2013, 08:55:50 pm
-
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.
-
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
-
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
-
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
-
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.
-
find attached debug log.
-
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.
-
new debug file
-
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
-
yes i believe i did as you requested.tried complete operation starting from a fresh download twice.
debug file still showing wrong path.
-
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
-
no luck here claude.
-
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.
-
Works here
Windows xp, Nvidia GTX 760, Opengl 4.4.0
PS Nice choice of window manager ;P
-
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
-
It seems like the ATI GLSL compiler is trying so hard to optimize
the fragment shader code that it ditches uniform 'gMat.DiffTexture'.
Reason why I prefer Nvidia
-
captaindrewi
Hope you don't mind giving it another try.
Thanks
Claude
-
It is working Claude.though not sure if 100%
-
captaindrewi
You are right.The texture are still missing.
Another shot.
Thanks
Claude
-
yes ok now.
-
captaindrewi
Great news.
It's been very instructive.
Works with Win7 Home and Ultimate, XP ,Ati and Nvidia.
Thanks guys for your help.
Claude
-
Hi guys
I was unable to work much on it recently,but I thought a little update would be nice.
As mentioned before,I'm working on morph rendering.
It's progressing nicely. I' ve replaced the first model with one including 3 morphs to test the rendering code.
Sorry for the model.It will never win in a modeling contest, but for testing it's OK for now.
Morph rendering is done in real time,not per frame.
Interpolation is calculated exactly like it's shown in the
graph editor.Only thing left is to deal with the morph normals.
UI allows to test function like Start,Stop,Pause and Resume,
change some parameters like Morph_LoopState and Morph_Duration
and operate manually by changing Morph_Time.
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 app by double clicking the batch file
An8RenderRun. If you try it,let me know how it goes.
It should run without problem.But if it crashes,
after the app is closed, a file named "debug" should have been created.Please post it.Please also post OS and the OpenGl Info.
You can still change model in the General UI to see
the apollo-soyuz assembly.
Thanks.
Claude
P.S.
A few more info:
Morph #1 F1 F2 F3 F4
Morph #2 F5 F6 F7 F8
Morph #3 F9 F10 F11 F12
Start Stop Pause Resume
General UI:
MorphManualControl: click to allow manual morph adjustment
Morph_Time: change the morph time;use the rotoslider
Morph_LoopState: shows looping state
Morph_FlipLoopState: button to change looping state
Morph_Duration: set morph duration
RegisterMorph_Duration: then activate change;won't register
if morph not stopped
Use the keyboard arrows to rotate the camera around the
object.
-
Hi
I had to stop working on An8Render :( and until I' m able to start
again, I thought I would share part of the research result.
I know this post won't be on the most read list,but I hope it could be useful to users writing Anim8or related apps like renderer.converter,etc , or users interrested in the Anim8or 3D file format or simply the math used in Anim8or.
As mentioned in the file title,it's about controller interpolation. Info is presented in a pdf file.I zipped it to be able to upload it.
In the preceding post, I uploaded back the An8Render2.zip file in case someone would like to see morphs rendered using the interpolation code.
Hope you enjoy the read. :)
Claude
-
Looking good.
-
Thanks ianross
You tried An8Render2.
The apollo-soyuz assembly looks good.
3 lights are used,2 spots and 1 infinite.
The morph test model as I said before, looks awful,
but it serves its purpose with multiple morphs,multiple keyframes with all kinds of bells and whistles like threshold,corner,etc
Could you please post your OS and videocard model.
I'm always interested in getting this info.
Thanks again.
Claude
-
Hey Claude, useful bit of info there. When I get back to workin' on my 3D viewer, I'll definitely be referring to that pdf. Thanks!
-
Welcome Raxx
I've nerver seen this explained on this forum neither the
preceding one.
Always thought it should be part of the Anim8or file
format specification.Not necessarily the entire math explanation or the code,but at least the formula and the calculation of a,b,c,d from the file data.Maybe as an appendix.
Might also be helpful for your Anim8or<-> Collada converter eventually.
Thanks
Claude
-
Call me a dullard with a capital dull, but where is this program? I can't see any links to it.
-
"dullard" hey! I've learned a new word.
The file is in the post dated
January 31, 2014.
-
"dullard" hey! I've learned a new word.
The file is in the post dated
January 31, 2014.
Thank you. :)
-
Hi
It's been a very long pause, but since a few weeks, I've started working on An8Render lib again.I've worked only on adding figure animation.We're still far away from a release,but I couldn't resist showing progress made.
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.
- morph animation
- figure animation
It uses liban8 to load .an8 models.
Morph and figure animation rendering is done in real time,not per frame.
Interpolation is calculated exactly like it's shown in the
graph editor.One thing left is to deal with the morph normals.
Most of the data(vertex,tex coord,.......,weights and vertex index) is kept in VBO in the video card memory.A big part of the calculation is done on the video card as you can see in the shader files.
So,here's the test program I wrote for the lib and it
would be nice if a few of you guys would have a look at 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 by double clicking the batch file
An8RenderRun. Please let me know if it works or not,
and also post OS and the OpenGl Info.
After the app is closed, a file named "debug" should have been created.If the app doesn't work please post it.
This will allow me to know if the program works well
using different videocard and OS and get debug info.
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.
You can see the light setup in the An8 file.
The opening window will show the figure animation I would like
you to have a look at.It was made using makehuman and NickE's
BVH2Anim8or.It's a walking woman.Open the Female1_B02_StandToWalkExperience file in Anim8or to compare both animation
rendering.
MODEL 3
Numeric pad keyboard control(right side of the keyboard)
Sequence #1 1 2 3 4 5
Start BindPause Stop Pause Resume
If you want to have a look at the other 2 models,you can change model in the General UI.
The second one is the apollo-soyuz assembly and was added to show texture rendering at the time.
Source of the apollo_soyuz_carbajal 3D model: NASA.
MODEL 2
No key control
The first one is a sphere including 3 morphs to test the rendering code.
Sorry for the model.It will never win in a modeling contest, but for testing it was OK.
MODEL 1
General UI allows to change some parameters like Morph_LoopState and Morph_Duration,plus and operate manually by changing Morph_Time.
General UI:
MorphManualControl: click to allow manual morph adjustment
Morph_Time: change the morph time;use the rotoslider
Morph_LoopState: shows looping state
Morph_FlipLoopState: button to change looping state
Morph_Duration: set morph duration
RegisterMorph_Duration: then activate change;won't register
if morph not stopped
UI allows to change blue material properties on the run.
keyboard control
Morph #1 F1 F2 F3 F4
Morph #2 F5 F6 F7 F8
Morph #3 F9 F10 F11 F12
Start Stop Pause Resume
------------------------------------------------------------------------------------------------------------------------------------https://drive.google.com/file/d/0B84Q_4yIHaGAQUxaMDJ6alJXZjg/view?usp=sharing
------------------------------------------------------------------------------------------------------------------------------------
-
Works fine for me! Tried the material properties. Morph and skeletal animations were smooth. Rotoslider is an interesting idea, though I wonder if it's overkill for adjusting numerical values.
Win10 Home 64-bit
Geforce GTX 980m, OpenGL 4.5
-
Raxx
Glad to know it works on Nvidia and win10.
The UI was chosen to be able to change parameters on the
run.You're right it's an overkill, but it's fun and it's
only a test program.
The poor woman was a blob for 2 weeks.That's what happens
if you miss 1 1evel of transform.
The only thing you could sometime identify was
the Anim8or logo on the tshirt.
When you get back working on your 3D viewer,I hope
I'll be in a better position to help if needed.
Claude
-
Everything seems to be working ok
slight difference in the animations i feel. within anim8or the walk is slightly less zombie like but this may just a quixotic perception....Is that likely?
also when i press resume (5) the animation tries to resume and then comes to a halt. Starts ok again if i press 1.
Vendor: ati technologies inc
Renderer: amd radeon hd 6520g
version: 4.4.13283 compatibility profile context 14.501.1003.0
win7 build 7601
-
captaindrewi
Happy to see that it works well on ATI card.I'm always
concerned of possible differences between ATI and Nvidia GLSL
compiler.
The program renders in real time.By default,Anim8or renders
per frame as fast as possible.Could you see if you have
View/Preference/Limit playback checked. If not,please check
it and see if you see a difference.
Thanks
Claude
-
Yeah i did have limit playback checked.
-
captaindrewi
Could you please run the app.Run the animation(key 1) once or twice.Close the app and post the debug file.
Thanks
Claude
-
ran .bat and pressed button 1 couple of times.
-
captaindrewi
When you ran the app ,were you in full screen?
How much system memory do you have on your laptop?
Are you a gamer? ;) Your vsynch is off.Could you
try again with vsynch enable and let me know
if you still see a problem.
Thanks
Claude
-
Claude...i am not a gamer.i dont know if my vsync is on or off.don't know how to turn it on or off.
system memory see .jpg. was not in full screen last time i ran the app.
ran it again but this time in full screen and have attached the resultant debug file.