|
|
|
Return to Panda Features in Development
by rdb » Mon Apr 30, 2012 6:56 am
Do you mean something like this?
- Code: Select all
Sequence(yourInterval, Wait(0.06)).loop()
-
rdb
-
- Posts: 8565
- Joined: Mon Dec 04, 2006 5:58 am
- Location: Netherlands
-
by preusser » Mon Apr 30, 2012 8:51 am
No I mean the delay time inside the interval itself. Say you have a color scale interval with duration of 100 seconds. having the interval recolor the node each frame might be a waste as doing it each second would be as smooth.
It would be the same as using an ordinary task when domethodLater would suffice.
-
preusser
-
- Posts: 516
- Joined: Sun Mar 27, 2011 10:07 am
by genius-in-training » Tue May 22, 2012 3:21 pm
i noticed there is a relative mouse position thing for c++. it allows you to keep the mouse centered while still reading its movement.
is there something like this for python users too?
if not, it wouldnt be all too hard to create for you, would it?
-

genius-in-training
-
- Posts: 64
- Joined: Tue May 22, 2012 3:19 pm
- Location: sittard, the netherlands
by DangerOnTheRanger » Tue May 22, 2012 3:43 pm
genius-in-training wrote:i noticed there is a relative mouse position thing for c++. it allows you to keep the mouse centered while still reading its movement.
is there something like this for python users too?
if not, it wouldnt be all too hard to create for you, would it?
I'm pretty sure this is pretty easy to implement in Python - I did something similar for a FPS project I had a while ago. Panda might actually have this functionality built-in.
-

DangerOnTheRanger
-
- Posts: 240
- Joined: Fri Aug 27, 2010 4:59 pm
-
by enn0x » Tue May 22, 2012 3:49 pm
genius-in-training wrote:i noticed there is a relative mouse position thing for c++. it allows you to keep the mouse centered while still reading its movement.
is there something like this for python users too?
if not, it wouldnt be all too hard to create for you, would it?
Almost everything in C++ is exposed to Python. What particular "mouse position thing" did you notice?
-
enn0x
-
- Posts: 1266
- Joined: Wed Nov 08, 2006 1:39 am
- Location: Germany, Munich
by coppertop » Tue May 22, 2012 3:50 pm
Actually, MRelative is available in Python, you just do:
- Code: Select all
props = WindowProperties() props.setMouseMode(WindowProperties.MRelative) window.requestProperties(props)
The thing is, IIRC it only works on Linux.
-

coppertop
-
- Posts: 526
- Joined: Sat Apr 18, 2009 5:48 am
by rdb » Wed May 23, 2012 1:18 am
Linux and Mac OS X. Windows has no relative mouse mode, but it doesn't need it because it preserves the subpixel information when you change the cursor location. so you can simply reset the cursor position to the middle of the window every frame.
-
rdb
-
- Posts: 8565
- Joined: Mon Dec 04, 2006 5:58 am
- Location: Netherlands
-
by preusser » Wed May 23, 2012 7:04 am
Please add a function which takes a GeomNode and returns a CollisionPolygon. The Bullet module has a function like that, but using a full physics engine isn't the best idea for some games.
BTW, I'm aware you can set Panda to generate CollisionPolygons instead from egg files, but I'm not using the egg/bam formats.
I also know its possible to set visible geometry to collide, but from what I read its not a real solution for final games.
I'm not really sure where the function would go, maybe passing a GeomNode to the CollisionPolygon constructor?
-
preusser
-
- Posts: 516
- Joined: Sun Mar 27, 2011 10:07 am
by coppertop » Wed May 23, 2012 12:12 pm
@rdb
True, but means the optimal way to build mouselook for Linux is without resetting the mouse cursor, and the only way for Linux is with resetting it. It would be great if MRelative on Windows automatically kept the cursor centered, just for the sake of consistency.
-

coppertop
-
- Posts: 526
- Joined: Sat Apr 18, 2009 5:48 am
by rdb » Wed May 23, 2012 4:06 pm
I agree. Could you file a bug report, so that this doesn't get forgotten?
-
rdb
-
- Posts: 8565
- Joined: Mon Dec 04, 2006 5:58 am
- Location: Netherlands
-
by coppertop » Wed May 23, 2012 4:26 pm
-

coppertop
-
- Posts: 526
- Joined: Sat Apr 18, 2009 5:48 am
by preusser » Tue Jun 12, 2012 2:17 am
We could have this "greyscale" filter from this manual page in CommonFilters. http://www.panda3d.org/manual/index.php ... ge_Filters
I think this and sepia filters are as common as an invert filter.
As for a sepia filter, this seems to work:
- Code: Select all
//Cg
void vshader( float4 vtx_position : POSITION, float2 vtx_texcoord0 : TEXCOORD0, out float4 l_position : POSITION, out float2 l_texcoord0 : TEXCOORD0, uniform float4 texpad_tex, uniform float4x4 mat_modelproj) { l_position=mul(mat_modelproj, vtx_position); l_texcoord0 = vtx_position.xz * texpad_tex.xy + texpad_tex.xy; } void fshader(float2 l_texcoord0 : TEXCOORD0, out float4 o_color : COLOR, uniform sampler2D k_tex : TEXUNIT0) { float4 color = tex2D(k_tex, l_texcoord0).rgba; float newred = (color.r * 0.393) + (color.g * 0.769) + (color.b * 0.189); newred = clamp(newred, 0, 1); float newgreen = (color.r * 0.349) + (color.g * 0.686) + (color.b * 0.168); newgreen = clamp(newgreen, 0, 1); float newblue = (color.r * 0.272) + (color.g * 0.534) + (color.b * 0.131); newblue = clamp(newblue, 0, 1); o_color = float4(newred, newgreen, newblue, 1); }
-
preusser
-
- Posts: 516
- Joined: Sun Mar 27, 2011 10:07 am
by redpanda » Thu Jul 05, 2012 6:01 am
DirectEntry isn't great, instead of the "width" parameter, why not a "charCount"? So we could set thr\e maximum amount of characters (per line). I mean with "width" you can set the lenght of the DirectEntry in screen units, not character count, which means you can make room for "111" but for the same width only "2", each character has different lenght. So I don't see the point of "width".
Also a way to disable characters/numbers/signs.
I have shops in my game where players can by items and they can choose the amount they want to buy. The player can now type "a" or "?" in the entry field, which of course I can reset to 1 or 0 after they have pressed Enter, but I don't want them to type that anyway.
-
redpanda
-
- Posts: 380
- Joined: Wed Aug 03, 2011 6:34 am
by preusser » Tue Aug 14, 2012 5:28 pm
Can we have the ShaderGenerator not automatically assume we want per-pixel lights? Maybe have a separate function for toggling the lightning mode.
-
preusser
-
- Posts: 516
- Joined: Sun Mar 27, 2011 10:07 am
by rdb » Wed Aug 15, 2012 5:36 am
That would be a bit tricky, given the fact that many extra features it provides rely on having per-pixel lighting. Perhaps when we get a new shader generator at some point, this will be possible.
-
rdb
-
- Posts: 8565
- Joined: Mon Dec 04, 2006 5:58 am
- Location: Netherlands
-
by preusser » Thu Aug 16, 2012 7:59 am
rdb wrote:That would be a bit tricky, given the fact that many extra features it provides rely on having per-pixel lighting.
If you mean those features will need to be rewritten to support per-vertex lights, then OK. But if you mean features that are only possible with per-pixel, then I don't see the problem: just a debug message notifying the developer that he attempted to use something not supported in per-vertex mode will do. Perhaps when we get a new shader generator at some point, this will be possible.
Speaking of which,
@Craig were you planning to integrate your shader generator to Panda?
https://blueprints.launchpad.net/panda3 ... -generator
From what I read it's feature complete, but still a separate project and in Python. Any plans to make it part of Panda?
-
preusser
-
- Posts: 516
- Joined: Sun Mar 27, 2011 10:07 am
by preusser » Tue Aug 21, 2012 3:18 am
Helper function in CollisionHandlerFloor to get the distance of the ray origin from the floor, so we can for example disable player controls when falling.
-
preusser
-
- Posts: 516
- Joined: Sun Mar 27, 2011 10:07 am
by rdb » Mon Aug 27, 2012 3:28 am
Isn't that a matter of subtracting the collision point and the ray origin, and calling length() on the result?
-
rdb
-
- Posts: 8565
- Joined: Mon Dec 04, 2006 5:58 am
- Location: Netherlands
-
by wezu » Wed Oct 31, 2012 3:53 pm
People from time to time ask about generating tangent and binormal vectors in code for a loaded or generated model... I now find myself among them.
In my case I need them for GeoMipTerrain but it would be more useful if one could use it for any Geom.
I may be totally wrong, cause I'm a dancin' fool.
-

wezu
-
- Posts: 517
- Joined: Tue May 19, 2009 1:03 pm
by kurohyou » Sat Nov 03, 2012 6:27 pm
I would like a to be able to call getTags() and getPythonTags() and have it return a dict of all tags on a node. This would really help with the editor I'm building.
-
kurohyou
-
- Posts: 208
- Joined: Tue Jun 29, 2010 9:59 pm
-
by GrizzLyCRO » Sat Nov 03, 2012 7:02 pm
kurohyou wrote:I would like a to be able to call getTags() and getPythonTags() and have it return a dict of all tags on a node. This would really help with the editor I'm building.
That might be useful, but until someone implements it you could do something like assigning python tag "data" which would be dictionary and using it as main container. You can assign any python object (instance of class too) as pythonTag.
-

GrizzLyCRO
-
- Posts: 301
- Joined: Tue Dec 16, 2008 4:03 pm
- Location: Croatia
by kurohyou » Tue Nov 06, 2012 11:53 pm
@teedee - awesome news, thanks
I would also like something similar to look up light relationships, eg NodePath.getLights(). Currently it seems you have to query each light with each NodePath in order to see if there is a relationship or not.
-
kurohyou
-
- Posts: 208
- Joined: Tue Jun 29, 2010 9:59 pm
-
by drwr » Wed Nov 07, 2012 4:17 pm
- Code: Select all
nodePath.getAttrib(LightAttrib).getOnLights()
-
drwr
-
- Posts: 11253
- Joined: Fri Feb 13, 2004 12:42 pm
- Location: Glendale, CA
by kurohyou » Wed Nov 07, 2012 8:08 pm
Dang! Thanks again, David 
-
kurohyou
-
- Posts: 208
- Joined: Tue Jun 29, 2010 9:59 pm
-
by preusser » Fri Nov 30, 2012 8:15 am
Still hope to see the fullscreen filters work with antialiasing.
-
preusser
-
- Posts: 516
- Joined: Sun Mar 27, 2011 10:07 am
by nande » Sat Feb 09, 2013 3:09 pm
i would like to have pixel2d with positive coords, and positive offsets for a texture.
-

nande
-
- Posts: 16
- Joined: Thu Oct 21, 2010 7:17 pm
by rdb » Sat Feb 09, 2013 3:22 pm
If you want to have pixel2d with positive coordinates, just flip the axis around using setScale on base.pixel2d. But your text and textures will be upside down.
What do you mean by "positive offsets for a texture"?
-
rdb
-
- Posts: 8565
- Joined: Mon Dec 04, 2006 5:58 am
- Location: Netherlands
-
by jokoon » Sun Feb 10, 2013 4:55 pm
Well, since I've got this obsession with speed, why not release a Cython version of Panda3d ? Even if it's experimental for a time, I'd surely use it to optimize when it goes slow.
games need to be faaaaast !
Sorry, I don't do interviews...
[dread lord]
-
jokoon
-
- Posts: 12
- Joined: Sat Sep 12, 2009 2:42 pm
by croxis » Sun Feb 10, 2013 5:53 pm
jokoon wrote:Well, since I've got this obsession with speed, why not release a Cython version of Panda3d ? Even if it's experimental for a time, I'd surely use it to optimize when it goes slow.
games need to be faaaaast !
Much of panda3d is already written in C/++ but with a lot lot lot of focus on python bindings.
David - Proud to be saving the world sense 1984
-
croxis
-
- Posts: 408
- Joined: Thu Feb 12, 2009 4:13 pm
- Location: Portland, OR
-
Return to Panda Features in Development
Who is online
Users browsing this forum: No registered users and 0 guests
| | |