[Papervision3D] Questions, requests, suggestions, reports, etc...

Clox ogggan at gmail.com
Mon Sep 8 02:51:15 PDT 2008


Thanks a lot for your reply Xero, I really appreciate it.

Of course I can render the scene whenever I want to, and yes, I only want
the lightning to be calculated once. But I still do need to render on every
frame because the camera will constantly move.
Is there a good way of doing that?

Couldn't really find any information on singleRender, but I'm guessing it's
just like rendering the scene once?

So unless I'm misunderstanding something these wont work, since I do need to
recalculate rotation&position and such on every frame.

And I'm not using bumpmapping. It's more like bumps on the actual 3D
geometry, sorta like waves. If I position th camera above this, facing down,
then the "waves" went be visible at all, unless I give them shading. But I
do not need to recalculate their shading, only the rotation and such.

If I can't find a solution to this then I will dig into the rendering of
shadings, and make a new function that doesn't just loop through every face
and instead only render the faces specified as an argument.

Thanks again for you help =)


xero wrote:
> 
>  some of the stuff you described is possible right
> now, with just a bit of planning/thinking.
> 
> your mad because the engine boggs down when your
> using shaded materials. but you only want to calculate
> the lighting once...
> 
> well in PV3D you controll when the engine's rendering
> actually occurs. if you just create all your objects + materials
> just call singleRender(), or renderer.renderScene(..) one time
> as opposed to every time on enter frame.
> 
> the bumpmapping on the ground is a good example of when
> using multiple scenes/viewports can really come in handy.
> emagine you make one scene/view that has your ground in
> it. and another scene/view with your foreground objects in it.
> if the ground isnt going to change as often as the foreground
> you can just render that one once then leave it alone untill
> you need to render it again.
> ____  ___
> \   \/  /___________  ____
> .\     // __ \_  __ \/ _  \
> ./     \  ___/ | | \( <_>  )
> /___/\  \___  >__|---\____/
> |     \_/   \/        |
> | xero harrison       |
> | xero.nu at gmail.com   |
> | http://xero.nu      |
> | http://fontvir.us   |
> | http://hexarray.nu  |
> | http://0x000000.nu  |
> | http://xero.owns.us |
> `---------------------'
> 
> 
>>
>> ---------- Forwarded message ----------
>> From: Clox <ogggan at gmail.com>
>> To: papervision3D at osflash.org
>> Date: Sat, 6 Sep 2008 05:52:12 -0700 (PDT)
>> Subject: [Papervision3D] Questions, requests, suggestions, reports,
>> etc...
>>
>> My next point is about shaders. I always use them in my Papervision
>> projects, but they are quite CPU heavy, i feel this could be improved a
>> lot.
>> The shades recalculate for every render, and so far for my projects, I've
>> never even needed that.
>> I might have a few meshes with ColorMaterial, and I want to shade them to
>> make them look better.
>> Or i might have a bumpy ground mesh or such, which I want to give more
>> depth
>> to so that the slopes can easily be seen.
>> In these cases I've always had the lightsource really, really far away
>> and
>> so redrawing the shades is a real waste.
>>
>> I did come up with a solution for this.
>> What I do is giving an object a shade-material, turn of cullings, render
>> the
>> object, then grab its output bitmap with material.getOutputBitmapDataFor
>> and
>> use it for a regular bitmap-material which i assign to the object.
>>
>> This *significantly* improves the performance. And it even makes it look
>> better as well, since it gets rid of the artifacts shaders tend to cause,
>> e.g. the black lines that appears along edges.
>> Doesn't exactly seem like a great solution though.
>> Plus, sometimes I might want to move a few vertices on my mesh, or I
>> might
>> even have a scrollable mesh which only loads in certain parts at a time,
>> and
>> in that case I have to reassign a shadematerial, render it in order to
>> reshade the *whole* mesh, grab the output and finally assign it to the
>> mesh
>> again.This is my issue for my current project.
>>
>> So what I'm "asking" for here, is a way of updating shading on certain
>> parts
>> of a mesh only.
>> And preferably a better way of "turning off" recalculations for shading
>> on
>> every render.
>> --
>> View this message in context:
>> http://www.nabble.com/Questions%2C-requests%2C-suggestions%2C-reports%2C-etc...-tp19346350p19346350.html
>> Sent from the Papervision3D mailing list archive at Nabble.com.
>>
>>
> 
> _______________________________________________
> Papervision3D mailing list
> Papervision3D at osflash.org
> http://osflash.org/mailman/listinfo/papervision3d_osflash.org
> 
> 

-- 
View this message in context: http://www.nabble.com/Questions%2C-requests%2C-suggestions%2C-reports%2C-etc...-tp19346350p19368989.html
Sent from the Papervision3D mailing list archive at Nabble.com.




More information about the Papervision3D mailing list