Thalius, you are being very kind by helping me like this.
i've downloaded the ogre SDK and i'm contemplating switching to c++... but i like purebasic a lot. i have to reveal my utter ignorance now. i'm having trouble figuring out how to:
1) write a material script so each pixel is calculated by simple x,y coords (for example make a gradient texture so r=x, g=0, b=0, alpha=y)
2) apply it to my entity
3) add new pixel-data to the materials on the fly (let's say, for example you click on the gradient somewhere and it adds a blue radial gradient at that spot)
i store the pixel data in a 2D array in PB for each material. but if i click somewhere i want to pass specific pixel updates to the material... realtime:
just an example (i just wrote it for this post... i don't know if it's correct code):
Code: Select all
circleRadius = 20
clickXpos = 58
clickYpos = 32
for y = 0 to 255
for x = 0 to 255
r = sqr((clickXpos-x)^2+(clickYpos-y)^2)
if r<circleRadius
newR = 255 - r/circleRadius*255
newG = 0
newB = 0
newA = newR+newG+newB
modifyMaterialXY (x, y, newR, newG, newB, newA)
texArray(0,x,y).R = newR
texArray(0,x,y).G = newG
texArray(0,x,y).B = newB
texArray(0,x,y).A = newA
endif
next
next
...i am feeling so grateful for your help that i am almost about to send some screenshots of what i'm working on. i think you might like the idea. but i am hesitant because i want the first few implementations of this technique to be in relation to a particular subject matter... after that it can be as public as anyone wants.
i am actually an artist more than a programmer... my application is for use in a movie production and since i am a gaudiya vaisnava monk, the content is the pastimes of sri caitanya mahaprabhu and srimad bhagavatam...
my technique has very beautiful results... it is not a standard 3D technique. you get smooth and soft things with volume

instead of hard cold edges and empty objects. the realtime update aspect is because it is an "object" editor (sorta).
please help me a little more. i am totally ignorant about how to implement the material scripts and the dynamic updates. actually i don't even know how to get the most basic material script working in purebasic with my simple meshes. it's hurting my head looking through all the documentation and not finding a single example of linking an ogre material script to purebasic code with parse3dscripts... or what code applies the material to the mesh.?
if you help me i will be exceedingly grateful. if you want to see screenshots i will send some privately for now
