Git Product home page Git Product logo

3dreamengine's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

3dreamengine's Issues

love-loader

Is it possible to load textures through love-loader?

Texture filtering and links to textures

Well, loading textures through love-loader now works fine.
But I've noticed one strange thing: pkm and png textures, loaded through love-loader look like they have linear filter accepted ,when I use nearest one. And the «traditional» method (png and mtl) works as it should.

Cutting of triangles has become more aggressive

I've noticed that in previous version some kind of filtering "not in frustum" triangles has appeared.
It works fine at fov 60 (use it in my project), but a bit worse with fov 90.
In the last version of 3DreamEngine it has become more aggressive: some tiles not drawn at the edges of the screen or right after fast camera rotation even with fov 60.

Frame's parametres (feature request)

Does 3dreamengine have a possibility to render smaller frame than love2d project's window has?
It would be nice to create 2d frame with custom width and height (like init.resize function does) at custom coordinates (x and y for left upper corner of the frame).
And yeah, last version had special method for changing camera's fov, but looks like it was removed. That's not a real problem to change this in code, but the method was really useful.

new dithering and tile's edges

https://ibb.co/PTY4VP3
https://ibb.co/FK1q3R7

  1. Large space between two tiles (left-down corner). All tiles have same size and placed automatically. Blending set to disabled.
  2. New version of engine with average/alpha (see no differ between these two): no space at all.

The first variant is rather strange: even without blending this border should not be large than a pixel, I think.

3do frustum bug

Looks like frustum counts wrong (like more agressive) for 3do models: they disappear at the edges of the screen. Same obj models works fine.

Transparent png.

Semi-transparent pixels looks strange. Like they have triangle holes.

hangs on pressing some keys

3DreamEngine does not react on pressing keys (via love2d of course) after pressing Shift and some other keys (usually functional and modificators). Letters and arrows work fine. UP: probably my mistake, I'll check this carefully.

Strange behaviour of setDirection

Looks like setDirection somehow ignores mesh:reset (): an object gets right (well, looks like) direction in the beginning, but then continue to rotate, if I use setDirection and reset mesh in a cycle to the same vector.
Used once setDirection works fine.

UV coordinates for textures added by links

Some objects (not all) looses correct UV-coordinates, if the texture loaded not through mtl and path, but through mat and link. I so not know why this happens, but the modeller says that the possible reason is that UV coordinates are far from limits of texture's square in theese models. Sorry, not a specialist in this question.

Multicore CPU-s (a question or feature request).

Is there any plans of moving some parts of 3Dreamengine to other threads?
The possibility to send the most heavy parts to another core could improve performance, as I think. But I'm not a specialist in this question, so I want to hear other opinions.
Love2d itself has this possibility, but the question is what can be send to other threads safety.
3Dreamengine is nice atm, but better performance would be good. And one of the main problem, as I see, high CPU usage both 3Dreamengine and other code in love 2d, that can cause low fps if CPU's core they both use loaded close to 100%.

Camera controls work strange

I have only default canera in the scene. All methods like
dream.setFov (45);
dream:setNear (1);
dream:setFar (100);
do not work (nil).
But I can use
dream.cam.fov = 45;
dream.cam.near = 1;
dream.cam.far = 100;

dream.deferred_lighting = true artifacts

I know the readme mentions possible lighting distortion when dream.deferred_lighting = true. I'm curious if the white edge atrifacts on my shipping container below are an example of this, or if I need to debug my models further? The artifacts don't appear with normal non-deferred lighting.

The model meshes have small rounded bevels on all edges. If I make the bevel radius larger the artifacts move around a bit, but still appear.

3DreamEngine-artifacts

In case it's relevant, the code that sets up dream:

dream.msaa = 16
dream.bloom_enabled = false
dream.secondPass = true
dream.deferred_lighting = true
dream.shadow_factor = 4
dream.shadow_resolution = dream.shadow_resolution*2
dream.shadow_cube_resolution = dream.shadow_cube_resolution*2
dream.shadow_distance = 10
dream.sky_enabled = false
dream.sun = vec3(-0.5,1,0)
dream.sun_color = vec3(2.0, 2.0, 2.0)
dream.sun_ambient = vec3(0.5, 0.5, 0.5)

dream.cam.fov = 45
dream.cam.eye = vec3(0,15,5)
dream.cam.target = vec3(0,0,0)

dream:init()

container = dream:loadObject("shipping-container", {splitMaterials = true})
platform = dream:loadObject("platform", {splitMaterials = true})

--- [snip ui test stuff; mouse/camera math]

function love.draw()
  dream:resetLight()
  dream:prepare()
  dream.cam:reset()
  dream.cam.transform = dream:lookAt(dream.cam.eye, dream.cam.target)
  dream:draw(container, 0, 1, 0)
  dream:draw(platform, 0, -0.5, 0)
  dream:present()
  ui:draw()
end

Unrelated: This engine is great! Thanks for the effort :-)

An error occurs if no textures added to *.mat file

Error: 3DreamEngine/loader.lua:863: bad argument #11 to 'setVertex' (number expected, got table)
stack traceback:
[string "boot.lua"]:777: in function <[string "boot.lua"]:773>
[C]: in function 'setVertex'
3DreamEngine/loader.lua:863: in function 'createMesh'
3DreamEngine/loader.lua:657: in function 'loadObject'

Adding any texture to a mat file (tex_albedo, tex_normal, etc) solves the problem.

Collider from 3do

Looks like 3do model can not be a collider: even being loaded with noCleanup = true option it causes the error 'can not create the collider, use noCleanup = true'.

Wrong file name

Error: 3DreamEngine/init.lua:181: Could not open file 3DreamEngine/res/brdfLUT.png. Does not exist.

The file presented, but it`s name is brdfLut.png, not brdfLUT.png.

Instances

Is there any way to rotate instance (loaded meshes which are drawn several times) not all together?

New version has lower and unstable fps

Usually it has fps close to previous version, may be a bit higher some times.
But, for example, near some dozens of trees (demo with models uploaded, links at the issue with wind shader) it drops fps to ~30. And the old version has 50 ­— 60 in the same conditions.

Feature request about 3DSounds

I see the 3DSound section is WIP.
So, here is a feature request.
Could you make a sound pool?
For example, we need to play one sound several times: ten explosions, for example, or footsteps while mob walking.
So, starting new sound, we are checking it's playing status, and if the sound is playing, we create a copy of it;s source and starting to play it. The creation of new copies can be limited: if we are out of limit, we stops first sound in pool, and starts it again from initial position.

dream:resetLight(true) issue

dream:resetLight(true) in the scene with sun gives this error:

Error: 3DreamEngine/shaders/base/Phong.lua:151: Shader uniform 'tex_normal' does not exist.
A common error is to define but not use the variable.
stack traceback:
[string "boot.lua"]:777: in function <[string "boot.lua"]:773>
[C]: in function 'send'
3DreamEngine/shaders/base/Phong.lua:151: in function 'perMaterial'
3DreamEngine/render.lua:262: in function 'render'
3DreamEngine/render.lua:527: in function 'renderFull'
3DreamEngine/render.lua:714: in function 'present'

dream:resetLight(false) works. Important moment: I use dream:present(false, false, true).

example mat file: description error

	color = {1.0, 1.0, 1.0, 1.0},  -- color
	emission = {1.0, 1.0, 1.0,     -- emission color, or the multiplier if a texture is present

Is this a mistype?
color = {1.0, 1.0, 1.0, 1.0}, -- color
emission = {1.0, 1.0, 1.0}, -- emission color, or the multiplier if a texture is present

BTW, does .3de (or .mat now) work correctly in new version of 3dreamengine? After «too many fixes»?
Old version worked fine (still have wind-shaded objects in old-demo working), but now there is the error:

Error: 3DreamEngine/render.lua:233: bad argument #2 to 'send' (table expected, got number)
stack traceback:
[string "boot.lua"]:777: in function <[string "boot.lua"]:773>
[C]: in function 'send'
3DreamEngine/render.lua:233: in function 'render'
3DreamEngine/render.lua:468: in function 'renderFull'
3DreamEngine/render.lua:691: in function 'present'
main.lua:345: in function 'draw'
[string "boot.lua"]:618: in function <[string "boot.lua"]:594>
[C]: in function 'xpcall'

Could you check this and post an example of 100% correct .3de file with names and paths to resources?

Fast in frustum function

Any chances to get fast "in frustum" function to draw only those meshes which in camera's fow?
I can check it in love.draw, but it slows down the scene (25 vs ~115 fps). But! The same mechanism gives 165 Vs 140 fps while watching to the area where no meshes placed.

Can't add new argument to function

If I add argument to function c:collide its ignored by function (nil) and please add in collide function triangles check maximum distance for better performance :)

Sun vector

Looks like there is no function for setting sun vector, and using dream.sun = vec3(x, y, z) does not allow to change the moving direction of sun. And the same thing for moon can be useful too. And an interface for adding additional moons and other orbital satellites.

Rainbow

Is this enough for rainbow creation: dream:setRainbow(strength, size, thickness)?
I can not find rainbow at skydome.

New drawParticle system vs. new one (with batches)

Could you you return old drawParticle system as an alternative method?
It was much simpler and had better functionality in some cases.

And as for the new one…

  1. I see no way to add time interval between frames (in old wan it was possible to change frames manually with custom rate, not the best variant, but it works).
  2. New PS has no controls for looping (and not looping) of the image sequence.
  3. There is no method for catching of the last frame and removing PS after playing.

So, the upgrading of the new system can help too.

3doconvert problems

An error occurs if converting some models (I've found 2 or 3 per 100):

Error: 3DreamEngine/libs/utils.lua:87: stack overflow
stack traceback:
[string "boot.lua"]:777: in function '__gc'
3DreamEngine/libs/utils.lua:87: in function 'copyPrimitive'
3DreamEngine/libs/utils.lua:91: in function 'copyPrimitive'
3DreamEngine/libs/utils.lua:91: in function 'copyPrimitive'
3DreamEngine/libs/utils.lua:91: in function 'copyPrimitive'
3DreamEngine/libs/utils.lua:91: in function 'copyPrimitive'
3DreamEngine/libs/utils.lua:91: in function 'copyPrimitive'
3DreamEngine/libs/utils.lua:91: in function 'copyPrimitive'
3DreamEngine/libs/utils.lua:91: in function 'copyPrimitive'
...
3DreamEngine/libs/utils.lua:91: in function 'copyPrimitive'
3DreamEngine/3doExport.lua:35: in function 'export3do'
3DreamEngine/loader.lua:323: in function 'loadObject'
classes/Scene.lua:297: in function 'Convert'
states/playingState.lua:19: in function 'Convert'
states/playingState.lua:35: in function 'keypressed'
main.lua:66: in function main.lua:64
[string "boot.lua"]:604: in function <[string "boot.lua"]:594>
[C]: in function 'xpcall'

I've uploaded models.zip here https://github.com/thisnickwasfree/3dreamengine_tests
This file works fine in 3DreamEngine itself, but can not be converted to 3do.

Another interesting thing (not sure yet) obj files which have particle system at *.mat file can not be correctly converted too… Well, still checking.

Another one error occurs if 3do models are presented at save directory:

Error: 3DreamEngine/loader/3do.lua:44: bad argument #2 to 'unpack' (data string too short)
stack traceback:
[string "boot.lua"]:777: in function <[string "boot.lua"]:773>
[C]: in function 'unpack'
3DreamEngine/loader/3do.lua:44: in function <3DreamEngine/loader/3do.lua:30>
3DreamEngine/loader.lua:76: in function 'loadObject'
classes/Scene.lua:297: in function 'Convert'
states/playingState.lua:19: in function 'Convert'
states/playingState.lua:35: in function 'keypressed'
main.lua:66: in function main.lua:64
[string "boot.lua"]:604: in function <[string "boot.lua"]:594>
[C]: in function 'xpcall'

setDefaultShaderType issue

Error: 3DreamEngine/functions.lua:81: attempt to index local 'uv2' (a nil value)
stack traceback:
[string "boot.lua"]:777: in function '__index'
3DreamEngine/functions.lua:81: in function 'calcTangents'
3DreamEngine/loader.lua:370: in function 'createMesh'
3DreamEngine/loader.lua:293: in function 'loadObject'

dream:setDefaultShaderType("Phong") gives this error with some objects.
dream:setDefaultShaderType("PBR") gives this error with some too.

BTW, print ("SHADER:",dream:getDefaultShaderType()) prints nil.
Or false after dream:setDefaultShaderType(false), dream:setDefaultShaderType(Phong), dream:setDefaultShaderType(phong) — I've checked several variants, sending strings and possible vars.

In old version phong shader works fine with this object.
UP: fine while mtl presented, not mat.

UP2: merging of dup-vetexes and re-unwraping fixes the model, so new version of engine is able to load it.

Sun direction

looks like dream:setSunDir(direction) does not affect sun trajectory.
I've used different values with no result.
Is it possible to turn sun's trajectory at 90° somehow? Through setSunDir or some kind of setNorth function?

some exemples seems broken

Hi,
i'm looking into the exemples and some of them seems broken:
In lamborghini example , knight example, lowpolygame example, monkey example, and particle system example all models are rendered black like there wasn't a light.
it is my fault ?

Compressed textures

Any plans for adding etc and dxt compression support (pkm and dds formats)? Original love2d supports them, what about 3dreamengine?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.