

Christoph
Members-
Content count
21 -
Joined
-
Last visited
About Christoph
-
Rank
Member
Profile Information
-
Gender
Male
-
Location
Germany
Recent Profile Visitors
409 profile views
-
(untrusted) user input & html5 canvas / babylonjs
Christoph replied to Christoph's topic in Questions & Answers
Mea culpa. My head hurts and I guess I messed up the question. Lemme try again I want to use a websocket-server so users have the ability to exchange messages, a simple chat, that's the untrusted user input part. Because those messages are sent by users and could contain malicious input that's broadcasted to other users, filtering on the server side is must because of this, else it will lead to XSS. But I was not able to find anything related to xss, webgl / html5 canvas because they are used in babylonjs for text rendering and that's the place the user input is used at and where XSS could happen. -
Hi, I've been wondering how to deal with user input while using babylon js and where to pay attention. My idea was to use websockets + babylonjs to render some text so the users have the ability to talk to each other. However while I guess that the webgl part is rather safe (because no user input enters the DOM) I wonder how safe the html5 canvas and it's "fillText()" and "strokeText()" are.
-
Check 2.1.c You are allowed to use them in 3D models, however you need to put a proper license on the model. I think the main reason is that you do not redistribute their stuff with some copyleft license.
-
#2 https://www.textures.com/terms-of-use.html Their license is among the more permissive ones.
-
In order to force your application into your defined AA you should try to change "enhance the application setting" to the last one that's something like "disable application settings". My Nivida Settings are in german so I don't know how it's called exactly in the english version. That should override the application's settings and use your own. However flickering is usually your depth buffer. Note: The size of your room does not matter for the buffer. You can test if that's the case by moving "flickering" objects a bit away from each other, so they do not overlap or are too close together.
-
How about vertex colors or uv's and one Triangle ? if you set vertex colors for your triangle alle the same it should be filled with that color. If you set - for example - it's vertices correctly you can have a line with increasing thickness: https://doc.babylonjs.com/how_to/custom A possible triangle would be: x = 0, y = 2, z=0 x = 100, y = 3, z=0 x = 100, y = 1, z=0 This would draw a "line" that's 2 units "thick" at it's end and is 100 units "long". If you want to use such a thing you could construct all kinds of lines, like adding a "rounded" head and so on. However this really depends on your needs. By supplying "uv's" you can map anything you want on your triangle.
-
-
solved Name for trading vertices for bump texture
Christoph replied to JCPalmer's topic in Questions & Answers
I'm not sure what you look exactly for, however as far as reducing vertices is concerned you can go either for a bump map / normal map or for the opposite direction and look into displacement mapping (displacing vertices with a texture). -
Visualization of large data sets - seeking advice
Christoph replied to Ronny Abraham's topic in Coding and Game Design
Is your data sorted, so you get a stream of 20k points per second and all you do is throwing away the oldest 20k points ? -
-
How to control an ORTHOGRAPHIC_CAMERA
Christoph replied to chicagobob123's topic in Questions & Answers
for (var i = 0; i < mscene.meshes.length; i++){ if (mscene.meshes.isVisible == false) continue; var bounds = mscene.meshes.getBoundingInfo(); That's 99% your culprit, you get your min/max x,y,z values based on different meshes in your scene. Or in other words: you are distorting your camera by using something like: Left = -5 Right = +10 Top = +6 Bottom = -9 You want to use instead: scale = 5 Left = - scale Right = scale Top = scale Bottom = -scale This will capture your "world" from -5 to +5 around the camera's position and "squeeze" it into it's output. If you use however different scales for x and y you will distort your output. Edit: Here is a quick "fix" - Lines 171-173. https://www.babylonjs-playground.com/#21YCLG#41 -
If your sphere consists of some kind of geometry with uv mapped textures, distorting the geometry should as well distort the displayed texture. According to the API of PIXI http://pixijs.download/release/docs/PIXI.mesh.Mesh.html: You should (for example) specify both vertices and their UV coordinates, if you want to have this performant you need to distort the verticies in your vertex shader as well: http://pixijs.download/release/docs/PIXI.Shader.html Please note that I have not tried this.
- 2 replies
-
- mathematics
- graphics
-
(and 4 more)
Tagged with:
-
You could use a sprite sheet instead, so you can change to many different "sprites", spriteA.png would be cell 1, spriteB.png would be cell 2.
-
solved [SOLVED] EmissiveTexture ignores Alpha ?
Christoph replied to Christoph's topic in Questions & Answers
Ah I see, so the solution is to add the texture as additional opacity texture. -
After experimenting with u/v scales and offsets (I want to use planes for sprites in my project), I notices that you cannot use any alpha on your emissive textures, the background will be black: Quick Demo, swap the emissiveTexture to diffuse Texture and the Alpha works: http://www.babylonjs-playground.com/#2H7BP8#68 According to the documentation this should work however ?
-
-
performance looking for advice on mobile performance
Christoph replied to Baker Xiao's topic in Questions & Answers
I don't think so, I confused in that post active and total meshes so the Edit I made is not correct -
performance looking for advice on mobile performance
Christoph replied to Baker Xiao's topic in Questions & Answers
From looking at your game I think the terrain is rather regular, or in other words: Instead of doing any bounding box and collision detection you could just compute the distance between player/npc and the rocks, if it's too small -> consider it as some kind of collision. Maybe that could be faster. However when looking at the stats it lists around 25k+ verts so your average mesh is around 100 (Edit: It seems that's not 100 but ~1000) vertices. That seems pretty high.