exclude model from getting affected by light in libgdx 3D - libgdx

I have 2 objects in the 3d scene. I would like the light to affect only 1, and leave the other one unaffected How does one instruct the light to do that? I am using pointLight. Thanks for help.

Don't specify the environment in the call to render for models you don't want to be affected by light. See also: https://xoppa.github.io/blog/loading-a-scene-with-libgdx/

Related

Locate/Extract Patches from an Image

I have an image(e.g. 60x60) with multiple items inside it. Items are in the shape of square boxes, with say 4x4 dimensions, and are randomly placed within the image. The boxes(items) themselves are created with random patterns, some random pixels switched on and others switched off. So, it could be the same box repeated twice(or more in case of more than 2 items) in the image or could be entirely different.
I'm looking to create a deep learning model that could take in the original image(60x60) and output all the patches in the image.
This is all I have for now, but I can definitely share more details as the discussion starts. I'd be interested to weigh in different options that can help me achieve this objective. Thanks.
I would solve this using object detection. First I would train a network to detect those box like objects by cutting out patches of those objects. Then I would run a Faster R-CNN or something like this on it.
You might want to take a look at the stanford lecture on detection (slides here: http://cs231n.stanford.edu/slides/2017/cs231n_2017_lecture11.pdf).

Non-polygon based 3D-Model in ThreeJS (like in HelloRacer.com)

I am currently working on a project using ThreeJs.
Right now I use a wavefront-obj to represent my 3D-Models, but I would like to use something like -IGES or -STEP. These formats are not supported by ThreeJS, but I have seen the http://helloracer.com/webgl/ and for me, due to the short loading time, it seems like this model is not based on polygons as you can see by the smooth surface. The model seems to be .js so it is ThreeJS-JSON format?
Is such an model created by loading an IGES/STEP to for example Clara.io and export it to threejs-JSON? I have not the chance to test it by my self, because I do not have a IGES/STEP model right now, but I would let someone create one.
With wavefront I am not able to create such smooth surfaces without getting a huge loading time and a slow render.
as you can see, the surface and lightning is not nearly as smooth as on the posted example.
Surfaces in the demo you've linked are not smooth, they're still polygonal.
I think smooth shading is what you're looking for. The thing is, usually a model is shaded based on its normals. Thus, what normals we set to vertices of the model is crucial to what we'll get on a screen. Based on your description, your models have separate normal for every triangle in it. Like on this picture, each vertex of each triangle has the same normal as triangle itself. Thus, when we interpolate this normals across a triangle, we get the same value for every point of the triangle. Shading calculations yield uniform illumination and the triangle appears flat on a rendered image.
To achieve effect of smooth surface, we need other values for vertex normals, like ones on this image:
If we save this sphere to any format with those normals and try to render it, interpolated normals'll change smoothly across the surface of triangles comprising the sphere. Thus shading calculations'll yield smoothly changing illumination, and the surface'll appear smooth.
So, to recap, models you try to render need to have "smoothed" vertex normals to appear smooth on a screen.
UPD. Judging by your screenshot, your model uses refractive material. The same idea applies to refraction calculations since they're based on normal values too.

Alternativa3D: Actionscript3: How to avoid z-fighting in imported 3DS model?

I can't seem to find a specific solution for my problem so I hope someone here can help me.
I am experimenting with alternativa 3D in Actionscript3 and I managed to upload a textured .3DS model from 3D Max.
The object is a complex spaceship that wasn't intended to be used in a game but I wanted to use it as an example.
The problem is:
Since the imported model is complex it has a lot of overlapping parts. Alternativa z-sorting engine don't react well to this overlapping and the output is jittery texture(i don't know how else to call it) in the overlapping places.
I know next time to model my objects with as less overlapping parts as possible but I am sure this problem will reappear in other forms in the future.
The Alternativa documentation suggests using Decal objects instead of Mash objects but I can't seem to convert imported object Mashs to Decay objects.
Any help will be appreciated.
If you have a model where faces directly intersect one another, then I'd suggest this, not the engine, is the problem.
A well-built 3d model shouldn't have any intersecting faces - you may not notice or think it's a problem in a program like 3dsMAX, you can get away with it more - but it'll certainly show up in a real-time engine.

Flash - Page tear animation?

Can anyone recommend a decent tutorial, add-on or approach to creating a page rip off effect in flash?
I want to create a notepad where each page can be ripped off to reveal further content.
Thanks
Paul
are you looking for a pageFlip with a tearing feature? if so it does exist even though I can't find the link (anyway it was AS2).
if you want more flexibility, you can take a look at a cloth simulation ; derschmale did a great example and pixelero did sort of the same with linked lists (=faster)
there's also this particle physics engine called Traer that have been ported from java and that allows you to get the cloth behaviour with fewer lines of code and some fine tuning (stiffness, damping a.s.o. ).
the general idea is to subdivide the displayObject you want to tear off into a series of triangles, take a snapshot of that object in a BitmapData, then redraw the distorted grid with the drawTriangles() method.
I think it is how they do the thing in the cloth examples.

Can I make Flash CS4's 3D functionality work with 3D glasses?

I know it can be done in papevision -> http://codejockeyscorner.blogspot.com/2009/04/papervision3d-anaglyph-scene.html but I'd like to be able to do it just using Flash's 3D functionality. I'm aware that its more 2.5D but was wondering if anybody knew how to create a situation so you can view it with 3D glasses (red and blue)
Stereoscopic images can be made with a simple camera so the choice of a 3d engine shouldn't make a difference : )
Very basically : you have to do is to duplicate the scene (one blue/ onered) and change slightly the PerspectiveProjection for each. The viewpoints need to be placed at a distance proportional to the one you have between your two eyes.