|
From: makura <y_m...@ya...> - 2010-12-02 09:18:07
|
Thanks Gerardo,
it works.
I tried to make a constant shader with java.
but it doesn't work.
folowing : SurfaceFirst.java.
--------------------------
import javax.vecmath.Color3f;
import org.jrman.grid.BooleanGrid;
import org.jrman.grid.Color3fGrid;
import org.jrman.grid.FloatGrid;
import org.jrman.render.ShaderVariables;
import org.jrman.shaders.SurfaceShader;
/*
SurfaceFirst.java
*/
public class SurfaceFirst extends SurfaceShader {
public void shade(ShaderVariables sv) {
super.shade(sv);
sv.Oi.set(sv.Os);
sv.Ci.mul(sv.Cs, sv.Oi);
}
}
---------------------------
folowing : a RIB file.
######
#first.rib
Display "first.tif" "framebuffer" "rgb"
Projection "perspective" "fov" [45]
LightSource "ambientlight" 1 "intensity" [0.2]
LightSource "spotlight" 2 "from" [-1 1 0 ] "to" [0 0 3] "intensity" [3]
Translate 0 0 3
WorldBegin
Color [1 0 0]
Surface "First"
Sphere 1 -1 1 360
WorldEnd
#####
C:\jrman-0_4\model>jrman first.rib
Unknown surface shader: First, replacing with fakedlight surface shader
first.rib time: 0h0m7s
Total time: 0h0m7s
it doesn't work.
Can I make a shader?
Where are Shaders directory?
Thank you for your support.
makura
--- Gerardo Horvilleur <ma...@si...> wrote:
> SurfaceClouds.java is the source for a surface shader to be used from
> inside jrMan, it is not a standalone program.
>
> To use it, you must run jrMan to render a RIB file where you specify
> that you want to use that surface shader. In the sample file
> noiseShadersTest.rib you can see how to specify a surface shader in
> a
> RIB file.
>
> It would be something like this:
>
> Surface "clouds" "uniform float noisescale" 2 "uniform integer
> noiseoctaves" 5
>
> On Wed, Dec 1, 2010 at 8:55 AM, makura <y_m...@ya...> wrote:
> > Hi,
> > I'm studying RenderMan.
> > I compiled jrman-0_4/src/SurfaceClouds.java.
> >
> > C:\jrman-0_4\src>javac -classpath
> >
>
%JRMAN_HOME%\jar\jrman.jar;%JRMAN_HOME%\jar\vecmath.jar;%JRMAN_HOME%\jar\commons-cli-1.0.jar
> > SurfaceClouds.java
> >
> > there is SurfaceClouds.class.
> > but it didn't work.
> >>java SurfaceClouds
> > Exception in thread "main" java.lang.NoSuchMethodError?: main
> >
> > Is SurfaceClouds shader?
> > Can I set up a scene with SurfaceClouds.class and a RIB.
> > Is there a way to use the SurfaceClouds.class?
> > I hope a sample file.
> >
> > Thank you for your support.
> >
> > makura
> >
> >
>
------------------------------------------------------------------------------
> > Increase Visibility of Your 3D Game App & Earn a Chance To Win
> $500!
> > Tap into the largest installed PC base & get more eyes on your game
> by
> > optimizing for Intel(R) Graphics Technology. Get started today with
> the
> > Intel(R) Software Partner Program. Five $500 cash prizes are up for
> grabs.
> > http://p.sf.net/sfu/intelisp-dev2dev
> > _______________________________________________
> > Jrman-user mailing list
> > Jrm...@li...
> > https://lists.sourceforge.net/lists/listinfo/jrman-user
> >
>
>
>
> --
> Gerardo Horvilleur
> ma...@si...
> 5282-3314
> 044 55 2709-0509
>
>
------------------------------------------------------------------------------
> Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
> Tap into the largest installed PC base & get more eyes on your game
> by
> optimizing for Intel(R) Graphics Technology. Get started today with
> the
> Intel(R) Software Partner Program. Five $500 cash prizes are up for
> grabs.
> http://p.sf.net/sfu/intelisp-dev2dev
> _______________________________________________
> Jrman-user mailing list
> Jrm...@li...
> https://lists.sourceforge.net/lists/listinfo/jrman-user
>
|