[Bf-committers] Particle questions

Ton Roosendaal ton at blender.org
Wed Nov 16 11:06:34 CET 2005


Hi,

The clamping I'll fix of course. I did two of them, missed another two,  
thanks. :)

Texture support for particles is still very primitive and not well  
designed. We need a better system for it, for example in giving  
separate control for starting speeds and for adjusting speed (with  
forces) during particle lifetimes. Same goes for random btw. And I'd  
like to see perlin noise speed next to random speed. Etc...
For the time being (this release) I'd prefer to stop doing work on it.  
I bet Janne might be interested in experimenting with that now!

For a python API; try to make it future proof, stick to calls or  
signals Blender already has.

- Particles is an Object method, like Object.Particles.AddNew() or  
Object.Particles.VelocityNormal(value).
- In the future I'd like to both extend Particles to support other  
Object types, as allowing multiple layers of particle systems on top of  
each other. That would mean something like  
Object.Particles[0].VelocityNormal(value) or make it like:

Object.addParticleSystem()
particles = Object.getParticleSystem()
particles.VelocityNormal(value)

That way you can can later on accept an argument for the add or get  
commands to denote wich system you want to access?

Jahka: there's a bug in the current code for speed vectors of  
children... when you create fireworks for example. It's on my list to  
check, but if you have time for it?

And another challenge; modern hair systems allow to set some kind of  
density thresholds, acting as a LOD (level of detail) for the hair  
generator. I'm sure Tom or Guillermo will have plenty of pdfs on it!  
But I can imagine it to be quite simple, where you set a number of key  
positions for viewing distance and associated amount of hairs to be  
drawn.
The particle generator then needs to find a way to skip hairs without  
completely changing the hair positions... which might be a bit too  
complex, so as alternative it can be in the routine that generates the  
render strands. Something like this;

- calculate amount of hairs that need to be skipped entirely
- calculate amount of hairs that need to blend in or out (for smooth  
LOD transitions)
   this blending factor then needs to become stored as alpha in the  
renderface btw... can use the vertexcol pointer
- and devise a way to distribute the skipped/blended hairs in a way  
that keeps the overall apprearance and density correct

-Ton-


On 16 Nov, 2005, at 6:47, Janne Karhu wrote:

>> * is there any reason why the textures (and materials) don't clamp  
>> the same?
>
> Some mixups from me and some from different coding times so no,  
> atleast I don't see
> any reason for this (Ton you'll fix?)..
>
>> * is there any way to "disable" speedtex?  There's this check in  
>> effect.c:
>>     if(paf->speedtex)
>>        mtexmove= ma->mtex[paf->speedtex-1];
>>   but I can't see where speedtex can be set to 0
>
> It can't be actually set to zero anywhere, but if I remember correctly  
> the "if" was a
> safety for old blender files which didn't have the speedtex variable  
> so it was set to zero,
> but I covered that with sdna conversion later (iirc again, otherwise I  
> really should have).
>
> Hope this helps.
>
> Janne
>
> ----- Original Message ----- From: "Ken Hughes" <khughes at pacific.edu>
> To: "bf-blender developers" <bf-committers at projects.blender.org>
> Sent: Wednesday, November 16, 2005 2:38 AM
> Subject: [Bf-committers] Particle questions
>
>
>> I'm trying to add BPy support for the new particle system features  
>> and have two questions:
>>
>> * is there any reason why the textures (and materials) don't clamp  
>> the same?
>>   -- timetex: between 1 and 8 (should be 10)
>>   -- speedtex: between 1 and 10
>>   -- mat[] between 1 and 8 (should be 16)
>>   -- omat: between 1 and 16
>> * is there any way to "disable" speedtex?  There's this check in  
>> effect.c:
>>     if(paf->speedtex)
>>        mtexmove= ma->mtex[paf->speedtex-1];
>>   but I can't see where speedtex can be set to 0
>>
>> And a related question for BPy developers:  is there some existing  
>> code which gets/sets a three-way toggle (TOG3)?  My first thought was  
>> to borrow from the material (MTex) API but can't see it doing  
>> anything special.  I need it now for the "TexEmit" setting  
>> (flag2/flag2neg).
>>
>> Ken
>> _______________________________________________
>> Bf-committers mailing list
>> Bf-committers at projects.blender.org
>> http://projects.blender.org/mailman/listinfo/bf-committers
>
> _______________________________________________
> Bf-committers mailing list
> Bf-committers at projects.blender.org
> http://projects.blender.org/mailman/listinfo/bf-committers
>
>
------------------------------------------------------------------------ 
--
Ton Roosendaal  Blender Foundation ton at blender.org  
http://www.blender.org



More information about the Bf-committers mailing list