Hello Markus,

Markus Joppich wrote:
> I'm posting here as I've no where found an answer to my problem. In case 
> I overlooked a related topic, I am sorry for asking again.
> 
> I am using OpenSG 1.8 in my little starter project.
> 
> I want to use particles in mode "Rectangles" (so that I have no 
> billboarding effect). Furthermore those particles should display a texture.

I'm afraid the rectangle mode does not support textures, at least that 
is what the code looks like to me.

> That's working in case I am using a texture with only one color. If not, 
> something strange happens. See this picture to see what's happening.
> 
> http://img688.imageshack.us/img688/2973/effect.png

that is probably an artefact of the rectangle mode not setting any 
texture coordinates, so you effectively get whatever the hardware feels 
like doing. With a texture that has only one colour the lookup 
coordinates don't really matter and so it seems to work.

> I'll include parts of my code where the texture gets set right below. I 
> think that'd be the crucial part.

[SNIP - code]
looks ok to me.

> Funnily enough it works correctly in case i am using mode "ViewDirQuads" 
> - but that got billboarding which I don't want to use. I somehow have 
> the feeling as if the texture doesn't get mapped correctly on the 
> "Rectangle". But I'm not sure on that.

yes, that is what happens.

> So if anyone got any idea what's happening here, feel free to help :-) 
> Or if there's another solution for displaying particles with texture 
> without billboarding, I am open for everything :-)

take a look at testParticlesRenderShader.cpp, it uses a shader to 
calculate the particle positions and supports textures, so you can use 
that to have the particles not follow the viewer and still use textures.

        Cheers,
                Carsten


------------------------------------------------------------------------------

_______________________________________________
Opensg-users mailing list
Opensg-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to