For example: I’ve got a grass texture. I want to apply the grass on my flat terrain and use Billboard effect for a realistic feeling(don’t ask). Now the problem:
I don’t want to tell panda everytime “load flat.egg|apply grass.jpeg|place at x,y,z”. It’s a waste of HW resources! I imagine that I’ll tell it only “load grass.jpg[size=59]|create vertexes from grass.jpg’s x,y(0,0) to grass.jpg’s last x,y(32, 32) [/size]|apply to the grass(count) node”
Is it possible? Cos’ I’ve seen this in editors like Game Maker and etc.
[size=75]Please don’t offer me other ways how to do the grass because it’s not only the grass that will be done with just a texture, the whole game will be done that way(texture+billboard effect).[/size]
And there are couple of other problems with the “not good” way to apply it I did not mention here(for shortening).
Once again I am sorry for my english, it’s been written fast so I didn’t have any deep look at my post.
It’s not possible in 3d. You always have to assign your texture to geometry if you want it to be displayed. Talk to the graphics card manufacturers about adding that functionality.
I recommend using the CardMaker class to easily generate a quad to put your texture on. You can find plenty of information about this class on the manual, API and forums.
So card = render.attachNewNode(Cardmaker(‘card’).generate()) would simply do all the work, generate two quads. But how do I know/change how big will it be?