Q3D V-2.4 [3D Physics + Skeletal Animation UPDATE]

Post your completed addons to share with the community

Post » Sat Jun 27, 2015 1:09 pm

I cannot for the life of me get shadows to work. Sigh..

Edit: Okay, I seem to have got shadows to work, at least.
B
42
S
23
G
19
Posts: 155
Reputation: 12,977

Post » Sat Jun 27, 2015 8:37 pm

Prominent wrote:Also need a way to choose which scene to put the objects in.
There doesn't appear to be a way to clear the renderer manually. Also, when rendering a scene, it appears to clear it as well, which makes it impossible to render two scenes?..


What do you mean clear the renderer manually? What do you need that for.

You choose the scene with the "pick scene" action in Q3DMaster. Then any action created objects are in the new scene. Also if you use "change parent to scene" objects will be put in the new scene, so you can code a simple function to move objects over. I didn't and won't include a scene chooser within the various plugin properties in editor for the main reason that the feature is only really intended for limited uses where multiple view-ports are needed, and is difficult to work with due to the abstraction, also there would be no easy way to initialize a new scene nicely in editor. It's not a lot of work to make a function that moves necessary objects over at layout start if you put all the models / etc in a family.

I don't fully understand what you want out of the renderer. Rendering doesn't clear the scenes (you must mean something else, that has to do with the clearing of buffers) also, I have no idea what you mean by clearing the renderer manually. Are you referring to the various settings three.js gives control over when rendering? Q3D doesn't allow access to those levels, but you can layer multiple renders by layering Q3D viewports.

As for the transparency, In general transparency in forward rendering is a difficult issue, and you might simply be running into depth sorting problems with no easy fix due to the design of forward renderer. In general you can use the the "depth settings" on the material of objects to control how they modify/read the depth buffer in rendering.

I'll look into the issues you've brought up when I have the time.
B
77
S
13
G
8
Posts: 1,974
Reputation: 9,893

Post » Sat Jun 27, 2015 9:09 pm

Okay, I can render different scenes, and add objects.
I have the frame skip ratio to 0, and create actions to render each scene, but it clears the screen before rendering each scene.
If there were an option to turn autoclear to false on the renderer, that would allow rendering multiple scenes together. Then I'd be able to create a skybox.

also, sprites always render last, so they won't show up behind models with transparency. That's not something that can be fixed.
B
45
S
21
G
65
Posts: 1,115
Reputation: 38,221

Post » Sun Jun 28, 2015 11:37 am

All right, I managed to make something out of my test scene.
Try it, roll a ball, collect come points and win the game.
Last edited by purplemonkey on Sun Jun 28, 2015 12:20 pm, edited 1 time in total.
B
42
S
23
G
19
Posts: 155
Reputation: 12,977

Post » Sun Jun 28, 2015 11:51 am

purplemonkey wrote:All right, I managed to make something out of my test scene.
Try it, roll a ball, collect come points and win the game.


Hey! looks great! Maybe the ball runs too fast but as example is great. C2 Download sample? :P
B
24
S
10
G
3
Posts: 553
Reputation: 4,483

Post » Sun Jun 28, 2015 6:34 pm

@purplemonkey

Very cool! for the trees you can try creating compound colliders by using a thin cyclinder collider for the trunk and a sphere for the leafy ball. In debug mode you can trial and error and visualize the position of any extra colliders you add. this all has to be done with action however you can make it automated in the on-created trigger.

@Prominent

You shouldn't need to mess around with manual rendering. If you make your scene background have 0 alpha and layer view-ports you can layer renders, however semi transparency wont cross between layers cause of the three.js renderer design. I will add more manual rendering features when I get a chance since you seem to be expressing interest and it wont take much work.

All transparent objects SHOULD render last, as this is the way transparency is generally handled in forward renderers. Opaque objects render in any order and sort using the z-buffer, and at the end transparent objects/sprites are sorted based on camera view-plane distance and rendered back to front. This should minimize all artifacts unless objects intersect, which is a problem that has no easy solution and is present in even modern renderers. If sprites are rendering last after the back to front rendering of transparent objects thats a three.js bug, but i dont recall this being the case.

http://stackoverflow.com/questions/8763 ... r-in-webgl

An image would help me diagnose what the issue you're having is. usually playing with material depth setting values and preventing the sprites/semi transparent objects from writing to the z-buffer works well, especially if its for smoke or special effects like explosions which utilize blending. Transparency is just an overall annoying problem. Sometimes the best solution is to not use a sprite at all, and instead a piece of flat geometry which is a cutout of the silhouette, so that the object can be opaque or mostly opaque, and the artifacts are minimized cause theres no edge-cases that lead to really bad transparency occlusion problems.
B
77
S
13
G
8
Posts: 1,974
Reputation: 9,893

Post » Mon Jun 29, 2015 5:51 am

@purplemonkey:
Very nice scene! I really like the atmosphere--fog, clouds, use of color. It drew me in right away. :)
B
11
S
2
Posts: 24
Reputation: 686

Post » Mon Jun 29, 2015 6:06 am

QuaziGNRLnose wrote:@purplemonkey

Very cool! for the trees you can try creating compound colliders by using a thin cyclinder collider for the trunk and a sphere for the leafy ball. In debug mode you can trial and error and visualize the position of any extra colliders you add. this all has to be done with action however you can make it automated in the on-created trigger.

@Prominent

You shouldn't need to mess around with manual rendering. If you make your scene background have 0 alpha and layer view-ports you can layer renders, however semi transparency wont cross between layers cause of the three.js renderer design. I will add more manual rendering features when I get a chance since you seem to be expressing interest and it wont take much work.

All transparent objects SHOULD render last, as this is the way transparency is generally handled in forward renderers. Opaque objects render in any order and sort using the z-buffer, and at the end transparent objects/sprites are sorted based on camera view-plane distance and rendered back to front. This should minimize all artifacts unless objects intersect, which is a problem that has no easy solution and is present in even modern renderers. If sprites are rendering last after the back to front rendering of transparent objects thats a three.js bug, but i dont recall this being the case.

http://stackoverflow.com/questions/8763 ... r-in-webgl

An image would help me diagnose what the issue you're having is. usually playing with material depth setting values and preventing the sprites/semi transparent objects from writing to the z-buffer works well, especially if its for smoke or special effects like explosions which utilize blending. Transparency is just an overall annoying problem. Sometimes the best solution is to not use a sprite at all, and instead a piece of flat geometry which is a cutout of the silhouette, so that the object can be opaque or mostly opaque, and the artifacts are minimized cause theres no edge-cases that lead to really bad transparency occlusion problems.


Thanks.. I tried using viewports, and I'm able to create a skybox this way.
The other issue I had with sprites was what that link you have describes. A sprite is behind the geometry and so the part covered doesn't get rendered even if material is transparent. I can probably work around it by using models like you suggest, and putting stuff in another viewport with alpha if I have stuff that should render over any sprites..

does it require more processing to render multiple viewports?.. would it be more efficient to render to one? If it's more efficient to render to just one, adding the manual rendering actions would still be useful.
B
45
S
21
G
65
Posts: 1,115
Reputation: 38,221

Post » Mon Jun 29, 2015 8:07 am

matriax wrote:
purplemonkey wrote:All right, I managed to make something out of my test scene.
Try it, roll a ball, collect come points and win the game.


Hey! looks great! Maybe the ball runs too fast but as example is great. C2 Download sample? :P


Thanks! Eh, the code is all jumbled in this one, it wouldn't really be wise to share it. I might do do a simpler scene to share though.

QuaziGNRLnose wrote:@purplemonkey

Very cool! for the trees you can try creating compound colliders by using a thin cyclinder collider for the trunk and a sphere for the leafy ball. In debug mode you can trial and error and visualize the position of any extra colliders you add. this all has to be done with action however you can make it automated in the on-created trigger.


Good idea, I'll definitely try it out!

terransage wrote:@purplemonkey:
Very nice scene! I really like the atmosphere--fog, clouds, use of color. It drew me in right away. :)


Hey thanks, man!

@QuaziGNRLnose How do I go about creating a ".qfx" shader? You said there were packaged files for download but I can't seem to find them. Also, would it be possible to implement things like AO (ambient occlusion) in scenes? How about post processing effects DOF (depth-of-field) or "god rays" and such?
B
42
S
23
G
19
Posts: 155
Reputation: 12,977

Post » Mon Jun 29, 2015 9:39 am

Message: miketolsa can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
purplemonkey wrote:All right, I managed to make something out of my test scene.
Try it, https://dl.dropboxusercontent.com/u/2053779/Q3D_TEST/index.html roll a ball, collect come points and win the game.



would it be possible to make a tutorial as how you build this game using Q3D ......

or share the .capx file if possible so that other having problem can learn little bit .....
Image
B
36
S
13
G
1
Posts: 99
Reputation: 3,051

PreviousNext

Return to Completed Addons

Who is online

Users browsing this forum: Exabot [Bot] and 2 guests