simple machines forum

Please login or register.

Login with username, password and session length
 

News:

Remember to make your own backup of posts before submitting.

 
 
Pages: 1 2 3 4 [5]

Author Topic: Daedalus: 3D modeling push  (Read 4559 times)

Holy Diver

  • Website System
  • Administrator
  • *****
  • Offline Offline
    • MaleView Profile
    • About/Support Me/Sword of Moonlight
look out honey, 'cause I'm using technology
Holy Diver says,
« Reply #60 on: April 20, 2017, 03:44:43 AM »

Here is a big one with a camera set up. The white sky helps to delineate the letterboxing. I'm cross posting these images in the SourceForge.net project forum (https://sourceforge.net/p/collada-dom/discussion/531263/thread/5dc7c133/)



This was a COLLADA demo for a GDC (Game Developer Conference) probably paid for by Sony.

I wonder if it does a movie or something. There are not cool colors like when the alien is dancing in the previous post. It's all medium gray.

The file is very large but really there are only about five or six different models. I went through and deleted all of the duplicates the other night. It didn't make the file 50% smaller. I have a feeling it could be a lot smaller but the exporter was very unsophisticated. I can't use that gutted file though until I can redirect all of the instance references to the same data sources. Then it will also demonstrate instancing and the file will load and display more quickly.

I really don't like the jagged edges. I'd like to apply my full-motion non-anti-aliasing technique to remove them. It'll have to wait until I get into shaders. Otherwise I like these clean b/w images. I will miss them when the color starts flowing in. The images are not in b/w mode. There's an engineering like model that is blue and green, but for some reason it still seems like the colors are washed out. Probably they are gray shifted material properties.
« Last Edit: April 20, 2017, 04:18:23 AM by Holy Diver »
~Blue protects white from innocence~Blue drags black with it~Blue-Blue-Blue is darkness made visible~

Holy Diver has 1888 posts

Holy Diver

  • Website System
  • Administrator
  • *****
  • Offline Offline
    • MaleView Profile
    • About/Support Me/Sword of Moonlight
look out honey, 'cause I'm using technology
Holy Diver says,
« Reply #61 on: April 21, 2017, 06:21:08 AM »

Here's the first image in color. I tweaked the material properties to approximate a "rubber duck" with OpenGL's classic lighting model. Well, not the original, I enabled the one that separates the specular highlights from the texture because otherwise the color maxes out at whatever is in the texture.

I don't know if Sword of Moonlight would benefit from something like that. I think it would from specular mapping. But in practice, the look of video games is more baked directly into the texture. Or the better looking ones that I know of are.

Technically I don't think the basic profiles would look like this. They should be implemented by custom shaders that follow the old graphics papers they're derived from to the letter. The OpenGL-ES profile could be configured to look like this with some work. Possibly the Nvidia Cg profile could too. I don't know if it requires shaders to be present or not. It certainly has a lot of states that don't seem to have anything to do with shaders.

EDITED: Here's the original duck. It popped up after I renamed the modified one and restored the original. So I took a picture. It has an almost Play-Doh consistency. But seems less like a real world object. I took the material properties from here (http://devernay.free.fr/cours/opengl/materials.html) and maybe it's a little electric, but fine-tuning is not easy to do. you might recognize the Duck from Sony's PlayStation demonstrations. But the perked up ears. I don't know. Maybe that's an inside joke.
« Last Edit: April 23, 2017, 06:30:43 AM by Holy Diver »
~Blue protects white from innocence~Blue drags black with it~Blue-Blue-Blue is darkness made visible~

Holy Diver has 1888 posts

Holy Diver

  • Website System
  • Administrator
  • *****
  • Offline Offline
    • MaleView Profile
    • About/Support Me/Sword of Moonlight
look out honey, 'cause I'm using technology
Holy Diver says,
« Reply #62 on: April 26, 2017, 11:31:04 PM »

Here was the first image using COLLADA's Nvidia Cg profile from a few days ago. You can see by the shiny spot in the middle that it has per-pixel-lighting going on.

This is the planetoid from the b/w picture a few posts ago. It's very, very lumpy on the other side, so I preferred to take this picture from the smooth side, that looks more like a bowling ball.

I think the smoothing groups are discontinuous where there seems to be faults in the lighting. It could be a defect but I don't think so.

(I've been busy the last few days with personal stuff that prevents this kind of work.)
~Blue protects white from innocence~Blue drags black with it~Blue-Blue-Blue is darkness made visible~

Holy Diver has 1888 posts

Holy Diver

  • Website System
  • Administrator
  • *****
  • Offline Offline
    • MaleView Profile
    • About/Support Me/Sword of Moonlight
look out honey, 'cause I'm using technology
Holy Diver says,
« Reply #63 on: April 27, 2017, 04:55:11 AM »

Here is a rendering of the full GDC demo scene with its shaders that closely approximates the image in the Sailing The Gulf COLLADA book's plates.

I took the screenshot at full screen and then down sampled it to more closely resemble the book's image, and because it's very smooth and jewel like. The orange/blue elements are supposed to appear as they do. If I didn't have that book I wouldn't know how it's supposed to appear!



I think the black parts require tangent-vectors to be generated, which is not part of COLLADA, so I'm very reticent to do that, but I might in order to complete this image; and because the test images in the COLLADA test-suite seem to require lighting normal generation, even though they should not...

I will update the image if I do make a point to do that. I'm posting this in order to cross-post the image in the sourceforge.net forum. It lacks an attachment system.
~Blue protects white from innocence~Blue drags black with it~Blue-Blue-Blue is darkness made visible~

Holy Diver has 1888 posts

Holy Diver

  • Website System
  • Administrator
  • *****
  • Offline Offline
    • MaleView Profile
    • About/Support Me/Sword of Moonlight
look out honey, 'cause I'm using technology
Holy Diver says,
« Reply #64 on: April 28, 2017, 09:02:11 AM »

(I updated the image in the previous post. Ctrl+R if you can. The shaders didn't actually use their "tangent-vectors" but the problem seems to be more to do with lighting conventions being inside-out. I edited the shaders without regard for which is technically correct. The highlights match the view angle, unlike the book's plate.)
~Blue protects white from innocence~Blue drags black with it~Blue-Blue-Blue is darkness made visible~

Holy Diver has 1888 posts

Holy Diver

  • Website System
  • Administrator
  • *****
  • Offline Offline
    • MaleView Profile
    • About/Support Me/Sword of Moonlight
look out honey, 'cause I'm using technology
Holy Diver says,
« Reply #65 on: May 01, 2017, 11:57:40 AM »

Don't ask :coffee:
~Blue protects white from innocence~Blue drags black with it~Blue-Blue-Blue is darkness made visible~

Holy Diver has 1888 posts

Holy Diver

  • Website System
  • Administrator
  • *****
  • Offline Offline
    • MaleView Profile
    • About/Support Me/Sword of Moonlight
look out honey, 'cause I'm using technology
Holy Diver says,
« Reply #66 on: May 06, 2017, 05:22:57 PM »

Much better :thumbsup:

Here's an untested Windows build of the application pictured below-attached:

http://www.swordofmoonlight.net/holy/ColladaDOM_3_Reference_Viewer.zip

In this ZIP file is the dominoes demonstration called dominoes.dae (enable visible file extensions on Windows) and others, that can be dropped onto the EXE file.

https://sourceforge.net/p/collada-dom/code/HEAD/tree/trunk/samples.zip?format=raw

By "untested" I mean that I've not taken the time to try it on a different computer from my own myself. I'm expecting feedback from someone anytime now.

EDITED: The mouse controls are basically like SOM's tools. The wheel can be used to zoom (dolly) but only in large increments. Holding down the right button while wheeling uses 10x smaller increments. Holding down both and mousing forward/backward is smoother/just like SOM_PRM, etc.

Code: (keyboard) [Select]
static void ProcessInput(unsigned char ASCII)
{    
switch(ASCII)
{
case '\t':

RT::Main.SetNextCamera();
RT::Main.Center();
break;

case 'c': case 'C':

RT::Main.Center();
break;

case 'l': case 'L':

if(togglelighting=!togglelighting)
glEnable(GL_LIGHTING);
else
glDisable(GL_LIGHTING);
break;

case 'm': case 'M':

AdjustUISpeed(1.25f);
break;

case 'n': case 'N':

AdjustUISpeed(0.75f);
break;

case 'o': case 'O':

RT::Main.AnimationOn = !RT::Main.AnimationOn;
break;

case 'p': case 'P':

if(!RT::Main.AnimationOn)
{
RT::Main.AnimationOn = true;
RT::Main.AnimationPaused = false;
}
else RT::Main.AnimationPaused = !RT::Main.AnimationPaused;
break;

case 'q': case 'Q':

if(togglewireframe=!togglewireframe)
glPolygonMode(GL_FRONT_AND_BACK,GL_LINE);
else
glPolygonMode(GL_FRONT_AND_BACK,GL_FILL);
break;

case 's': case 'S': //backward

RT::Main.Walk(RT::Main.Delta*KeyboardTranslateSpeed,0,0);
break;

case 'w': case 'W': //forward

RT::Main.Walk(-RT::Main.Delta*KeyboardTranslateSpeed,0,0);
break;

case ' ': //up

RT::Main.Walk(0,0,RT::Main.Delta*KeyboardTranslateSpeed);
break;

case 'x': case 'X': //down

RT::Main.Walk(0,0,-RT::Main.Delta*KeyboardTranslateSpeed);
break;

case 'd': case 'D': //right

RT::Main.Walk(0,-RT::Main.Delta*KeyboardTranslateSpeed,0);
break;

case 'a': case 'A': //left

RT::Main.Walk(0,RT::Main.Delta*KeyboardTranslateSpeed,0);
break;

case 'e': case 'E':

if(amplitudeGlobalParameter)
{
float value;
cgGetParameterValuefc(amplitudeGlobalParameter,1,&value);
value+=0.1f;
cgSetParameter1f(amplitudeGlobalParameter,value);
}
break;

case 'r': case 'R':

if(amplitudeGlobalParameter)
{
float value;
cgGetParameterValuefc(amplitudeGlobalParameter,1,&value);
value-=0.1f;
cgSetParameter1f(amplitudeGlobalParameter,value);
}
break;

case 'f': case 'F':

if(togglecullingface==0) //turn it front
{
togglecullingface = 1; glEnable(GL_CULL_FACE); glCullFace(GL_FRONT);
}
else if(togglecullingface==1) //turn it both
{
togglecullingface = 2; glDisable(GL_CULL_FACE);
}
else //turn it back
{
togglecullingface = 0; glEnable(GL_CULL_FACE); glCullFace(GL_BACK);
}
break;

case 'g': case 'G':

RT::Main.ShowGeometry = !RT::Main.ShowGeometry;
break;

case 'h': case 'H':

RT::Main.ShowHierarchy = !RT::Main.ShowHierarchy;
break;

case '1': case '2': case '3': case '4': case '5': case '6':

RT::Main.ShowTextures_Mask^=1<<(ASCII-'1'); break;

case '~': //Invert the texture-mask that enables textures.
case 96: //~

//Was just going to let these be like '0' but this may be useful.
//(Beside, having '~' do operator~ is kind of cute.)
RT::Main.ShowTextures_Mask = ~RT::Main.ShowTextures_Mask; break;

case '0': //Set the texture mask to 0 unless it's already 0.

RT::Main.ShowTextures_Mask = RT::Main.ShowTextures_Mask!=0?0:-1; break;

default: daeEH::Warning<<"unused key : "<<ASCII;
}
}
static void glutSpecialFunc_callback(int key, int, int)
{
switch(key)
{
case GLUT_KEY_F11:
{
if(fullscreen=!fullscreen)
{
/* Save parameters */
Xpos = glutGet(GLUT_WINDOW_X);
Ypos = glutGet(GLUT_WINDOW_Y);
Xsize = glutGet(GLUT_WINDOW_WIDTH);
Ysize = glutGet(GLUT_WINDOW_HEIGHT);
glutFullScreen();/* Go to full screen */
}
else
{
/* Restore parameters */
glutReshapeWindow(Xsize,Ysize);
glutPositionWindow(Xpos,Ypos);
glutPostRedisplay();
}
break;
}
case GLUT_KEY_LEFT: ProcessInput('A'); break;
case GLUT_KEY_RIGHT: ProcessInput('D'); break;
case GLUT_KEY_UP: ProcessInput(' '); break;
case GLUT_KEY_DOWN: ProcessInput('X'); break;

default: daeEH::Warning<<"unused (special) key : "<<key;
}
}
« Last Edit: May 06, 2017, 05:38:21 PM by Holy Diver »
~Blue protects white from innocence~Blue drags black with it~Blue-Blue-Blue is darkness made visible~

Holy Diver has 1888 posts

Holy Diver

  • Website System
  • Administrator
  • *****
  • Offline Offline
    • MaleView Profile
    • About/Support Me/Sword of Moonlight
look out honey, 'cause I'm using technology
Holy Diver says,
« Reply #67 on: May 20, 2017, 04:01:23 AM »

Here is another cross-posted image that looks like a Kraftwerk album sleeve :batman:
~Blue protects white from innocence~Blue drags black with it~Blue-Blue-Blue is darkness made visible~

Holy Diver has 1888 posts

Holy Diver

  • Website System
  • Administrator
  • *****
  • Offline Offline
    • MaleView Profile
    • About/Support Me/Sword of Moonlight
look out honey, 'cause I'm using technology
Holy Diver says,
« Reply #68 on: June 07, 2017, 11:30:23 PM »

Today I'm "committing" new code to the COLLADA-DOM files that adds <profile_COMMON> to the FX reference-implementation. It is COLLADA's generic rendering mode. It doesn't work like Direct3D or OpenGL's legacy shading models. I got it in my head to add this a while back, as a baseline part of the feature set, but it turned into a big job because to carry it out I had to rip out as much as possible of code's reliance on Nvidia's Cg API ahead of adding additional modes: <profile_GLSL> <profile_GLES> and <profile_GLES2> all OpenGL modes, and the <profile_COMMON> subsystem would use OpenGL too, so the code needed to not use Cg for <profile_CG> except where it can't be avoided...

That was a trick because it meant going around the Cg API's back to get to the OpenGL (GLSL) layer it is abstracting and never meant to expose.

I implemented the default view as a per-pixel GPU program (instead of per-vertex) and so it looks very fancy--in the rubber ducky screen shot--but that's really not the point, nor is it an accomplishment. COLLADA isn't so interested in describing 3-D "shading" programs as it is reusable (read: reconfigurable) high-level "effects." These "effects" are hooked up kind of like an entertainment system, and part of stripping out the CG API was implementing what it was doing for the FX code by hand; and probably more efficiently--though efficiency in software must be talked about in orders of magnitude and often being more efficient at something has no appreciable impact on anything.

Also during this process I unearthed a big FxComposer project called Ninja, that I hoped would be interesting because it had a lot of COMMON stuff arranged in interesting ways. Interesting COLLADA resources are difficult to come by, because they probably don't exist.. being a kind of unrealized vision that COLLADA is-or-was. But while the guts of the file looked interesting it was all dummy data that amounted to nothing. I had to go in and hand edit the dummy data to get a basic picture to emerge out of it: an animated swimsuit ninja.

I think I've seen screen shots of the ninja in question before somewhere in the old COLLADA wiki. Unfortunately the FxComposer software wasn't all that interested in COLLADA, since while using it, its tendency was to stuff the <extra> parts of the document with things only it knows and so the documents it produces don't work on any other software. It's possible it was using COLLADA before it was finished, and so there were no developed guidelines, but I'd be surprised if so. It also seems that the software only works on Windows, and while it seemed to work fine at first, these days every time I try to use it gets stuck because my Intel integrated GPU doesn't recognize the Nvidia profiles it insists on. It could be it was developed before GLSL existed, but its purpose was to showcase the Cg API and high-level programming language developed jointly with Microsoft; which fortunately does support GLSL profiles itself.

I debate with myself whether it's worthwhile to write code that recognizes the FxComposer <extra> data fields to try to bring its files to life. If so it might be a good idea to then port them to a proper use of COLLADA and repurpose them for a new life. This work I'm doing is most like FxComposer than anything else.

P.S. I believe I've settled on using https://en.wikipedia.org/wiki/GLUI for the Daedalus effort, and also the URL bar and other UI widgets that will go into this reference viewer. (The name in the title bar is a pun, referring both to a reference-implementation of COLLADA and to the fact that URLs are more generically called references.)

The GLUI codebase is interesting. I hope I can breath new life into it. It will depend on if I upset the maintainers by taking to using it or not. That will depend on if they prefer to have the project further developed to it being frozen in time--dead. More often than not open-source code banks is where software goes to die. Hopefully not this time. Its past maintainer recommended it to me...

I normally want such portable UI libraries to use the OS or window-manager's "native" facilities, so that they appear and work like a regular program does. GLUI does not do that--but I won't rule out making it do so if all goes well--but it does emulate Windows 95 and that interests me because I'm very happy with that UI and Sword of Moonlight uses it, and I've often thought about emulating it myself. So it's the best possible starting point for me personally, and also while I prefer "native" it's very good to have a plan-B to fall back on, and so it's important to have a self-contained UI mode.

I am interested in porting something like Win32 to other systems, to be cross-platform. Except now I think COLLADA is the best vector for that. Which is good because Win32 always seems to be on its way out. So I'm thinking in the spirit of Win32 but with COLLADA instead. And so what I develop, a COLLADA-UI if you will, will build on whatever I choose for this task, and unless something goes wrong, I think it will be GLUI.

Here is what it looks like, since Wikipedia wants to hide this image after the page loads:

https://en.wikipedia.org/wiki/OpenGL_User_Interface_Library#/media/File:Glui.png



More: http://www.cs.unc.edu/%7Erademach/glui/


EDITED: I hadn't even noticed it, but there's something wrong with the girl's right arm. The elbow is basically coming out of the shoulder. And the epaulet thing is twisted around. Unfortunately it's the same in the FxComposer drawing, so it seems like its data is incorrect. It's unsalvageable for the most part.
« Last Edit: June 29, 2017, 07:21:53 PM by Holy Diver »
~Blue protects white from innocence~Blue drags black with it~Blue-Blue-Blue is darkness made visible~

Holy Diver has 1888 posts

Holy Diver

  • Website System
  • Administrator
  • *****
  • Offline Offline
    • MaleView Profile
    • About/Support Me/Sword of Moonlight
look out honey, 'cause I'm using technology
Holy Diver says,
« Reply #69 on: June 21, 2017, 07:26:42 AM »

Here's a new sRGB duck. The demo link ( http://www.swordofmoonlight.net/holy/ColladaDOM_3_Reference_Viewer.zip ) is now updated with a web-browser like location-bar that now downloads this model if opened without providing a location.

The location-bar can be toggled with the Enter and Esc keys, and also F6 I think. It's initially visible. I've written more about this in the current "EXIT" blog Forum Discussion.

BTW: I increased the ambient light level by a lot in this presentation because as can be seen in the plate here ( https://developer.nvidia.com/gpugems/GPUGems3/gpugems3_ch24.html ) the "sRGB" color-space produces very sharp lighting, which is lifelike but difficult to apply to low-polygon models because the sharp changes in color produce an origami like effect even with a correct per-pixel lighting application.

I'm not sure if sRGB is a good fit for SOM at this stage, although it's the kind of fundamental graphical enhancement that can pique my interest--as opposed to the latest, trivial, flimsy graphical flair (that always seem to manage to produce images that are while-more-complicated not actually more visually compelling in the same sense that a painter or photographer would think so.)
« Last Edit: July 08, 2017, 07:16:35 AM by Holy Diver »
~Blue protects white from innocence~Blue drags black with it~Blue-Blue-Blue is darkness made visible~

Holy Diver has 1888 posts

Holy Diver

  • Website System
  • Administrator
  • *****
  • Offline Offline
    • MaleView Profile
    • About/Support Me/Sword of Moonlight
look out honey, 'cause I'm using technology
Holy Diver says,
« Reply #70 on: July 06, 2017, 07:47:03 PM »

Here's the first (totally not faked) image of this work running in a POSIX environment (Cygwin, DRI. x64.)

I had an awful problem with the linker (the linking step, could be the input was bad) that taught me a lot about the GNU/GCC tool-chain over the course of many days (four or five by rights) but that turned out to be bugs in Cygwin's current versions of these tools, and I had to finesse the code a lot until it became clear the tools were wrong (it will take some time to determine if the tools were wrong the whole time, or just in the last stages after I exhausted all my options) but fortunately Cygwin's installer had newer versions than the defaults that made the problems go away.

(I always just read the "no-warranty" disclaimers with a "yeah whatever" but it really hits you when it potentially costs you two days of work because there's a major bug that made it into a release and hasn't been back-patched over. I think this bug mainly affected very large programs. COLLADA creates a lot of work because its XML schema is used to generate code that is far greater than a person can ever do by hand.)


It took me a week or so of extensive edits to make the C++ code build with the GNU compiler. I stopped everything to work on this because I realized (after a lark) that the edits would extensive and so not something I could brush off if it came up in discussion (something I'd have to implement myself.)

In any case, I'm mainly posting this because Sourceforge.net doesn't really do attachments, so I need to upload this image somewhere. Same image as in the past; new dressing. :cool:

I wrote downloading code too, but haven't tested it yet. Build turnaround is dog slow on Linux like systems. There's so much wasted productivity that I can usually only afford to spot test/fix POSIX specific bugs which usually take an afternoon per bug. Comparable bugs with Microsoft's tools would take maybe 15 minutes. If POSIX developers are stubbornly using their own tools they are wasting a lot of time (when probably they should be figuring out why they perform so poorly and fix that first.)
~Blue protects white from innocence~Blue drags black with it~Blue-Blue-Blue is darkness made visible~

Holy Diver has 1888 posts
Pages: 1 2 3 4 [5]