Main Menu
Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - suraklyn

#1
Support / Re: Triangulated Geometry
January 09, 2012, 08:12:00 PM
I gave the faked shading a stab after calling disableVertexSharing(), and the results were mixed.  In some cases, the shading looked more appropriate while in other other cases not so much.  I do plan to play more with things to see if I can improve on this.

In the end, the demo went really well, and I suspect we'll be revisiting this in the coming year.

I definitely appreciated your input as I worked through this, and I was quite happy with the existing community and resources that were available as I was tinkering with jPCT -- I found that to be lacking when looking into other toolkits.

Thanks again, and I look forward to becoming more familiar and adept with this.
#2
Support / Re: Triangulated Geometry
January 06, 2012, 11:31:57 PM
This image may help me explain a bit more.  I'm pretty new to the rendering world, scenegraphs, sceneviewers, opengl, etc., so please bear with me.

This is using the faked shading.


This is using the default shading. (I'll admit, this is the first time I've defaulted back to this shading since I moved away from using a cube as my test geometry, and it looks quite a bit better on this test.)


This is a screenshot of the building in our application that I'm trying to mimic.


All three of the images are of the same, simple building.  Originally I was aiming for shading more akin to what was discussed in this thread: http://www.jpct.net/forum2/index.php/topic,1444.msg10269.html#msg10269 (this is much closer to show the shading works in our application), but I'm pretty tempted to leave it with the default shading with the way it's looking now.


However, even if I leave it with the default, I'm still interested in my original thought.  In the first image with faked shading, you can see the left hand wall is made of two triangles, and its adjacent wall is made up of 4 triangles.  On both walls, shading is applied whole sale to each triangle with each being shaded at different levels (in some cases, very different). What I'm wondering is if there's a way to either smooth out this shading that gets applied, or maybe there's a way of reversing the triangulation by doing a union of adjacent, coplanar triangles that make up a given wall that would simplify the geometry and probably improve the faked shading as a side effect?

#3
Support / Re: Triangulated Geometry
January 06, 2012, 12:28:59 AM
Sure deal.



This sample is just a cube with a notch carved out of the corner.

Edit: If it makes a difference, to have the shading look more similar to our modeling application, I set the shading mode to SHADING_FAKED_FLAT on the Object3D.
#4
Support / Triangulated Geometry
January 05, 2012, 11:36:02 PM
I basically have my geometry defined in an XML file.  The geometry defined in the XML file is triangulated, so I'm creating my Object3Ds using addTriangle.  The only "issue" I'm running into has to do with shading -- triangles that form coplanar faces are being shaded independently, and it looks a bit wonky.

I'm really just in the tinkering phase with this project -- just trying to proof of concept displaying models exported from our application on an Android phone -- but it would help my demo on Monday if there was a means of improving this.

Maybe there's a way of blending the shading between adjacent faces or a way of creating coplanar faces from the triangulated geometry to reduce the face count?