Page 1 of 1

SetSprite3D() new command

Posted: Fri Jan 01, 2010 12:33 am
by Olliv
Hello,

When CreateSprite3D() is called, 8 internal values are set by default: they allow the GPU to localize the 4 corners in the source sprite in order to fill the 3D sprite texture.

The default values are:
u0 = 0.0
v0 = 0.0
u1 = 1.0
v1 = 0.0
u2 = 0.0
v2 = 1.0
u3 = 1.0
v3 = 1.0

What is could be very interesting, it would be possible (if it's not already done anywhere...) to change (dynamically if possible) these 8 floating values.

The function syntax would look like this:

Code: Select all

SetSprite3D(Sprite3DNumero.I, u0.F, v0.F, u1.F, v1.F, u2.F, v2.F, u3.F, v3.F)
Technically, this allows the user to:
- modify the orientation of the texture in the 3D sprite, and also the presentation of this texture in the basic mesh of the 3D sprite for a better control (really a full control) of the 3D deformation. The user got also a 3D sprite like this (representation of the 2 triangles) : |/|, and newly like this too : |\|. Don't do the mistake imagining this is not important : it's very usefull.
- (if dynamically) a quick scale of the texture.
- (if dynamically) a quick rotation of the texture.
- (if dynamically) a quick scrolling (=smooth scrolling)

I use the word "dynamically" to tell this new possible function (SetSprite3D() ) like we can actually use TransformSprite() in a 3D display loop.

Thank you and happy new year.

Ollivier

Re: SetSprite3D() new command

Posted: Wed Jan 27, 2010 1:21 pm
by Olliv
I am sorry but I up this topic. The reason is that the function I describe above is a strategic function. There is no limit of coding domain: game, tool, or others... so, its results are very important. Plus, I am sure the statement concept is simple to realize.

The goal is just use the GPU for what it is able to process. It's a gain of performance in the client program and a gain of performance control, what is a speciality in Purebasic.

I would like an answer from one of the members of the PBTeam, about the future of this wish.

Re: SetSprite3D() new command

Posted: Wed Sep 29, 2010 3:09 am
by Olliv
I up again this topic because I don't think the interested of this wish is removed!