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

Post your completed addons to share with the community

Post » Tue Dec 09, 2014 5:34 pm

Would you mind to help me how to create skybox? I've made a 3D cube with texture inside, now it renders all dark and black, even light is inside, I couldn't figure out
B
99
S
35
G
29
Posts: 3,139
Reputation: 28,421

Post » Tue Dec 09, 2014 5:42 pm

@joannesalfa
Set the emissive value to 255,255,255 the shininess to 1 and set diffuse color to black, also set it to render on backside. You must do this in an "on model created" or after youre sure the skybox has a model created. if its still black your camera frustum is probably too short so make your box smaller or make your camera have a farther "far" value in frustum settings.
B
79
S
13
G
8
Posts: 1,977
Reputation: 9,947

Post » Tue Dec 09, 2014 9:33 pm

Really neat. Really impressive. I was amazed and still am, and I know I'm barelly scratching the possibilities this plugin could do.
So I decided to give it a try now that I finally had the time.
I am just messing around right now to get to know the functions and everything. I decided to simulate a parallax with a 3d foreground, while a character moved on a layer below.

I did a simple rectangle model with a brick texture and added it to the project, but when I try to rotate, it gets some artifacts at certain angles. To leave no room for doubt, I tried the capx in one more computer, with an nvidia gtx7xx. The computer where I did the first test has an amd card.
Oh,BTW, Is it a feasible effort to try to make a conversion of construct 2 canva's 2D coordinates on the fly to the 3D viewport?
I am still confused by the viewport plugin and its relation to the cameras and the main plugin. Do you have more examples?

Following is a capx with the same model and the problem. Using r190
You do not have the required permissions to view the files attached to this post.
B
6
S
1
G
2
Posts: 26
Reputation: 1,477

Post » Tue Dec 09, 2014 9:56 pm

@brunosxs

the "artifacts" are simply Z fighting effects you're getting because the shaded debug object is coincident with your box model. to eliminate them u need to set collider debug to "false" in the model settings, so that the grey debug doesn't show.

The viewport plugin is mainly for setting up splitscreen games, it creates a sub-window the size of the viewport relative to the initial window's dotted line in the layout editor. It renders the viewport in the z order specified, using the specified camera and scene. it's useful for making UI's aswell if you have scenes with transparent backgrounds you wish to layer above other viewports. you can also use it for picking using absolute mouse coordinates like in the Raycasting / 2D physics examples, as it does the nasty conversion of the position to a camera projected ray for you.

you can definitely convert 2D coordinates to 3D coordinates and vice versa, but you'll need to understand the math. The default camera starts in a z position that corresponds perfectly 1:1 with the layout unless you're in crop mode, so you'll only have to change it's x/y coordinates to that of the games scroll x/y if you want to use it to make a background for example.
B
79
S
13
G
8
Posts: 1,977
Reputation: 9,947

Post » Wed Dec 10, 2014 12:01 am

Thanks for your time to explain this out man.

I will keep experimenting with the plugin and keep studying.
Early in construct 2's life I did a pseudo 3D effect that tried to replicate this. It used three diferent sprites that moved and overlaped over each other depending on the player's coordinates in the canvas. It worked, but it was not without quite some time and effort, and it still needed improvement. Maybe my code was slow, or construct/browsers of the time were at fault. I forgot about it until I saw your plugin.
B
6
S
1
G
2
Posts: 26
Reputation: 1,477

Post » Wed Dec 10, 2014 6:28 am

@QuaziGNRLnose - I am trying to create a background image something similar to the below threejs code -
new THREE.Mesh(
new THREE.SphereGeometry(90, 64, 64),
new THREE.MeshBasicMaterial({
map: THREE.ImageUtils.loadTexture('images/galaxy_starfield.png'),
side: THREE.BackSide
})
);

I have loaded the png file,
Created BGSphere with radius of 90 as above
used the Load image -->galaxy_starfield.png,
created a new Basic material called Basic1
created Texture1 using the galaxy_startfield.png
And finally trying to create the object using Basic1, BGSphere and Texture1.
However I am unable to get this working. Could you please let me know how to do this in a correct fashion?
For game development / IT services contact - [email protected]

List of published iOS apps -
https://itunes.apple.com/us/artist/ravi ... d693234511
B
84
S
20
G
3
Posts: 337
Reputation: 7,368

Post » Wed Dec 10, 2014 7:13 am

is your material double sided? is your camera within the sphere? other than that it should work, unless you're not waiting for the image to load. You can use the loadstatus expression of Q3D master = 1 in a system compare with a trigger once to create the texture/mesh once everything is loaded.

Heres an example: Simple Manual Texture Loading

It'd be easier to do this with a Q3D model of a sphere, with the emissive value at rgb(255,255,255) and the diffuse color at rgb(0,0,0) and a shininess of 1. Handling the loading yourself is unnecessary in most circumstances, and complicates whats simple using the new plugins. You can emulate all the features of a "mesh basic" material using the material properties available, or you could even just do it by exporting your sphere model and editing the .js file to automatically load a filename, then using model materials : yes. Either way will work without you needing to explicitly manage loading.
B
79
S
13
G
8
Posts: 1,977
Reputation: 9,947

Post » Wed Dec 10, 2014 8:01 am

This was perfect!! Thanks a lot...I was not aware of Q3D.loadingstatus=1 ...That made the things work!

I didnt understand how to do the same thing from Q3DModel without manual loading. I did create a Q3DModel and created a animation frame named DiffuseMap in which I pasted the image in frame 0 . I have set Q3DModel emissive settings and Color settings to what you have mentioned...But I couldnt get that working...

Although you are doing a great job of responding to the queries, I feel a manual OR FAQ on such basic stuff might greatly reduce your burden.

Thanks a lot!
For game development / IT services contact - [email protected]

List of published iOS apps -
https://itunes.apple.com/us/artist/ravi ... d693234511
B
84
S
20
G
3
Posts: 337
Reputation: 7,368

Post » Wed Dec 10, 2014 11:35 am

@kmsravindra

Why couldn't you get it working? your model probably had no UVs.
B
79
S
13
G
8
Posts: 1,977
Reputation: 9,947

Post » Wed Dec 10, 2014 3:16 pm

ok, then I understand that UV's are mandatory when the image has to be loaded using Q3DModel. I was thinking we could probably do that directly for standard models like sphere/cube by just having the DiffuseMap image in the animation frame...

Probably it will be beneficial to have a simple model.js templates for standard Models that we can use w/o having to create and export the .js files from blender...Does that make sense?

I couldn't thank you enough...The simulation that I have attempted is coming great and hopefully I will be able to share it when I complete it.

Edit - UV unwrap and export through blender was pretty easy and is working great with Q3DModel component! Thanks.
For game development / IT services contact - [email protected]

List of published iOS apps -
https://itunes.apple.com/us/artist/ravi ... d693234511
B
84
S
20
G
3
Posts: 337
Reputation: 7,368

PreviousNext

Return to Completed Addons

Who is online

Users browsing this forum: AppStar and 2 guests