hiya andreas, i already have the noise creation stuff... My question was about the
img->set(Image::OSG_RGB_PF, texw, texh, texd, 1, 1, 0.0, (const UInt8 *) data, Image::OSG_FLOAT32_IMAGEDATA); thing. Last time i checked OSG didn't support float textures. The new version does? I am using the one with GLSL support... Il gio, 2004-07-22 alle 16:03, Andreas Zieringer ha scritto: > Hi Enrico, > > I'm doing something like this in my code. > > Andreas > > // create texture 3d chunk. > TextureChunkPtr texc = TextureChunk::create(); > ImagePtr img = Image::create(); > > // these are not included in OpenSG ... > FilteredNoise noise(noisew, noiseh, noised); > float *data = noise.createVectorNoiseTexture3D(texw, texh, texd, scale, > amp, mode); > > beginEditCP(img); > img->set(Image::OSG_RGB_PF, texw, texh, texd, 1, 1, 0.0, (const > UInt8 *) data, Image::OSG_FLOAT32_IMAGEDATA); > endEditCP(img); > delete [] data; > > beginEditCP(texc); > texc->setImage(img); > texc->setMinFilter(GL_LINEAR); > texc->setMagFilter(GL_LINEAR); > endEditCP(texc); > > > In the fragment shader: > > vec3 v = texture3D(noiseMap, coords).rgb; > > > thanks and thanks to the other answers. > > creating a 3D image is doind something like: > > > > image->set(Image::OSG_RGB_PF,256,256, 256, 1, 1, 0, data)? > > > > unfortunately i realized just in now that i am in need of *floating > > point* textures, containing noise patterns. Is still impossible use > > such textures in OpenSG? any idea how may i send to my shader the noise > > texture? > > > > > > > > Il gio, 2004-07-22 alle 13:24, Matthias Stiller ha scritto: > > > >>Hi Enrico, > >> > >>this is supported, just construct a 3D image and use it as texture. > >> > >>Regards > >> > >>Matthias > >> > >>On Thursday 22 July 2004 11:03, Enrico Borrione wrote: > >> > >>>hi all opensg users, > >>>i was wondering if 3D textures where supported in OpenSG. I want to use > >>>them to build a 3D noise map to simulate metal flakes, following an > >>>NVIDIA example. > >>>Thanks enrico > >> > >> > >> > >>------------------------------------------------------- > >>This SF.Net email is sponsored by BEA Weblogic Workshop > >>FREE Java Enterprise J2EE developer tools! > >>Get your free copy of BEA WebLogic Workshop 8.1 today. > >>http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click > >>_______________________________________________ > >>Opensg-users mailing list > >>[email protected] > >>https://lists.sourceforge.net/lists/listinfo/opensg-users > > > > > > > > > > ------------------------------------------------------- > > This SF.Net email is sponsored by BEA Weblogic Workshop > > FREE Java Enterprise J2EE developer tools! > > Get your free copy of BEA WebLogic Workshop 8.1 today. > > http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click > > _______________________________________________ > > Opensg-users mailing list > > [email protected] > > https://lists.sourceforge.net/lists/listinfo/opensg-users > ------------------------------------------------------- This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools! Get your free copy of BEA WebLogic Workshop 8.1 today. http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click _______________________________________________ Opensg-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/opensg-users
