[X3D-Public] hiring a coder... odd jobs, code clean-up, and sharedZone node

steve guynup exposedfield at yahoo.com
Tue Aug 11 12:18:55 PDT 2009


Hi Folks,

I have a little work that's a little outside my skill set.
In the near term, its just doing clean up of my teaching avatar and doing some shared behaviors in Exit Reality (aka BS Contact)

I'm funding this out of my own pocket...so no one will get rich.
There's possibilities down the road, but all I can guarantee is conference and publication action...

I think a student coder would likely be best.

peace
Steve
 




________________________________________________

Improvement makes straight roads, 
but the crooked roads, without Improvement, 
are roads of Genius.” 

- William Blake


--- On Fri, 7/31/09, John A. Stewart <alex.stewart at crc.ca> wrote:

> From: John A. Stewart <alex.stewart at crc.ca>
> Subject: Re: [X3D-Public] Can I create a colored shape without any light effects?
> To: "Tomas Mikula" <tomas.mikula at gmail.com>
> Cc: "X3D Graphics public mailing list" <x3d-public at web3d.org>
> Date: Friday, July 31, 2009, 2:42 PM
> Tomas;
> 
> I thought a little bit more about your issue; here is a
> potential solution. It does use Shaders; FreeWRL on OSX
> should work 100% of the time, FreeWRL on Linux - depends on
> the graphics drivers as to whether shaders are available or
> not.
> 
> Tell me what you think about it.
> 
> ----
> 
> 1) take the simpleShader.zip file, from http://freewrl.sourceforge/net/simpleShader.zip
> 
> 2) Add in a DirectionalLight, and a ProximitySensor; I did
> this before the "DEF BOX... line in the simpleShader.x3dv
> file.
> 
> ...
> DEF MYLIGHT Transform { translation 0 0 10 children
> DirectionalLight {}}
> DEF MYPROX ProximitySensor {size 100 100 100}
> ROUTE MYPROX.position_changed TO MYLIGHT.set_translation
> ...
> 
> 3) remove any other DirectionalLights
> 
> 4) remove all other ROUTES. You can also remove the
> TimeSensor and Interpolator, too.
> 
> 5) the toon.vs:
> 
> varying vec3 normal;
> void main() {
> normal = gl_NormalMatrix * gl_Normal;
> gl_Position = ftransform();
> }
> 
> 
> 6) the toon.fs:
> 
>         varying vec3 normal;
>         uniform vec3 decis;
> 
>         void main()
>         {
>                
> float intensity;
>                
> vec4 color;
>                
> vec3 n = normalize(normal);
> 
>                
> intensity = dot(vec3(gl_LightSource[0].position),normal);
> 
>                 if
> (intensity > 0.9)
>                
>         color = vec4(0.0,0.5,0.5,1.0);
>                
> else if (intensity > 0.8)
>                
>         color = vec4(0.0,0.5,0.5,0.60);
>                
> else if (intensity > 0.6)
>                
>         color = vec4(0.0,0.5,0.5,0.30);
>                
> else
>                
>         color = vec4(0.0,0.5,0.5,0.0);
> 
>                
> gl_FragColor = color;
>         }
> 
> 
> 7) run the .x3dv file in that directory. Notes:
>     - what happens is that the surfaces of
> the Spheres that point towards the light source (ie, the
> viewer, via the ProximitySensor) are of a high intensity;
> the closer to the sides, the lower the intensity.
>     - so, if the intensity is high, the
> colour created is (RGBA) 0.0, 0.5, 0.5, 1.0.
>     - as the intensity drops off, the alpha
> (transparency) goes from solid to totally transparent.
>     - you can change the colour of the
> "Spheres" - take the x3dv program, and note the "decis"
> variable. You can change this into an RGB colour, and, in
> the toon.fs, change the vec4 to
> 
>        
> color=vec4(decis,1.0);  (or decis,0.30, or decis
> 0.00...)
> 
>       and that will change the "decis"
> variable into an RGBA.
>     - this test has 4 "Spheres" make as many
> as you wish. I think the more you have, the better it will
> look.
> 
> Hope this helps;
> 
> 
> -----------------------------------------------------------
> John A. Stewart
> Team Leader: Networked Virtual Reality
> alex.stewart at crc.ca
> 
> Network Systems and Technologies -
>         Systemes et technologies des
> reseaux
> Communications Research Centre Canada  |
>          Centre de recherches
> sur les communications Canada
> 
> 3701 Carling Ave.  |  3701, avenue Carling
> PO Box 11490, Station H  |  CP 11490, succursale
> H
>          Ottawa ON K2H
> 8S2   |  Ottawa (Ontario) K2H 8S2
> 
> http://www.crc.ca
> 
> 
> 
> 
> 
> 
> _______________________________________________
> X3D-Public mailing list
> X3D-Public at web3d.org
> http://web3d.org/mailman/listinfo/x3d-public_web3d.org
> 


      



More information about the X3D-Public mailing list